[netcdf4-python] 01/13: Imported Upstream version 1.1.8

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri Jun 5 00:00:57 UTC 2015


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

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

commit ed72e39c0e8a3a041c7ae5a89c33192ca28b65d5
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Thu Jun 4 23:12:23 2015 +0200

    Imported Upstream version 1.1.8
---
 .gitignore                                     |      1 -
 .travis.yml                                    |     15 +-
 Changelog                                      |     48 +
 MANIFEST.in                                    |     11 +-
 README.macosx                                  |     18 -
 README.md                                      |     70 +-
 create_docs.sh                                 |      2 +-
 docs/api-objects.txt                           |    557 +-
 docs/class-tree.html                           |     45 +-
 docs/help.html                                 |     22 +-
 docs/identifier-index.html                     |    673 +-
 docs/index.html                                |    551 +-
 docs/module-tree.html                          |     22 +-
 docs/netCDF4-module.html                       |    129 +-
 docs/netCDF4.CompoundType-class.html           |     18 +-
 docs/netCDF4.Dataset-class.html                |    117 +-
 docs/netCDF4.Dimension-class.html              |     24 +-
 docs/netCDF4.Group-class.html                  |     17 +-
 docs/netCDF4.MFDataset-class.html              |     29 +-
 docs/netCDF4.MFTime-class.html                 |     14 +-
 docs/netCDF4.VLType-class.html                 |     18 +-
 docs/netCDF4.Variable-class.html               |    122 +-
 docs/redirect.html                             |      2 +-
 examples/README.md                             |     13 +
 examples/bench.py                              |      4 +-
 examples/bench_compress.py                     |      2 +-
 examples/bench_compress2.py                    |      2 +-
 examples/bench_compress3.py                    |      2 +-
 examples/bench_diskless.py                     |      6 +-
 examples/data/prmsl.2000.nc                    |    Bin 8985332 -> 0 bytes
 examples/data/prmsl.2001.nc                    |    Bin 8968789 -> 0 bytes
 examples/data/prmsl.2002.nc                    |    Bin 8972796 -> 0 bytes
 examples/data/prmsl.2003.nc                    |    Bin 8974435 -> 0 bytes
 examples/data/prmsl.2004.nc                    |    Bin 8997438 -> 0 bytes
 examples/data/prmsl.2005.nc                    |    Bin 8976678 -> 0 bytes
 examples/data/prmsl.2006.nc                    |    Bin 8969714 -> 0 bytes
 examples/data/prmsl.2007.nc                    |    Bin 8974360 -> 0 bytes
 examples/data/prmsl.2008.nc                    |    Bin 8994260 -> 0 bytes
 examples/data/prmsl.2009.nc                    |    Bin 8974678 -> 0 bytes
 examples/data/prmsl.2010.nc                    |    Bin 8970732 -> 0 bytes
 examples/data/prmsl.2011.nc                    |    Bin 8976285 -> 0 bytes
 examples/data/rtofs_glo_3dz_f006_6hrly_reg3.nc |    Bin 30027329 -> 0 bytes
 examples/json_att.py                           |     24 +
 examples/subset.py                             |     15 +
 examples/test_stringarr.py                     |      2 +-
 examples/threaded_read.py                      |      2 +-
 examples/tutorial.py                           |     17 +-
 constants.pyx => include/constants.pyx         |      0
 netCDF4.pxi => include/netCDF4.pxi             |      1 +
 man/nc3tonc4.1                                 |     78 +
 man/nc4tonc3.1                                 |     45 +
 man/ncinfo.1                                   |     44 +
 netCDF4/__init__.py                            |      8 +
 netCDF4.c => netCDF4/_netCDF4.c                | 105288 +++++++++++-----------
 netCDF4.pyx => netCDF4/_netCDF4.pyx            |   1712 +-
 netCDF4/utils.py                               |    911 +
 netCDF4_utils.py                               |    404 -
 netcdftime/__init__.py                         |      2 +
 netcdftime/_datetime.c                         |     18 +-
 netcdftime/netcdftime.py                       |     40 +-
 ports/README                                   |     14 -
 ports/python/py-netcdf4/Portfile               |     28 -
 setup.cfg                                      |      2 +
 setup.cfg.template                             |      2 +
 setup.py                                       |     72 +-
 test/tst_atts.py                               |      2 +-
 test/tst_compoundvar.py                        |      2 +-
 test/tst_compression.py                        |      3 +-
 test/tst_dims.py                               |      4 +-
 test/tst_diskless.py                           |      4 +-
 test/tst_grps2.py                              |     44 +
 test/tst_masked.py                             |      6 +
 test/tst_masked2.py                            |      8 +-
 test/tst_slicing.py                            |      1 +
 test/tst_unlimdim.py                           |      6 +-
 test/tst_utils.py                              |     72 +-
 test/tst_vars.py                               |      6 +-
 test/tst_vlen.py                               |      4 +-
 utils.pyx                                      |    815 -
 utils/nc3tonc4                                 |    280 +-
 utils/nc4tonc3                                 |    127 +-
 utils/ncinfo                                   |     82 +-
 82 files changed, 57367 insertions(+), 55382 deletions(-)

diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 567609b..0000000
--- a/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-build/
diff --git a/.travis.yml b/.travis.yml
index 232a5a5..ec158e9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,13 +1,26 @@
 language: python
+env:
+    global:
+        - DEPENDS="numpy cython"
 python:
   - "2.7"
   - "3.3"
   - "3.4"
+matrix:
+  include:
+    # Absolute minimum dependencies
+    - python: 2.7
+      env:
+        - DEPENDS="numpy==1.7.0 cython==0.19"
+    # test without Cython installed
+    - python: 2.7
+      env:
+        - DEPENDS="numpy"
 notifications:
   email: false
 before_install:
   - sudo apt-get install libhdf5-serial-dev netcdf-bin libnetcdf-dev
-  - pip install numpy cython python-dateutil
+  - pip install $DEPENDS
 install:
   - python setup.py build
   - python setup.py install
diff --git a/Changelog b/Changelog
index 7b087aa..3595e0a 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,51 @@
+ version 1.1.8 (tag v1.1.8rel)
+ =============================
+ * v[...] now returns a numpy scalar array (not just a scalar) when
+   v is a scalar netcdf variable (issue #413).
+ * unix-like paths can now be used in createVariable and createGroup.
+   v = nc.createVariable('/path/to/var1',('xdim','ydim'),float)
+   will create a Variable named 'var1', while also creating the Groups
+   'path' and 'path/to' if they do not already exist.
+   Similarly, g = nc.createGroup('/path/to') acts like 'mkdir -p' in unix, creating
+   the Groups 'path' and '/path/to', if they don't already exist.
+   Users who relied on nc.createGroup(groupname) failing when the
+   group already exists will have to modify their code, since nc.createGroup
+   will now return the existing group instance.
+   Dataset.__getitem__ also added.  nc['/path/to'] returns
+   a Group instance, and nc['/path/to/var1'] returns a Variable
+   instance.  
+ * change minimum required numpy to 1.7.0, fix so all tests pass with 1.7.0.
+   Added travis tests for minimum required cython, numpy (issue #404).
+ * enable abbreviations to time units specification, as allowed in CF (issue
+   #402). Now, instead of just 'seconds' and 'seconds', 'secs', 'sec' and 's'
+   are also allowed (similar to minutes, days and hours).
+ * install utility scripts in utils directory with setuptools entry points 
+   (pull request #392 from @mindw).  Code for utilities moved
+   to netCDF4_utils.py - makes utilities more windows-friendly.
+ * make sure booleans are treated correctly in setup.cfg. Add
+   use_cython (default True) to setup.cfg.  If set to False, then
+   cython will not be used to compile netCDF4.pyx (existing netCDF4.c 
+   will be used instead).
+ * use "from Cython.Build import cythonize" instead of
+   "from Cython.Distutils import build_ext" in setup.py (issue #393)
+   to conform to new cython build mechanism (CEP 201, described at
+   https://github.com/cython/cython/wiki/enhancements-distutils_preprocessing).
+ * unicode attributes now written as strings, not bytes (using
+   nc_put_att_string instead of nc_put_att_text, issue #388).
+ * add __orthogonal_indexing__ attribute to Variable, Dataset and Group (issue #385) to 
+   denote that Variable objects do not follow numpy indexing semantics for integer and
+   boolean array indices. 
+ * make sure application of scale_factor and add_offset works correctly when
+   scale_factor not given (issue #381).
+ * add man pages for nc3tonc4, nc4tonc3, ncinfo in man directory.
+   Not installed by setup.py (contributed by Ross Gammon, issue #383).
+ * replace tabs with spaces by running reindent.py on all *.py and *.pyx files
+   (issue #378).
+ * refactor netCDF4_utils and netCDF4 module into netCDF4 package.
+   Refactoring effectively removes netCDF4 utils private attributes from
+   netCDF4 namespace, so has the potential to break code using private
+   attributes (issue #409).
+
  version 1.1.7 (tag v1.1.7rel)
  =============================
  * check to make sure cython >= 0.19 is available before trying
diff --git a/MANIFEST.in b/MANIFEST.in
index 954750f..0c02bd1 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,20 +1,15 @@
 recursive-include docs *
-recursive-include ports *
+recursive-include man *
+recursive-include include *
 include MANIFEST.in
 include README.md
-include README.macosx
 include COPYING
 include Changelog
 include setup.cfg
 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 examples/*ipynb
+include examples/README.md
 include test/*py
 include utils/nc3tonc4
 include utils/nc4tonc3
diff --git a/README.macosx b/README.macosx
deleted file mode 100644
index 34e443e..0000000
--- a/README.macosx
+++ /dev/null
@@ -1,18 +0,0 @@
-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
index 0349931..a3ecee8 100644
--- a/README.md
+++ b/README.md
@@ -1,53 +1,53 @@
-netcdf4-python
-==============
-
-[python](http://python.org)/[numpy](http://numpy.org) interface to the netCDF [C library](https://github.com/Unidata/netcdf-c).
+# netcdf4-python
+[Python](http://python.org)/[numpy](http://numpy.org) interface to the netCDF [C library](https://github.com/Unidata/netcdf-c).
 
 [![Build Status](https://travis-ci.org/Unidata/netcdf4-python.svg?branch=master)](https://travis-ci.org/Unidata/netcdf4-python)
 [![PyPI package](https://badge.fury.io/py/netCDF4.svg)](http://python.org/pypi/netCDF4)
 
-News
-----
-
+## News
 For the latest updates, see the [Changelog](https://github.com/Unidata/netcdf4-python/blob/master/Changelog).
 
+5/14/2015: Version 1.1.8 released. Unix-like paths can now be used in `createVariable` and `createGroup`.
+
+    v = nc.createVariable('/path/to/var1',('xdim','ydim'),float)
+
+will create a variable named 'var1', while also creating the groups
+'path' and 'path/to' if they do not already exist.
+
+Similarly, 
+
+    g = nc.createGroup('/path/to') 
+
+now acts like `mkdir -p` in unix, creating groups 'path' and '/path/to',
+if they don't already exist. Users who relied on `nc.createGroup(groupname)`
+failing when the group already exists will have to modify their code, since 
+`nc.createGroup` will now return the existing group instance.
+`Dataset.__getitem__` was also added.  `nc['/path/to']`
+now returns a group instance, and `nc['/path/to/var1']` now returns a variable instance.
+
 3/19/2015: Version 1.1.7 released.  Global Interpreter Lock (GIL) now released when extension
 module calls C library for read operations.  This speeds up concurrent reads when using threads.
 Users who wish to use netcdf4-python inside threads should read http://www.hdfgroup.org/hdf5-quest.html#gconc 
-regarding thread-safety in the HDF5 C library.  Fixes to setup.py now ensure that `pip install netCDF4`
-with `export USE_NCCONFIG=1` will use environment variables to find paths to libraries and include files,
+regarding thread-safety in the HDF5 C library.  Fixes to `setup.py` now ensure that `pip install netCDF4`
+with `export USE_NCCONFIG=0` will use environment variables to find paths to libraries and include files,
 instead of relying exclusively on the nc-config utility.
 
-3/8/2015: Version 1.1.6 released.  Minor bug fixes for regressions introduced in 1.1.5, 
-including incorrect handling of UTC offsets in units string by date2num/num2date. 
-Datetime instances returned by num2date are now time-zone naive, so python-dateutil
-is no longer required.
-
-3/1/2015: Version 1.1.5 released.  Significant improvements to netcdftime and 
-num2date/date2num - accuracy is now between a millisecond and a microsecond depending
-on the time interval and calendar used. `use_ncconfig=True` is now the default
-in setup.py, so the utility nc-config is used to find the library and
-include file paths.  
-
-Quick Start
------------
-
-* clone github repository, or get source tarball (or Windows binary installers) from
-  [PyPI](https://pypi.python.org/pypi/netCDF4).
+## Quick Start
+* Clone GitHub repository (`git clone https://github.com/Unidata/netcdf4-python.git`), or get source tarball (or Windows binary installers) from [PyPI](https://pypi.python.org/pypi/netCDF4) (`pip install netCDF4`).
 
-* make sure numpy and (required) and Cython (recommended) are
-  installed and you have python 2.5 or newer.
+* Make sure [numpy](http://www.numpy.org/) (required) and [Cython](http://cython.org/) (recommended) are
+  installed and you have [Python](https://www.python.org) 2.5 or newer.
 
-* make sure HDF5 and netcdf-4 are installed, and the nc-config utility
-  is in your Unix PATH. If setup.cfg does not exist, copy setup.cfg.template
-  to setup.cfg, and make sure the line with `use_ncconfig=True` is 
-  un-commented.
+* Make sure [HDF5](http://www.h5py.org/) and netcdf-4 are installed, and the `nc-config` utility
+  is in your Unix PATH. If `setup.cfg` does not exist, copy `setup.cfg.template`
+  to `setup.cfg`, and make sure the line with `use_ncconfig=True` is un-commented.
 
-* run `python setup.py build`, then `python setup.py install` (with sudo
-  if necessary).
+* 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`.
+* To run all the tests, execute `cd test && python run_all.py`.
 
+## Documentation
 See the online [docs](http://unidata.github.io/netcdf4-python) for more details.
 
-Sample ipython notebooks available in the examples directory on [reading](http://nbviewer.ipython.org/github/Unidata/netcdf4-python/blob/master/examples/reading_netCDF.ipynb) and [writing](http://nbviewer.ipython.org/github/Unidata/netcdf4-python/blob/master/examples/writing_netCDF.ipynb) netcdf data with python.
+## Usage
+###### Sample [iPython](http://ipython.org/) notebooks available in the examples directory on [reading](http://nbviewer.ipython.org/github/Unidata/netcdf4-python/blob/master/examples/reading_netCDF.ipynb) and [writing](http://nbviewer.ipython.org/github/Unidata/netcdf4-python/blob/master/examples/writing_netCDF.ipynb) netCDF data with Python.
diff --git a/create_docs.sh b/create_docs.sh
index 9fa1ae1..e2ae30d 100644
--- a/create_docs.sh
+++ b/create_docs.sh
@@ -1,2 +1,2 @@
 # svn propset svn:mime-type text/html docs/*html
-epydoc -v --no-frames --no-private --introspect-only -o docs netCDF4 
+epydoc -v --no-frames --no-private --introspect-only --name netcdf4-python -o docs netCDF4._netCDF4
diff --git a/docs/api-objects.txt b/docs/api-objects.txt
index 598004f..be91bd3 100644
--- a/docs/api-objects.txt
+++ b/docs/api-objects.txt
@@ -1,272 +1,285 @@
-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.MINYEAR	netCDF4-module.html#MINYEAR
-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.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.date2index	netCDF4-module.html#date2index
-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.Dataset.variables	netCDF4.Dataset-class.html#variables
-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.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.MFDataset.__repr__	netCDF4.MFDataset-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
+netCDF4._netCDF4	netCDF4._netCDF4-module.html
+netCDF4._netCDF4._set_default_format	netCDF4._netCDF4-module.html#_set_default_format
+netCDF4._netCDF4.hr_units	netCDF4._netCDF4-module.html#hr_units
+netCDF4._netCDF4.default_encoding	netCDF4._netCDF4-module.html#default_encoding
+netCDF4._netCDF4.num2date	netCDF4._netCDF4-module.html#num2date
+netCDF4._netCDF4.is_native_big	netCDF4._netCDF4-module.html#is_native_big
+netCDF4._netCDF4.microsec_units	netCDF4._netCDF4-module.html#microsec_units
+netCDF4._netCDF4._private_atts	netCDF4._netCDF4-module.html#_private_atts
+netCDF4._netCDF4.day_units	netCDF4._netCDF4-module.html#day_units
+netCDF4._netCDF4.MINYEAR	netCDF4._netCDF4-module.html#MINYEAR
+netCDF4._netCDF4._gethdf5libversion	netCDF4._netCDF4-module.html#_gethdf5libversion
+netCDF4._netCDF4.__has_nc_inq_format_extended__	netCDF4._netCDF4-module.html#__has_nc_inq_format_extended__
+netCDF4._netCDF4.__package__	netCDF4._netCDF4-module.html#__package__
+netCDF4._netCDF4.stringtochar	netCDF4._netCDF4-module.html#stringtochar
+netCDF4._netCDF4.chartostring	netCDF4._netCDF4-module.html#chartostring
+netCDF4._netCDF4.getlibversion	netCDF4._netCDF4-module.html#getlibversion
+netCDF4._netCDF4.__netcdf4libversion__	netCDF4._netCDF4-module.html#__netcdf4libversion__
+netCDF4._netCDF4.sec_units	netCDF4._netCDF4-module.html#sec_units
+netCDF4._netCDF4.__has_nc_inq_path__	netCDF4._netCDF4-module.html#__has_nc_inq_path__
+netCDF4._netCDF4.date2num	netCDF4._netCDF4-module.html#date2num
+netCDF4._netCDF4.millisec_units	netCDF4._netCDF4-module.html#millisec_units
+netCDF4._netCDF4.stringtoarr	netCDF4._netCDF4-module.html#stringtoarr
+netCDF4._netCDF4._value	netCDF4._netCDF4-module.html#_value
+netCDF4._netCDF4._nptonctype	netCDF4._netCDF4-module.html#_nptonctype
+netCDF4._netCDF4.date2index	netCDF4._netCDF4-module.html#date2index
+netCDF4._netCDF4.gregorian	netCDF4._netCDF4-module.html#gregorian
+netCDF4._netCDF4.is_native_little	netCDF4._netCDF4-module.html#is_native_little
+netCDF4._netCDF4.python3	netCDF4._netCDF4-module.html#python3
+netCDF4._netCDF4._dateparse	netCDF4._netCDF4-module.html#_dateparse
+netCDF4._netCDF4._supportedtypes	netCDF4._netCDF4-module.html#_supportedtypes
+netCDF4._netCDF4.NC_DISKLESS	netCDF4._netCDF4-module.html#NC_DISKLESS
+netCDF4._netCDF4._key	netCDF4._netCDF4-module.html#_key
+netCDF4._netCDF4.default_fillvals	netCDF4._netCDF4-module.html#default_fillvals
+netCDF4._netCDF4._nctonptype	netCDF4._netCDF4-module.html#_nctonptype
+netCDF4._netCDF4.__has_rename_grp__	netCDF4._netCDF4-module.html#__has_rename_grp__
+netCDF4._netCDF4._npversion	netCDF4._netCDF4-module.html#_npversion
+netCDF4._netCDF4.__hdf5libversion__	netCDF4._netCDF4-module.html#__hdf5libversion__
+netCDF4._netCDF4.min_units	netCDF4._netCDF4-module.html#min_units
+netCDF4._netCDF4.unicode_error	netCDF4._netCDF4-module.html#unicode_error
+netCDF4._netCDF4.CompoundType	netCDF4._netCDF4.CompoundType-class.html
+netCDF4._netCDF4.CompoundType.__new__	netCDF4._netCDF4.CompoundType-class.html#__new__
+netCDF4._netCDF4.CompoundType.dtype	netCDF4._netCDF4.CompoundType-class.html#dtype
+netCDF4._netCDF4.CompoundType._nc_type	netCDF4._netCDF4.CompoundType-class.html#_nc_type
+netCDF4._netCDF4.CompoundType.__repr__	netCDF4._netCDF4.CompoundType-class.html#__repr__
+netCDF4._netCDF4.CompoundType.__init__	netCDF4._netCDF4.CompoundType-class.html#__init__
+netCDF4._netCDF4.CompoundType.__unicode__	netCDF4._netCDF4.CompoundType-class.html#__unicode__
+netCDF4._netCDF4.CompoundType.name	netCDF4._netCDF4.CompoundType-class.html#name
+netCDF4._netCDF4.Dataset	netCDF4._netCDF4.Dataset-class.html
+netCDF4._netCDF4.Dataset._enddef	netCDF4._netCDF4.Dataset-class.html#_enddef
+netCDF4._netCDF4.Dataset.variables	netCDF4._netCDF4.Dataset-class.html#variables
+netCDF4._netCDF4.Dataset.__getattribute__	netCDF4._netCDF4.Dataset-class.html#__getattribute__
+netCDF4._netCDF4.Dataset.sync	netCDF4._netCDF4.Dataset-class.html#sync
+netCDF4._netCDF4.Dataset.createCompoundType	netCDF4._netCDF4.Dataset-class.html#createCompoundType
+netCDF4._netCDF4.Dataset.set_auto_maskandscale	netCDF4._netCDF4.Dataset-class.html#set_auto_maskandscale
+netCDF4._netCDF4.Dataset.close	netCDF4._netCDF4.Dataset-class.html#close
+netCDF4._netCDF4.Dataset._isopen	netCDF4._netCDF4.Dataset-class.html#_isopen
+netCDF4._netCDF4.Dataset.getncattr	netCDF4._netCDF4.Dataset-class.html#getncattr
+netCDF4._netCDF4.Dataset.__init__	netCDF4._netCDF4.Dataset-class.html#__init__
+netCDF4._netCDF4.Dataset.__setattr__	netCDF4._netCDF4.Dataset-class.html#__setattr__
+netCDF4._netCDF4.Dataset.__new__	netCDF4._netCDF4.Dataset-class.html#__new__
+netCDF4._netCDF4.Dataset.set_fill_on	netCDF4._netCDF4.Dataset-class.html#set_fill_on
+netCDF4._netCDF4.Dataset.filepath	netCDF4._netCDF4.Dataset-class.html#filepath
+netCDF4._netCDF4.Dataset.createVariable	netCDF4._netCDF4.Dataset-class.html#createVariable
+netCDF4._netCDF4.Dataset.__enter__	netCDF4._netCDF4.Dataset-class.html#__enter__
+netCDF4._netCDF4.Dataset.disk_format	netCDF4._netCDF4.Dataset-class.html#disk_format
+netCDF4._netCDF4.Dataset.__getattr__	netCDF4._netCDF4.Dataset-class.html#__getattr__
+netCDF4._netCDF4.Dataset.set_auto_mask	netCDF4._netCDF4.Dataset-class.html#set_auto_mask
+netCDF4._netCDF4.Dataset.__unicode__	netCDF4._netCDF4.Dataset-class.html#__unicode__
+netCDF4._netCDF4.Dataset._redef	netCDF4._netCDF4.Dataset-class.html#_redef
+netCDF4._netCDF4.Dataset.setncatts	netCDF4._netCDF4.Dataset-class.html#setncatts
+netCDF4._netCDF4.Dataset.setncattr	netCDF4._netCDF4.Dataset-class.html#setncattr
+netCDF4._netCDF4.Dataset.cmptypes	netCDF4._netCDF4.Dataset-class.html#cmptypes
+netCDF4._netCDF4.Dataset.set_fill_off	netCDF4._netCDF4.Dataset-class.html#set_fill_off
+netCDF4._netCDF4.Dataset.renameGroup	netCDF4._netCDF4.Dataset-class.html#renameGroup
+netCDF4._netCDF4.Dataset.vltypes	netCDF4._netCDF4.Dataset-class.html#vltypes
+netCDF4._netCDF4.Dataset.ncattrs	netCDF4._netCDF4.Dataset-class.html#ncattrs
+netCDF4._netCDF4.Dataset.__exit__	netCDF4._netCDF4.Dataset-class.html#__exit__
+netCDF4._netCDF4.Dataset.renameAttribute	netCDF4._netCDF4.Dataset-class.html#renameAttribute
+netCDF4._netCDF4.Dataset.parent	netCDF4._netCDF4.Dataset-class.html#parent
+netCDF4._netCDF4.Dataset.createVLType	netCDF4._netCDF4.Dataset-class.html#createVLType
+netCDF4._netCDF4.Dataset.keepweakref	netCDF4._netCDF4.Dataset-class.html#keepweakref
+netCDF4._netCDF4.Dataset.renameDimension	netCDF4._netCDF4.Dataset-class.html#renameDimension
+netCDF4._netCDF4.Dataset.groups	netCDF4._netCDF4.Dataset-class.html#groups
+netCDF4._netCDF4.Dataset.path	netCDF4._netCDF4.Dataset-class.html#path
+netCDF4._netCDF4.Dataset.delncattr	netCDF4._netCDF4.Dataset-class.html#delncattr
+netCDF4._netCDF4.Dataset.dimensions	netCDF4._netCDF4.Dataset-class.html#dimensions
+netCDF4._netCDF4.Dataset.set_auto_scale	netCDF4._netCDF4.Dataset-class.html#set_auto_scale
+netCDF4._netCDF4.Dataset.file_format	netCDF4._netCDF4.Dataset-class.html#file_format
+netCDF4._netCDF4.Dataset.renameVariable	netCDF4._netCDF4.Dataset-class.html#renameVariable
+netCDF4._netCDF4.Dataset._grpid	netCDF4._netCDF4.Dataset-class.html#_grpid
+netCDF4._netCDF4.Dataset.__delattr__	netCDF4._netCDF4.Dataset-class.html#__delattr__
+netCDF4._netCDF4.Dataset.__getitem__	netCDF4._netCDF4.Dataset-class.html#__getitem__
+netCDF4._netCDF4.Dataset.data_model	netCDF4._netCDF4.Dataset-class.html#data_model
+netCDF4._netCDF4.Dataset.__repr__	netCDF4._netCDF4.Dataset-class.html#__repr__
+netCDF4._netCDF4.Dataset.createGroup	netCDF4._netCDF4.Dataset-class.html#createGroup
+netCDF4._netCDF4.Dataset.createDimension	netCDF4._netCDF4.Dataset-class.html#createDimension
+netCDF4._netCDF4.Dataset.__orthogonal_indexing__	netCDF4._netCDF4.Dataset-class.html#__orthogonal_indexing__
+netCDF4._netCDF4.Dimension	netCDF4._netCDF4.Dimension-class.html
+netCDF4._netCDF4.Dimension.isunlimited	netCDF4._netCDF4.Dimension-class.html#isunlimited
+netCDF4._netCDF4.Dimension.__init__	netCDF4._netCDF4.Dimension-class.html#__init__
+netCDF4._netCDF4.Dimension.group	netCDF4._netCDF4.Dimension-class.html#group
+netCDF4._netCDF4.Dimension.__new__	netCDF4._netCDF4.Dimension-class.html#__new__
+netCDF4._netCDF4.Dimension.__len__	netCDF4._netCDF4.Dimension-class.html#__len__
+netCDF4._netCDF4.Dimension._dimid	netCDF4._netCDF4.Dimension-class.html#_dimid
+netCDF4._netCDF4.Dimension.__unicode__	netCDF4._netCDF4.Dimension-class.html#__unicode__
+netCDF4._netCDF4.Dimension._grp	netCDF4._netCDF4.Dimension-class.html#_grp
+netCDF4._netCDF4.Dimension.name	netCDF4._netCDF4.Dimension-class.html#name
+netCDF4._netCDF4.Dimension._data_model	netCDF4._netCDF4.Dimension-class.html#_data_model
+netCDF4._netCDF4.Dimension._grpid	netCDF4._netCDF4.Dimension-class.html#_grpid
+netCDF4._netCDF4.Dimension._name	netCDF4._netCDF4.Dimension-class.html#_name
+netCDF4._netCDF4.Dimension.__repr__	netCDF4._netCDF4.Dimension-class.html#__repr__
+netCDF4._netCDF4.Dimension._getname	netCDF4._netCDF4.Dimension-class.html#_getname
+netCDF4._netCDF4.Group	netCDF4._netCDF4.Group-class.html
+netCDF4._netCDF4.Dataset._enddef	netCDF4._netCDF4.Dataset-class.html#_enddef
+netCDF4._netCDF4.Dataset.renameVariable	netCDF4._netCDF4.Dataset-class.html#renameVariable
+netCDF4._netCDF4.Dataset.variables	netCDF4._netCDF4.Dataset-class.html#variables
+netCDF4._netCDF4.Dataset.__getattribute__	netCDF4._netCDF4.Dataset-class.html#__getattribute__
+netCDF4._netCDF4.Dataset.sync	netCDF4._netCDF4.Dataset-class.html#sync
+netCDF4._netCDF4.Dataset.createCompoundType	netCDF4._netCDF4.Dataset-class.html#createCompoundType
+netCDF4._netCDF4.Dataset.set_auto_maskandscale	netCDF4._netCDF4.Dataset-class.html#set_auto_maskandscale
+netCDF4._netCDF4.Group.close	netCDF4._netCDF4.Group-class.html#close
+netCDF4._netCDF4.Dataset._isopen	netCDF4._netCDF4.Dataset-class.html#_isopen
+netCDF4._netCDF4.Group.__init__	netCDF4._netCDF4.Group-class.html#__init__
+netCDF4._netCDF4.Dataset.__setattr__	netCDF4._netCDF4.Dataset-class.html#__setattr__
+netCDF4._netCDF4.Group.__new__	netCDF4._netCDF4.Group-class.html#__new__
+netCDF4._netCDF4.Dataset.filepath	netCDF4._netCDF4.Dataset-class.html#filepath
+netCDF4._netCDF4.Dataset.createVariable	netCDF4._netCDF4.Dataset-class.html#createVariable
+netCDF4._netCDF4.Dataset.__enter__	netCDF4._netCDF4.Dataset-class.html#__enter__
+netCDF4._netCDF4.Dataset.disk_format	netCDF4._netCDF4.Dataset-class.html#disk_format
+netCDF4._netCDF4.Dataset.file_format	netCDF4._netCDF4.Dataset-class.html#file_format
+netCDF4._netCDF4.Dataset.__getattr__	netCDF4._netCDF4.Dataset-class.html#__getattr__
+netCDF4._netCDF4.Dataset.set_auto_mask	netCDF4._netCDF4.Dataset-class.html#set_auto_mask
+netCDF4._netCDF4.Dataset._redef	netCDF4._netCDF4.Dataset-class.html#_redef
+netCDF4._netCDF4.Dataset.setncatts	netCDF4._netCDF4.Dataset-class.html#setncatts
+netCDF4._netCDF4.Dataset.setncattr	netCDF4._netCDF4.Dataset-class.html#setncattr
+netCDF4._netCDF4.Dataset.set_fill_off	netCDF4._netCDF4.Dataset-class.html#set_fill_off
+netCDF4._netCDF4.Dataset.renameGroup	netCDF4._netCDF4.Dataset-class.html#renameGroup
+netCDF4._netCDF4.Dataset.vltypes	netCDF4._netCDF4.Dataset-class.html#vltypes
+netCDF4._netCDF4.Dataset.ncattrs	netCDF4._netCDF4.Dataset-class.html#ncattrs
+netCDF4._netCDF4.Dataset.__exit__	netCDF4._netCDF4.Dataset-class.html#__exit__
+netCDF4._netCDF4.Dataset.renameAttribute	netCDF4._netCDF4.Dataset-class.html#renameAttribute
+netCDF4._netCDF4.Dataset.parent	netCDF4._netCDF4.Dataset-class.html#parent
+netCDF4._netCDF4.Dataset.__getitem__	netCDF4._netCDF4.Dataset-class.html#__getitem__
+netCDF4._netCDF4.Dataset.delncattr	netCDF4._netCDF4.Dataset-class.html#delncattr
+netCDF4._netCDF4.Dataset.keepweakref	netCDF4._netCDF4.Dataset-class.html#keepweakref
+netCDF4._netCDF4.Dataset.getncattr	netCDF4._netCDF4.Dataset-class.html#getncattr
+netCDF4._netCDF4.Dataset.groups	netCDF4._netCDF4.Dataset-class.html#groups
+netCDF4._netCDF4.Dataset.path	netCDF4._netCDF4.Dataset-class.html#path
+netCDF4._netCDF4.Dataset.__unicode__	netCDF4._netCDF4.Dataset-class.html#__unicode__
+netCDF4._netCDF4.Dataset.dimensions	netCDF4._netCDF4.Dataset-class.html#dimensions
+netCDF4._netCDF4.Group.name	netCDF4._netCDF4.Group-class.html#name
+netCDF4._netCDF4.Dataset.cmptypes	netCDF4._netCDF4.Dataset-class.html#cmptypes
+netCDF4._netCDF4.Dataset.set_auto_scale	netCDF4._netCDF4.Dataset-class.html#set_auto_scale
+netCDF4._netCDF4.Dataset.renameDimension	netCDF4._netCDF4.Dataset-class.html#renameDimension
+netCDF4._netCDF4.Dataset._grpid	netCDF4._netCDF4.Dataset-class.html#_grpid
+netCDF4._netCDF4.Dataset.__delattr__	netCDF4._netCDF4.Dataset-class.html#__delattr__
+netCDF4._netCDF4.Dataset.set_fill_on	netCDF4._netCDF4.Dataset-class.html#set_fill_on
+netCDF4._netCDF4.Dataset.data_model	netCDF4._netCDF4.Dataset-class.html#data_model
+netCDF4._netCDF4.Dataset.__repr__	netCDF4._netCDF4.Dataset-class.html#__repr__
+netCDF4._netCDF4.Dataset.createVLType	netCDF4._netCDF4.Dataset-class.html#createVLType
+netCDF4._netCDF4.Dataset.createGroup	netCDF4._netCDF4.Dataset-class.html#createGroup
+netCDF4._netCDF4.Dataset.createDimension	netCDF4._netCDF4.Dataset-class.html#createDimension
+netCDF4._netCDF4.Group._getname	netCDF4._netCDF4.Group-class.html#_getname
+netCDF4._netCDF4.Dataset.__orthogonal_indexing__	netCDF4._netCDF4.Dataset-class.html#__orthogonal_indexing__
+netCDF4._netCDF4.MFDataset	netCDF4._netCDF4.MFDataset-class.html
+netCDF4._netCDF4.Dataset._enddef	netCDF4._netCDF4.Dataset-class.html#_enddef
+netCDF4._netCDF4.Dataset.renameVariable	netCDF4._netCDF4.Dataset-class.html#renameVariable
+netCDF4._netCDF4.Dataset.variables	netCDF4._netCDF4.Dataset-class.html#variables
+netCDF4._netCDF4.MFDataset.__getattribute__	netCDF4._netCDF4.MFDataset-class.html#__getattribute__
+netCDF4._netCDF4.Dataset.sync	netCDF4._netCDF4.Dataset-class.html#sync
+netCDF4._netCDF4.Dataset.createCompoundType	netCDF4._netCDF4.Dataset-class.html#createCompoundType
+netCDF4._netCDF4.Dataset.set_auto_maskandscale	netCDF4._netCDF4.Dataset-class.html#set_auto_maskandscale
+netCDF4._netCDF4.MFDataset.close	netCDF4._netCDF4.MFDataset-class.html#close
+netCDF4._netCDF4.Dataset._isopen	netCDF4._netCDF4.Dataset-class.html#_isopen
+netCDF4._netCDF4.MFDataset.__init__	netCDF4._netCDF4.MFDataset-class.html#__init__
+netCDF4._netCDF4.MFDataset.__setattr__	netCDF4._netCDF4.MFDataset-class.html#__setattr__
+netCDF4._netCDF4.Dataset.__new__	netCDF4._netCDF4.Dataset-class.html#__new__
+netCDF4._netCDF4.Dataset.filepath	netCDF4._netCDF4.Dataset-class.html#filepath
+netCDF4._netCDF4.Dataset.createVariable	netCDF4._netCDF4.Dataset-class.html#createVariable
+netCDF4._netCDF4.Dataset.__enter__	netCDF4._netCDF4.Dataset-class.html#__enter__
+netCDF4._netCDF4.Dataset.disk_format	netCDF4._netCDF4.Dataset-class.html#disk_format
+netCDF4._netCDF4.Dataset.file_format	netCDF4._netCDF4.Dataset-class.html#file_format
+netCDF4._netCDF4.Dataset.__getattr__	netCDF4._netCDF4.Dataset-class.html#__getattr__
+netCDF4._netCDF4.Dataset.set_auto_mask	netCDF4._netCDF4.Dataset-class.html#set_auto_mask
+netCDF4._netCDF4.Dataset._redef	netCDF4._netCDF4.Dataset-class.html#_redef
+netCDF4._netCDF4.Dataset.setncatts	netCDF4._netCDF4.Dataset-class.html#setncatts
+netCDF4._netCDF4.Dataset.setncattr	netCDF4._netCDF4.Dataset-class.html#setncattr
+netCDF4._netCDF4.Dataset.set_fill_off	netCDF4._netCDF4.Dataset-class.html#set_fill_off
+netCDF4._netCDF4.Dataset.renameGroup	netCDF4._netCDF4.Dataset-class.html#renameGroup
+netCDF4._netCDF4.Dataset.vltypes	netCDF4._netCDF4.Dataset-class.html#vltypes
+netCDF4._netCDF4.MFDataset.ncattrs	netCDF4._netCDF4.MFDataset-class.html#ncattrs
+netCDF4._netCDF4.Dataset.__exit__	netCDF4._netCDF4.Dataset-class.html#__exit__
+netCDF4._netCDF4.Dataset.renameAttribute	netCDF4._netCDF4.Dataset-class.html#renameAttribute
+netCDF4._netCDF4.Dataset.parent	netCDF4._netCDF4.Dataset-class.html#parent
+netCDF4._netCDF4.Dataset.__getitem__	netCDF4._netCDF4.Dataset-class.html#__getitem__
+netCDF4._netCDF4.Dataset.delncattr	netCDF4._netCDF4.Dataset-class.html#delncattr
+netCDF4._netCDF4.Dataset.keepweakref	netCDF4._netCDF4.Dataset-class.html#keepweakref
+netCDF4._netCDF4.Dataset.getncattr	netCDF4._netCDF4.Dataset-class.html#getncattr
+netCDF4._netCDF4.Dataset.groups	netCDF4._netCDF4.Dataset-class.html#groups
+netCDF4._netCDF4.Dataset.path	netCDF4._netCDF4.Dataset-class.html#path
+netCDF4._netCDF4.Dataset.__unicode__	netCDF4._netCDF4.Dataset-class.html#__unicode__
+netCDF4._netCDF4.Dataset.dimensions	netCDF4._netCDF4.Dataset-class.html#dimensions
+netCDF4._netCDF4.Dataset.cmptypes	netCDF4._netCDF4.Dataset-class.html#cmptypes
+netCDF4._netCDF4.Dataset.set_auto_scale	netCDF4._netCDF4.Dataset-class.html#set_auto_scale
+netCDF4._netCDF4.Dataset.renameDimension	netCDF4._netCDF4.Dataset-class.html#renameDimension
+netCDF4._netCDF4.Dataset._grpid	netCDF4._netCDF4.Dataset-class.html#_grpid
+netCDF4._netCDF4.MFDataset.__qualname__	netCDF4._netCDF4.MFDataset-class.html#__qualname__
+netCDF4._netCDF4.Dataset.__delattr__	netCDF4._netCDF4.Dataset-class.html#__delattr__
+netCDF4._netCDF4.Dataset.set_fill_on	netCDF4._netCDF4.Dataset-class.html#set_fill_on
+netCDF4._netCDF4.Dataset.data_model	netCDF4._netCDF4.Dataset-class.html#data_model
+netCDF4._netCDF4.MFDataset.__repr__	netCDF4._netCDF4.MFDataset-class.html#__repr__
+netCDF4._netCDF4.Dataset.createVLType	netCDF4._netCDF4.Dataset-class.html#createVLType
+netCDF4._netCDF4.Dataset.createGroup	netCDF4._netCDF4.Dataset-class.html#createGroup
+netCDF4._netCDF4.Dataset.createDimension	netCDF4._netCDF4.Dataset-class.html#createDimension
+netCDF4._netCDF4.Dataset.__orthogonal_indexing__	netCDF4._netCDF4.Dataset-class.html#__orthogonal_indexing__
+netCDF4._netCDF4.MFTime	netCDF4._netCDF4.MFTime-class.html
+netCDF4._netCDF4.MFTime.__init__	netCDF4._netCDF4.MFTime-class.html#__init__
+netCDF4._netCDF4.MFTime.__getitem__	netCDF4._netCDF4.MFTime-class.html#__getitem__
+netCDF4._netCDF4.MFTime.__qualname__	netCDF4._netCDF4.MFTime-class.html#__qualname__
+netCDF4._netCDF4.VLType	netCDF4._netCDF4.VLType-class.html
+netCDF4._netCDF4.VLType.__new__	netCDF4._netCDF4.VLType-class.html#__new__
+netCDF4._netCDF4.VLType.dtype	netCDF4._netCDF4.VLType-class.html#dtype
+netCDF4._netCDF4.VLType._nc_type	netCDF4._netCDF4.VLType-class.html#_nc_type
+netCDF4._netCDF4.VLType.__repr__	netCDF4._netCDF4.VLType-class.html#__repr__
+netCDF4._netCDF4.VLType.__init__	netCDF4._netCDF4.VLType-class.html#__init__
+netCDF4._netCDF4.VLType.__unicode__	netCDF4._netCDF4.VLType-class.html#__unicode__
+netCDF4._netCDF4.VLType.name	netCDF4._netCDF4.VLType-class.html#name
+netCDF4._netCDF4.Variable	netCDF4._netCDF4.Variable-class.html
+netCDF4._netCDF4.Variable.ndim	netCDF4._netCDF4.Variable-class.html#ndim
+netCDF4._netCDF4.Variable.dtype	netCDF4._netCDF4.Variable-class.html#dtype
+netCDF4._netCDF4.Variable.__getattribute__	netCDF4._netCDF4.Variable-class.html#__getattribute__
+netCDF4._netCDF4.Variable._grpid	netCDF4._netCDF4.Variable-class.html#_grpid
+netCDF4._netCDF4.Variable.shape	netCDF4._netCDF4.Variable-class.html#shape
+netCDF4._netCDF4.Variable.set_auto_maskandscale	netCDF4._netCDF4.Variable-class.html#set_auto_maskandscale
+netCDF4._netCDF4.Variable.filters	netCDF4._netCDF4.Variable-class.html#filters
+netCDF4._netCDF4.Variable._toma	netCDF4._netCDF4.Variable-class.html#_toma
+netCDF4._netCDF4.Variable.getValue	netCDF4._netCDF4.Variable-class.html#getValue
+netCDF4._netCDF4.Variable.__init__	netCDF4._netCDF4.Variable-class.html#__init__
+netCDF4._netCDF4.Variable.size	netCDF4._netCDF4.Variable-class.html#size
+netCDF4._netCDF4.Variable.assignValue	netCDF4._netCDF4.Variable-class.html#assignValue
+netCDF4._netCDF4.Variable.__setattr__	netCDF4._netCDF4.Variable-class.html#__setattr__
+netCDF4._netCDF4.Variable.scale	netCDF4._netCDF4.Variable-class.html#scale
+netCDF4._netCDF4.Variable.group	netCDF4._netCDF4.Variable-class.html#group
+netCDF4._netCDF4.Variable.__new__	netCDF4._netCDF4.Variable-class.html#__new__
+netCDF4._netCDF4.Variable._iscompound	netCDF4._netCDF4.Variable-class.html#_iscompound
+netCDF4._netCDF4.Variable.__array__	netCDF4._netCDF4.Variable-class.html#__array__
+netCDF4._netCDF4.Variable.__getattr__	netCDF4._netCDF4.Variable-class.html#__getattr__
+netCDF4._netCDF4.Variable.name	netCDF4._netCDF4.Variable-class.html#name
+netCDF4._netCDF4.Variable.set_auto_mask	netCDF4._netCDF4.Variable-class.html#set_auto_mask
+netCDF4._netCDF4.Variable.__orthogonal_indexing__	netCDF4._netCDF4.Variable-class.html#__orthogonal_indexing__
+netCDF4._netCDF4.Variable.setncatts	netCDF4._netCDF4.Variable-class.html#setncatts
+netCDF4._netCDF4.Variable.setncattr	netCDF4._netCDF4.Variable-class.html#setncattr
+netCDF4._netCDF4.Variable.__len__	netCDF4._netCDF4.Variable-class.html#__len__
+netCDF4._netCDF4.Variable._varid	netCDF4._netCDF4.Variable-class.html#_varid
+netCDF4._netCDF4.Variable.ncattrs	netCDF4._netCDF4.Variable-class.html#ncattrs
+netCDF4._netCDF4.Variable.get_var_chunk_cache	netCDF4._netCDF4.Variable-class.html#get_var_chunk_cache
+netCDF4._netCDF4.Variable.set_var_chunk_cache	netCDF4._netCDF4.Variable-class.html#set_var_chunk_cache
+netCDF4._netCDF4.Variable.renameAttribute	netCDF4._netCDF4.Variable-class.html#renameAttribute
+netCDF4._netCDF4.Variable.__getitem__	netCDF4._netCDF4.Variable-class.html#__getitem__
+netCDF4._netCDF4.Variable._assign_vlen	netCDF4._netCDF4.Variable-class.html#_assign_vlen
+netCDF4._netCDF4.Variable.chunking	netCDF4._netCDF4.Variable-class.html#chunking
+netCDF4._netCDF4.Variable.delncattr	netCDF4._netCDF4.Variable-class.html#delncattr
+netCDF4._netCDF4.Variable.least_significant_digit	netCDF4._netCDF4.Variable-class.html#least_significant_digit
+netCDF4._netCDF4.Variable._get	netCDF4._netCDF4.Variable-class.html#_get
+netCDF4._netCDF4.Variable._vltype	netCDF4._netCDF4.Variable-class.html#_vltype
+netCDF4._netCDF4.Variable.__unicode__	netCDF4._netCDF4.Variable-class.html#__unicode__
+netCDF4._netCDF4.Variable.dimensions	netCDF4._netCDF4.Variable-class.html#dimensions
+netCDF4._netCDF4.Variable._grp	netCDF4._netCDF4.Variable-class.html#_grp
+netCDF4._netCDF4.Variable.__delitem__	netCDF4._netCDF4.Variable-class.html#__delitem__
+netCDF4._netCDF4.Variable._cmptype	netCDF4._netCDF4.Variable-class.html#_cmptype
+netCDF4._netCDF4.Variable._put	netCDF4._netCDF4.Variable-class.html#_put
+netCDF4._netCDF4.Variable.getncattr	netCDF4._netCDF4.Variable-class.html#getncattr
+netCDF4._netCDF4.Variable.datatype	netCDF4._netCDF4.Variable-class.html#datatype
+netCDF4._netCDF4.Variable.set_auto_scale	netCDF4._netCDF4.Variable-class.html#set_auto_scale
+netCDF4._netCDF4.Variable.mask	netCDF4._netCDF4.Variable-class.html#mask
+netCDF4._netCDF4.Variable.__setitem__	netCDF4._netCDF4.Variable-class.html#__setitem__
+netCDF4._netCDF4.Variable._name	netCDF4._netCDF4.Variable-class.html#_name
+netCDF4._netCDF4.Variable.__delattr__	netCDF4._netCDF4.Variable-class.html#__delattr__
+netCDF4._netCDF4.Variable._getdims	netCDF4._netCDF4.Variable-class.html#_getdims
+netCDF4._netCDF4.Variable.__repr__	netCDF4._netCDF4.Variable-class.html#__repr__
+netCDF4._netCDF4.Variable.endian	netCDF4._netCDF4.Variable-class.html#endian
+netCDF4._netCDF4.Variable._nunlimdim	netCDF4._netCDF4.Variable-class.html#_nunlimdim
+netCDF4._netCDF4.Variable._isprimitive	netCDF4._netCDF4.Variable-class.html#_isprimitive
+netCDF4._netCDF4.Variable._getname	netCDF4._netCDF4.Variable-class.html#_getname
+netCDF4._netCDF4.Variable._isvlen	netCDF4._netCDF4.Variable-class.html#_isvlen
diff --git a/docs/class-tree.html b/docs/class-tree.html
index 22e7bad..7bd668e 100644
--- a/docs/class-tree.html
+++ b/docs/class-tree.html
@@ -16,7 +16,7 @@
   <tr valign="middle">
   <!-- Home link -->
       <th>   <a
-        href="netCDF4-module.html">Home</a>   </th>
+        href="netCDF4._netCDF4-module.html">Home</a>   </th>
 
   <!-- Tree link -->
       <th bgcolor="#70b0f0" class="navbar-select"
@@ -30,7 +30,12 @@
       <th>   <a
         href="help.html">Help</a>   </th>
 
-      <th class="navbar" width="100%"></th>
+  <!-- Project homepage -->
+      <th class="navbar" align="right" width="100%">
+        <table border="0" cellpadding="0" cellspacing="0">
+          <tr><th class="navbar" align="center"
+            >netcdf4-python</th>
+          </tr></table></th>
   </tr>
 </table>
 <table width="100%" cellpadding="0" cellspacing="0">
@@ -52,39 +57,40 @@
     <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" 
+    <li> <strong class="uidlink"><a href="netCDF4._netCDF4.CompoundType-class.html">netCDF4._netCDF4.CompoundType</a></strong>:
+      <em class="summary">A <a href="netCDF4._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>:
+    <li> <strong class="uidlink"><a href="netCDF4._netCDF4.Dataset-class.html">netCDF4._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>:
+    <li> <strong class="uidlink"><a href="netCDF4._netCDF4.Group-class.html">netCDF4._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>:
+    <li> <strong class="uidlink"><a href="netCDF4._netCDF4.MFDataset-class.html">netCDF4._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>:
+    <li> <strong class="uidlink"><a href="netCDF4._netCDF4.Dimension-class.html">netCDF4._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> <strong class="uidlink"><a href="netCDF4._netCDF4.VLType-class.html">netCDF4._netCDF4.VLType</a></strong>:
+      <em class="summary">A <a href="netCDF4._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>:
+    <li> <strong class="uidlink"><a href="netCDF4._netCDF4.Variable-class.html">netCDF4._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>
+    <li> <strong class="uidlink">netCDF4._netCDF4._Variable</strong>
     <ul>
-    <li> <strong class="uidlink"><a href="netCDF4.MFTime-class.html">netCDF4.MFTime</a></strong>:
+    <li> <strong class="uidlink"><a href="netCDF4._netCDF4.MFTime-class.html">netCDF4._netCDF4.MFTime</a></strong>:
       <em class="summary">MFTime(self, time, units=None)</em>
     </li>
     </ul>
@@ -98,7 +104,7 @@
   <tr valign="middle">
   <!-- Home link -->
       <th>   <a
-        href="netCDF4-module.html">Home</a>   </th>
+        href="netCDF4._netCDF4-module.html">Home</a>   </th>
 
   <!-- Tree link -->
       <th bgcolor="#70b0f0" class="navbar-select"
@@ -112,13 +118,18 @@
       <th>   <a
         href="help.html">Help</a>   </th>
 
-      <th class="navbar" width="100%"></th>
+  <!-- Project homepage -->
+      <th class="navbar" align="right" width="100%">
+        <table border="0" cellpadding="0" cellspacing="0">
+          <tr><th class="navbar" align="center"
+            >netcdf4-python</th>
+          </tr></table></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 Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Tue May 12 15:08:44 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/help.html b/docs/help.html
index 7f18c1f..2f4f00c 100644
--- a/docs/help.html
+++ b/docs/help.html
@@ -16,7 +16,7 @@
   <tr valign="middle">
   <!-- Home link -->
       <th>   <a
-        href="netCDF4-module.html">Home</a>   </th>
+        href="netCDF4._netCDF4-module.html">Home</a>   </th>
 
   <!-- Tree link -->
       <th>   <a
@@ -30,7 +30,12 @@
       <th bgcolor="#70b0f0" class="navbar-select"
           >   Help   </th>
 
-      <th class="navbar" width="100%"></th>
+  <!-- Project homepage -->
+      <th class="navbar" align="right" width="100%">
+        <table border="0" cellpadding="0" cellspacing="0">
+          <tr><th class="navbar" align="center"
+            >netcdf4-python</th>
+          </tr></table></th>
   </tr>
 </table>
 <table width="100%" cellpadding="0" cellspacing="0">
@@ -47,7 +52,7 @@
 <h1 class="epydoc"> API Documentation </h1>
 
 <p> This document contains the API (Application Programming Interface)
-documentation for this project.  Documentation for the Python
+documentation for netcdf4-python.  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
@@ -220,7 +225,7 @@ page was last updated. </p>
   <tr valign="middle">
   <!-- Home link -->
       <th>   <a
-        href="netCDF4-module.html">Home</a>   </th>
+        href="netCDF4._netCDF4-module.html">Home</a>   </th>
 
   <!-- Tree link -->
       <th>   <a
@@ -234,13 +239,18 @@ page was last updated. </p>
       <th bgcolor="#70b0f0" class="navbar-select"
           >   Help   </th>
 
-      <th class="navbar" width="100%"></th>
+  <!-- Project homepage -->
+      <th class="navbar" align="right" width="100%">
+        <table border="0" cellpadding="0" cellspacing="0">
+          <tr><th class="navbar" align="center"
+            >netcdf4-python</th>
+          </tr></table></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 Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Tue May 12 15:08:44 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/identifier-index.html b/docs/identifier-index.html
index 3f83b9f..9348af3 100644
--- a/docs/identifier-index.html
+++ b/docs/identifier-index.html
@@ -16,7 +16,7 @@
   <tr valign="middle">
   <!-- Home link -->
       <th>   <a
-        href="netCDF4-module.html">Home</a>   </th>
+        href="netCDF4._netCDF4-module.html">Home</a>   </th>
 
   <!-- Tree link -->
       <th>   <a
@@ -30,7 +30,12 @@
       <th>   <a
         href="help.html">Help</a>   </th>
 
-      <th class="navbar" width="100%"></th>
+  <!-- Project homepage -->
+      <th class="navbar" align="right" width="100%">
+        <table border="0" cellpadding="0" cellspacing="0">
+          <tr><th class="navbar" align="center"
+            >netcdf4-python</th>
+          </tr></table></th>
   </tr>
 </table>
 <table width="100%" cellpadding="0" cellspacing="0">
@@ -55,7 +60,7 @@
  <a href="#E">E</a>
  <a href="#F">F</a>
  <a href="#G">G</a>
-  H
+ <a href="#H">H</a>
  <a href="#I">I</a>
   J
  <a href="#K">K</a>
@@ -82,8 +87,8 @@
 <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"><a href="netCDF4._netCDF4.Variable-class.html#assignValue">assignValue()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
 <td width="33%" class="link-index"> </td>
 <td width="33%" class="link-index"> </td>
 </tr>
@@ -94,36 +99,36 @@
 <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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#chartostring">chartostring()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.MFDataset-class.html#close">close()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.MFDataset-class.html">MFDataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#createDimension">createDimension()</a><br />
+<span class="index-where">(in <a href="netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#chunking">chunking()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#cmptypes">cmptypes</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#createGroup">createGroup()</a><br />
+<span class="index-where">(in <a href="netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#close">close()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.CompoundType-class.html">CompoundType</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#createVariable">createVariable()</a><br />
+<span class="index-where">(in <a href="netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Group-class.html#close">close()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Group-class.html">Group</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#createCompoundType">createCompoundType()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#createVLType">createVLType()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
 </tr>
 </table>
 </td></tr>
@@ -131,49 +136,50 @@
 <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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#data_model">data_model</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#default_encoding">default_encoding</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#dimensions">dimensions</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#default_fillvals">default_fillvals</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#disk_format">disk_format</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#datatype">datatype</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#delncattr">delncattr()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.CompoundType-class.html#dtype">dtype</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.CompoundType-class.html">CompoundType</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#date2index">date2index()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#delncattr">delncattr()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.VLType-class.html#dtype">dtype</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.VLType-class.html">VLType</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#date2num">date2num()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dimension-class.html">Dimension</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#dtype">dtype</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></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"><a href="netCDF4._netCDF4-module.html#day_units">day_units</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#dimensions">dimensions</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
 <td width="33%" class="link-index"> </td>
 </tr>
 </table>
@@ -182,8 +188,8 @@
 <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"><a href="netCDF4._netCDF4.Variable-class.html#endian">endian()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
 <td width="33%" class="link-index"> </td>
 <td width="33%" class="link-index"> </td>
 </tr>
@@ -194,12 +200,12 @@
 <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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#file_format">file_format</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#filepath">filepath()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#filters">filters()</a><br />
+<span class="index-where">(in <a href="netCDF4._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>
@@ -208,47 +214,59 @@
 <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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#get_var_chunk_cache">get_var_chunk_cache()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#getValue">getValue()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#group">group()</a><br />
+<span class="index-where">(in <a href="netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#getlibversion">getlibversion()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#gregorian">gregorian</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#groups">groups</a><br />
+<span class="index-where">(in <a href="netCDF4._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"><a href="netCDF4._netCDF4.Dataset-class.html#getncattr">getncattr()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Group-class.html">Group</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._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"><a href="netCDF4._netCDF4.Variable-class.html#getncattr">getncattr()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dimension-class.html#group">group()</a><br />
+<span class="index-where">(in <a href="netCDF4._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="H">H</a></h2></td>
+<td valign="top">
+<table class="link-index" width="100%" border="1">
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#hr_units">hr_units</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._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="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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#is_native_big">is_native_big</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#is_native_little">is_native_little</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dimension-class.html#isunlimited">isunlimited()</a><br />
+<span class="index-where">(in <a href="netCDF4._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>
@@ -257,8 +275,8 @@
 <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"><a href="netCDF4._netCDF4.Dataset-class.html#keepweakref">keepweakref</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
 <td width="33%" class="link-index"> </td>
 <td width="33%" class="link-index"> </td>
 </tr>
@@ -269,17 +287,25 @@
 <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.MFTime-class.html">MFTime</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._netCDF4.Variable-class.html#mask">mask</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#microsec_units">microsec_units</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#MINYEAR">MINYEAR</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.MFDataset-class.html">MFDataset</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#millisec_units">millisec_units</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
 <td width="33%" class="link-index"> </td>
 </tr>
 <tr>
-<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-module.html#MINYEAR">MINYEAR</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._netCDF4.MFTime-class.html">MFTime</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#min_units">min_units</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
 <td width="33%" class="link-index"> </td>
 </tr>
 </table>
@@ -288,35 +314,35 @@
 <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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.CompoundType-class.html#name">name</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.CompoundType-class.html">CompoundType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#name">name</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#ncattrs">ncattrs()</a><br />
+<span class="index-where">(in <a href="netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dimension-class.html#name">name</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dimension-class.html">Dimension</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#NC_DISKLESS">NC_DISKLESS</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#ndim">ndim</a><br />
+<span class="index-where">(in <a href="netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Group-class.html#name">name</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Group-class.html">Group</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#ncattrs">ncattrs()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#num2date">num2date()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.VLType-class.html#name">name</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.VLType-class.html">VLType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.MFDataset-class.html#ncattrs">ncattrs()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.MFDataset-class.html">MFDataset</a>)</span></td>
+<td width="33%" class="link-index"> </td>
 </tr>
 </table>
 </td></tr>
@@ -324,12 +350,12 @@
 <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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#parent">parent</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#path">path</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#python3">python3</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
 </tr>
 <tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
 </table>
@@ -338,18 +364,18 @@
 <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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#renameAttribute">renameAttribute()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#renameDimension">renameDimension()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#renameVariable">renameVariable()</a><br />
+<span class="index-where">(in <a href="netCDF4._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"><a href="netCDF4._netCDF4.Variable-class.html#renameAttribute">renameAttribute()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#renameGroup">renameGroup()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
 <td width="33%" class="link-index"> </td>
 </tr>
 </table>
@@ -358,57 +384,58 @@
 <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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#scale">scale</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#set_auto_scale">set_auto_scale()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#setncatts">setncatts()</a><br />
+<span class="index-where">(in <a href="netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#sec_units">sec_units</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#set_fill_off">set_fill_off()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#shape">shape</a><br />
+<span class="index-where">(in <a href="netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#set_auto_mask">set_auto_mask()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#set_fill_on">set_fill_on()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#size">size</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#set_auto_mask">set_auto_mask()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#set_var_chunk_cache">set_var_chunk_cache()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#stringtoarr">stringtoarr()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#set_auto_maskandscale">set_auto_maskandscale()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#setncattr">setncattr()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#stringtochar">stringtochar()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#set_auto_maskandscale">set_auto_maskandscale()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#setncattr">setncattr()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#sync">sync()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></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"><a href="netCDF4._netCDF4.Dataset-class.html#set_auto_scale">set_auto_scale()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#setncatts">setncatts()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
 <td width="33%" class="link-index"> </td>
 </tr>
 </table>
@@ -417,8 +444,8 @@
 <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"><a href="netCDF4._netCDF4-module.html#unicode_error">unicode_error</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
 <td width="33%" class="link-index"> </td>
 <td width="33%" class="link-index"> </td>
 </tr>
@@ -429,17 +456,17 @@
 <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"><a href="netCDF4._netCDF4.Variable-class.html">Variable</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.VLType-class.html">VLType</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._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"><a href="netCDF4._netCDF4.Dataset-class.html#variables">variables</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#vltypes">vltypes</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
 <td width="33%" class="link-index"> </td>
 </tr>
 </table>
@@ -448,163 +475,172 @@
 <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.MFDataset-class.html#__repr__">__repr__()</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._netCDF4.Variable-class.html#__array__">__array__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Group-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Group-class.html">Group</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dimension-class.html#__repr__">__repr__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dimension-class.html">Dimension</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.VLType-class.html#__repr__">__repr__()</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._netCDF4.Dataset-class.html#__delattr__">__delattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.MFDataset-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.MFDataset-class.html">MFDataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.MFDataset-class.html#__repr__">__repr__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.MFDataset-class.html">MFDataset</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.Variable-class.html#__repr__">__repr__()</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._netCDF4.Variable-class.html#__delattr__">__delattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.MFTime-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.MFTime-class.html">MFTime</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.VLType-class.html#__repr__">__repr__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.VLType-class.html">VLType</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.Dataset-class.html#__setattr__">__setattr__()</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._netCDF4.Variable-class.html#__delitem__">__delitem__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.VLType-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.VLType-class.html">VLType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#__repr__">__repr__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</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.MFDataset-class.html#__setattr__">__setattr__()</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._netCDF4.Dataset-class.html#__enter__">__enter__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#__setattr__">__setattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</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#__setattr__">__setattr__()</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._netCDF4.Dataset-class.html#__exit__">__exit__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dimension-class.html#__len__">__len__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dimension-class.html">Dimension</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.MFDataset-class.html#__setattr__">__setattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.MFDataset-class.html">MFDataset</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.Variable-class.html#__setitem__">__setitem__()</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._netCDF4.Dataset-class.html#__getattr__">__getattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#__len__">__len__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#__setattr__">__setattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#__getattr__">__getattr__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#__netcdf4libversion__">__netcdf4libversion__</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#__setitem__">__setitem__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#__getattribute__">__getattribute__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.CompoundType-class.html#__new__">__new__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.CompoundType-class.html">CompoundType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.CompoundType-class.html#__unicode__">__unicode__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.CompoundType-class.html">CompoundType</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.MFDataset-class.html#__getattribute__">__getattribute__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.MFDataset-class.html">MFDataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#__new__">__new__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#__unicode__">__unicode__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#__getattribute__">__getattribute__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dimension-class.html#__new__">__new__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dimension-class.html">Dimension</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dimension-class.html#__unicode__">__unicode__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dimension-class.html">Dimension</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#__getitem__">__getitem__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Group-class.html#__new__">__new__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Group-class.html">Group</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.VLType-class.html#__unicode__">__unicode__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.VLType-class.html">VLType</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.MFTime-class.html#__getitem__">__getitem__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.MFTime-class.html">MFTime</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.VLType-class.html#__new__">__new__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.VLType-class.html">VLType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#__unicode__">__unicode__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#__getitem__">__getitem__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#__new__">__new__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#_key">_key</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#__has_nc_inq_format_extended__">__has_nc_inq_format_extended__</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#__orthogonal_indexing__">__orthogonal_indexing__</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#_nctonptype">_nctonptype</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#__has_nc_inq_path__">__has_nc_inq_path__</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Variable-class.html#__orthogonal_indexing__">__orthogonal_indexing__</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Variable-class.html">Variable</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html">_netCDF4</a><br />
+<span class="index-where">(in netCDF4)</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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#__has_rename_grp__">__has_rename_grp__</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#__package__">__package__</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#_nptonctype">_nptonctype</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#__hdf5libversion__">__hdf5libversion__</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.MFDataset-class.html#__qualname__">__qualname__</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.MFDataset-class.html">MFDataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#_npversion">_npversion</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.CompoundType-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.CompoundType-class.html">CompoundType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.MFTime-class.html#__qualname__">__qualname__</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.MFTime-class.html">MFTime</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#_private_atts">_private_atts</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._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>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.CompoundType-class.html#__repr__">__repr__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.CompoundType-class.html">CompoundType</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#_supportedtypes">_supportedtypes</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
+</tr>
+<tr>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dimension-class.html#__init__">__init__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dimension-class.html">Dimension</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4.Dataset-class.html#__repr__">__repr__()</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4.Dataset-class.html">Dataset</a>)</span></td>
+<td width="33%" class="link-index"><a href="netCDF4._netCDF4-module.html#_value">_value</a><br />
+<span class="index-where">(in <a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._netCDF4</a>)</span></td>
 </tr>
 </table>
 </td></tr>
@@ -615,7 +651,7 @@
   <tr valign="middle">
   <!-- Home link -->
       <th>   <a
-        href="netCDF4-module.html">Home</a>   </th>
+        href="netCDF4._netCDF4-module.html">Home</a>   </th>
 
   <!-- Tree link -->
       <th>   <a
@@ -629,13 +665,18 @@
       <th>   <a
         href="help.html">Help</a>   </th>
 
-      <th class="navbar" width="100%"></th>
+  <!-- Project homepage -->
+      <th class="navbar" align="right" width="100%">
+        <table border="0" cellpadding="0" cellspacing="0">
+          <tr><th class="navbar" align="center"
+            >netcdf4-python</th>
+          </tr></table></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 Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Tue May 12 15:08:44 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/index.html b/docs/index.html
index 2b96e7f..93b58e4 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -3,7 +3,7 @@
           "DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
-  <title>netCDF4</title>
+  <title>netCDF4._netCDF4</title>
   <link rel="stylesheet" href="epydoc.css" type="text/css" />
   <script type="text/javascript" src="epydoc.js"></script>
 </head>
@@ -30,14 +30,20 @@
       <th>   <a
         href="help.html">Help</a>   </th>
 
-      <th class="navbar" width="100%"></th>
+  <!-- Project homepage -->
+      <th class="navbar" align="right" width="100%">
+        <table border="0" cellpadding="0" cellspacing="0">
+          <tr><th class="navbar" align="center"
+            >netcdf4-python</th>
+          </tr></table></th>
   </tr>
 </table>
 <table width="100%" cellpadding="0" cellspacing="0">
   <tr valign="top">
     <td width="100%">
       <span class="breadcrumbs">
-        Module netCDF4
+        Package netCDF4 ::
+        Module _netCDF4
       </span>
     </td>
     <td>
@@ -48,7 +54,7 @@
   </tr>
 </table>
 <!-- ==================== MODULE DESCRIPTION ==================== -->
-<h1 class="epydoc">Module netCDF4</h1><p class="nomargin-top"></p>
+<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" 
@@ -87,8 +93,7 @@
       </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).
+        target="_top">http://numpy.scipy.org</a>, version 1.7.0 or later.
       </li>
       <li>
         <a href="http://cython.org" target="_top">Cython</a>, version 0.19 
@@ -169,7 +174,7 @@
   <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> 
+      href="netCDF4._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 
@@ -188,10 +193,11 @@
       <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> 
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      attribute.  Closing the netCDF file is accomplished via the <a 
+      href="netCDF4._netCDF4.Dataset-class.html#close" 
+      class="link">close</a> method of the <a 
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a> 
       instance.</p>
       <p>Here's an example:</p>
 <pre class="py-doctest">
@@ -204,7 +210,7 @@
       <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> 
+      href="netCDF4._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 
@@ -216,20 +222,21 @@
       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" 
+      href="netCDF4._netCDF4.Group-class.html" class="link">Group</a> 
+      instances, use the <a 
+      href="netCDF4._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" 
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      or <a href="netCDF4._netCDF4.Group-class.html" class="link">Group</a>
+      instance. <a href="netCDF4._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 
+      href="netCDF4._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._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>)
@@ -240,24 +247,34 @@
 <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>
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a>, 
+      just as directories exist within directories in a unix filesystem. 
+      Each <a href="netCDF4._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._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.  To simplify the creation of nested groups, you can use a 
+      unix-like path as an argument to <a 
+      href="netCDF4._netCDF4.Dataset-class.html#createGroup" 
+      class="link">createGroup</a>.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>fcstgrp1 = rootgrp.createGroup(<span class="py-string">'/forecasts/model1'</span>)
+<span class="py-prompt">>>> </span>fcstgrp2 = rootgrp.createGroup(<span class="py-string">'/forecasts/model2'</span>)</pre>
+      <p>If any of the intermediate elements of the path do not exist, they
+      are created, just as with the unix command <code>'mkdir -p'</code>. 
+      If you try to create a group that already exists, no error will be 
+      raised, and the existing group will be returned.</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>
+      <a href="netCDF4._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._netCDF4.Dataset-class.html" 
+      class="link">Dataset</a> or <a 
+      href="netCDF4._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>
@@ -270,8 +287,8 @@
 <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">    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>
@@ -299,12 +316,13 @@
       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" 
+      using the <a 
+      href="netCDF4._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 
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      or <a href="netCDF4._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.  
@@ -316,7 +334,7 @@
 <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" 
+      <p>All of the <a href="netCDF4._netCDF4.Dimension-class.html" 
       class="link">Dimension</a> instances are stored in a python 
       dictionary.</p>
 <pre class="py-doctest">
@@ -327,13 +345,14 @@
 <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" 
+      href="netCDF4._netCDF4.Dimension-class.html" 
+      class="link">Dimension</a> instance returns the current size of that 
+      dimension. The <a 
+      href="netCDF4._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>
+      href="netCDF4._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>
@@ -342,7 +361,7 @@
 <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" 
+      <p>Printing the <a href="netCDF4._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>
@@ -355,28 +374,30 @@
 <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" 
+      <p><a href="netCDF4._netCDF4.Dimension-class.html" 
+      class="link">Dimension</a> names can be changed using the <a 
+      href="netCDF4._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>
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      or <a href="netCDF4._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" 
+      href="netCDF4._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" 
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      or <a href="netCDF4._netCDF4.Group-class.html" class="link">Group</a>
+      instance. The <a 
+      href="netCDF4._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" 
+      href="netCDF4._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
@@ -398,11 +419,11 @@
       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" 
+      href="netCDF4._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>
+      href="netCDF4._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>,))
@@ -410,23 +431,11 @@
 <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>
+      <p>To get summary info on a <a 
+      href="netCDF4._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-prompt">>>> </span><span class="py-keyword">print</span> temp
 <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>
@@ -434,26 +443,69 @@
 <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" 
+      <p>You can use a path to create a Variable inside a hierarchy of 
+      groups.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span>ftemp = rootgrp.createVariable(<span class="py-string">'/forecasts/model1/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>If the intermediate groups do not yet exist, they will be 
+      created.</p>
+      <p>You can also query a <a href="netCDF4._netCDF4.Dataset-class.html"
+      class="link">Dataset</a> or <a 
+      href="netCDF4._netCDF4.Group-class.html" class="link">Group</a> 
+      instance directly to obtain <a 
+      href="netCDF4._netCDF4.Group-class.html" class="link">Group</a> or <a
+      href="netCDF4._netCDF4.Variable-class.html" class="link">Variable</a>
+      instances using paths.</p>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp[<span class="py-string">'/forecasts/model1'</span>] <span class="py-comment"># a Group instance</span>
+<span class="py-output"><type 'netCDF4._netCDF4.Group'></span>
+<span class="py-output">group /forecasts/model1:</span>
+<span class="py-output">    dimensions(sizes):</span>
+<span class="py-output">    variables(dimensions): float32 temp(time,level,lat,lon)</span>
+<span class="py-output">    groups:</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+<pre class="py-doctest">
+<span class="py-prompt">>>> </span><span class="py-keyword">print</span> rootgrp[<span class="py-string">'/forecasts/model1/temp'</span>] <span class="py-comment"># a Variable instance</span>
+<span class="py-output"><type 'netCDF4._netCDF4.Variable'></span>
+<span class="py-output">float32 temp(time, level, lat, lon)</span>
+<span class="py-output">path = /forecasts/model1</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">filling on, default _FillValue of 9.96920996839e+36 used</span>
+<span class="py-output"></span><span class="py-prompt">>>></span></pre>
+      <p>All of the variables in the <a 
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      or <a href="netCDF4._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><a href="netCDF4._netCDF4.Variable-class.html" 
+      class="link">Variable</a> names can be changed using the <a 
+      href="netCDF4._netCDF4.Dataset-class.html#renameVariable" 
       class="link">renameVariable</a> method of a <a 
-      href="netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      href="netCDF4._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>
+      entire dataset, as a whole. <a 
+      href="netCDF4._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._netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      or <a href="netCDF4._netCDF4.Group-class.html" class="link">Group</a>
+      instance variables. <a href="netCDF4._netCDF4.Variable-class.html" 
+      class="link">Variable</a> attributes are set by assigning values to 
+      <a href="netCDF4._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>
@@ -465,16 +517,16 @@
 <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" 
+      <p>The <a href="netCDF4._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>
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a>, 
+      <a href="netCDF4._netCDF4.Group-class.html" class="link">Group</a> or
+      <a href="netCDF4._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)
@@ -482,29 +534,30 @@
 <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>
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a>, 
+      <a href="netCDF4._netCDF4.Group-class.html" class="link">Group</a> or
+      <a href="netCDF4._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'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>
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a>, 
+      <a href="netCDF4._netCDF4.Group-class.html" class="link">Group</a> or
+      <a href="netCDF4._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>
+      <p>Now that you have a netCDF <a 
+      href="netCDF4._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><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
@@ -520,9 +573,9 @@
 <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>
+      href="netCDF4._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>])
@@ -580,16 +633,22 @@
 <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><b>Special note for scalar variables</b>: To extract data from a 
+      scalar variable <code>v</code> with no associated dimensions, use an 
+      Ellipsis slice (<code>v[...]</code>). The result will be a numpy 
+      scalar object.</p>
+    <h2 class="heading">7) Dealing with time coordinates</h2>
       <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>
+      href="netCDF4._netCDF4-module.html#num2date" 
+      class="link">num2date</a> and <a 
+      href="netCDF4._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
@@ -597,7 +656,7 @@
 <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">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)
@@ -606,35 +665,37 @@
 <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 
+      <p><a href="netCDF4._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._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" 
+      called <a href="netCDF4._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>
+    <h2 class="heading">8) 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" 
+      netCDF files, you can use the <a 
+      href="netCDF4._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" 
+      create a <a href="netCDF4._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>
+      href="netCDF4._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>)
@@ -643,7 +704,8 @@
 <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>
+      href="netCDF4._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>)
@@ -655,13 +717,13 @@
 <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" 
+    <h2 class="heading">9) Efficient compression of netCDF variables</h2>
+      <p>Data stored in netCDF 4 <a 
+      href="netCDF4._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._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 
@@ -672,14 +734,14 @@
       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" 
+      href="netCDF4._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" 
+      href="netCDF4._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 
@@ -690,7 +752,7 @@
       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" 
+      href="netCDF4._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 
@@ -711,7 +773,7 @@
 <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>
+    <h2 class="heading">10) 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 
@@ -723,12 +785,13 @@
       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" 
+      href="netCDF4._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>
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      or <a href="netCDF4._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>
@@ -759,11 +822,11 @@
 <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>
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      or <a href="netCDF4._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>
@@ -782,14 +845,15 @@
 <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>
+    <h2 class="heading">11) 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" 
+      href="netCDF4._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>
+      href="netCDF4._netCDF4.Dataset-class.html" class="link">Dataset</a> 
+      or <a href="netCDF4._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>
@@ -842,7 +906,8 @@
       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" 
+      calling the <a 
+      href="netCDF4._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)
@@ -904,7 +969,7 @@
         PERFORMANCE OF THIS SOFTWARE.
       </p>
       <p><strong>Version:</strong>
-        1.1.7
+        1.1.8
       </p>
 </div><!-- ==================== CLASSES ==================== -->
 <a name="section-Classes"></a>
@@ -918,8 +983,8 @@
     <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" 
+        <a href="netCDF4._netCDF4.CompoundType-class.html" class="summary-name">CompoundType</a><br />
+      A <a href="netCDF4._netCDF4.CompoundType-class.html" 
         class="link">CompoundType</a> instance is used to describe a 
         compound data type.
     </td>
@@ -928,7 +993,7 @@
     <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 />
+        <a href="netCDF4._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>
@@ -937,7 +1002,7 @@
     <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 />
+        <a href="netCDF4._netCDF4.Dimension-class.html" class="summary-name">Dimension</a><br />
       Dimension(self, group, name, size=None)
     </td>
   </tr>
@@ -945,7 +1010,7 @@
     <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 />
+        <a href="netCDF4._netCDF4.Group-class.html" class="summary-name">Group</a><br />
       Group(self, parent, name)
     </td>
   </tr>
@@ -953,7 +1018,7 @@
     <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 />
+        <a href="netCDF4._netCDF4.MFDataset-class.html" class="summary-name">MFDataset</a><br />
       MFDataset(self, files, check=False, aggdim=None, exclude=[])
     </td>
   </tr>
@@ -961,7 +1026,7 @@
     <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 />
+        <a href="netCDF4._netCDF4.MFTime-class.html" class="summary-name">MFTime</a><br />
       MFTime(self, time, units=None)
     </td>
   </tr>
@@ -969,16 +1034,17 @@
     <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.
+        <a href="netCDF4._netCDF4.VLType-class.html" class="summary-name">VLType</a><br />
+      A <a href="netCDF4._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 />
+        <a href="netCDF4._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', 
@@ -1000,7 +1066,7 @@
     </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 />
+          <td><span class="summary-sig"><a href="netCDF4._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">
             
@@ -1017,7 +1083,7 @@
     </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>,
+          <td><span class="summary-sig"><a href="netCDF4._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 />
@@ -1038,7 +1104,7 @@
     </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>,
+          <td><span class="summary-sig"><a href="netCDF4._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>
@@ -1075,7 +1141,7 @@
     </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>,
+          <td><span class="summary-sig"><a href="netCDF4._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>
@@ -1094,7 +1160,7 @@
     </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>,
+          <td><span class="summary-sig"><a href="netCDF4._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>
@@ -1113,7 +1179,7 @@
     </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 />
+          <td><span class="summary-sig"><a href="netCDF4._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">
             
@@ -1186,7 +1252,14 @@
     <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>
+        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'netCDF4'"><code class="variable-quote">'</code><code class="variable-string">netCDF4</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="day_units"></a><span class="summary-name">day_units</span> = <code title="['day', 'days', 'd']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">day</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">days</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code  [...]
     </td>
   </tr>
 <tr>
@@ -1200,7 +1273,7 @@
     <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',
+        <a href="netCDF4._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,
@@ -1222,6 +1295,13 @@
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type"> </span>
     </td><td class="summary">
+        <a name="hr_units"></a><span class="summary-name">hr_units</span> = <code title="['hour', 'hours', 'hr', 'hrs', 'h']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">hour</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">hours</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote" [...]
+    </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>
@@ -1236,6 +1316,27 @@
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type"> </span>
     </td><td class="summary">
+        <a href="netCDF4._netCDF4-module.html#microsec_units" class="summary-name">microsec_units</a> = <code title="['microseconds', 'microsecond', 'microsec', 'microsecs']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">microseconds</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">microsecond</code><code class="variable-quote">'</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._netCDF4-module.html#millisec_units" class="summary-name">millisec_units</a> = <code title="['milliseconds', 'millisecond', 'millisec', 'millisecs']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">milliseconds</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">millisecond</code><code class="variable-quote">'</code> [...]
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="min_units"></a><span class="summary-name">min_units</span> = <code title="['minute', 'minutes', 'min', 'mins']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">minute</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">minutes</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable [...]
+    </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>
@@ -1243,6 +1344,13 @@
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type"> </span>
     </td><td class="summary">
+        <a name="sec_units"></a><span class="summary-name">sec_units</span> = <code title="['second', 'seconds', 'sec', 'secs', 's']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">second</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">seconds</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="var [...]
+    </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>
@@ -1534,6 +1642,42 @@
   </dl>
 </td></tr></table>
 </div>
+<a name="microsec_units"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">microsec_units</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">microseconds</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">microsecond</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">microsec</code><code class="variable-quote">'</code><code class="variable [...]
+</pre></td></tr></table>
+</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="millisec_units"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">millisec_units</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">milliseconds</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">millisecond</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">millisec</code><code class="variable-quote">'</code><code class="variable [...]
+</pre></td></tr></table>
+</dd>
+  </dl>
+</td></tr></table>
+</div>
 <br />
 <!-- ==================== NAVIGATION BAR ==================== -->
 <table class="navbar" border="0" width="100%" cellpadding="0"
@@ -1555,13 +1699,18 @@
       <th>   <a
         href="help.html">Help</a>   </th>
 
-      <th class="navbar" width="100%"></th>
+  <!-- Project homepage -->
+      <th class="navbar" align="right" width="100%">
+        <table border="0" cellpadding="0" cellspacing="0">
+          <tr><th class="navbar" align="center"
+            >netcdf4-python</th>
+          </tr></table></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 Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Tue May 12 15:08:44 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/module-tree.html b/docs/module-tree.html
index b26510f..450306a 100644
--- a/docs/module-tree.html
+++ b/docs/module-tree.html
@@ -16,7 +16,7 @@
   <tr valign="middle">
   <!-- Home link -->
       <th>   <a
-        href="netCDF4-module.html">Home</a>   </th>
+        href="netCDF4._netCDF4-module.html">Home</a>   </th>
 
   <!-- Tree link -->
       <th bgcolor="#70b0f0" class="navbar-select"
@@ -30,7 +30,12 @@
       <th>   <a
         href="help.html">Help</a>   </th>
 
-      <th class="navbar" width="100%"></th>
+  <!-- Project homepage -->
+      <th class="navbar" align="right" width="100%">
+        <table border="0" cellpadding="0" cellspacing="0">
+          <tr><th class="navbar" align="center"
+            >netcdf4-python</th>
+          </tr></table></th>
   </tr>
 </table>
 <table width="100%" cellpadding="0" cellspacing="0">
@@ -49,7 +54,7 @@
 </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>
+    <li class="private"> <strong class="uidlink"><a href="netCDF4._netCDF4-module.html" onclick="show_private();">netCDF4._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"
@@ -57,7 +62,7 @@
   <tr valign="middle">
   <!-- Home link -->
       <th>   <a
-        href="netCDF4-module.html">Home</a>   </th>
+        href="netCDF4._netCDF4-module.html">Home</a>   </th>
 
   <!-- Tree link -->
       <th bgcolor="#70b0f0" class="navbar-select"
@@ -71,13 +76,18 @@
       <th>   <a
         href="help.html">Help</a>   </th>
 
-      <th class="navbar" width="100%"></th>
+  <!-- Project homepage -->
+      <th class="navbar" align="right" width="100%">
+        <table border="0" cellpadding="0" cellspacing="0">
+          <tr><th class="navbar" align="center"
+            >netcdf4-python</th>
+          </tr></table></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 Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Tue May 12 15:08:44 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/netCDF4-module.html b/docs/netCDF4-module.html
index 2b96e7f..3e868e0 100644
--- a/docs/netCDF4-module.html
+++ b/docs/netCDF4-module.html
@@ -48,7 +48,7 @@
   </tr>
 </table>
 <!-- ==================== MODULE DESCRIPTION ==================== -->
-<h1 class="epydoc">Module netCDF4</h1><p class="nomargin-top"></p>
+<h1 class="epydoc">Module netCDF4</h1><p class="nomargin-top"><span class="codelink"><a href="netCDF4-pysrc.html">source code</a></span></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" 
@@ -87,8 +87,7 @@
       </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).
+        target="_top">http://numpy.scipy.org</a>, version 1.7.0 or later.
       </li>
       <li>
         <a href="http://cython.org" target="_top">Cython</a>, version 0.19 
@@ -270,8 +269,8 @@
 <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">    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>
@@ -417,7 +416,7 @@
 <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">             ('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>
@@ -490,7 +489,7 @@
 <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'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 
@@ -504,7 +503,7 @@
       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><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
@@ -597,7 +596,7 @@
 <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">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)
@@ -904,7 +903,7 @@
         PERFORMANCE OF THIS SOFTWARE.
       </p>
       <p><strong>Version:</strong>
-        1.1.7
+        1.1.8
       </p>
 </div><!-- ==================== CLASSES ==================== -->
 <a name="section-Classes"></a>
@@ -1003,7 +1002,7 @@
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#chartostring">source code</a></span>
             
           </td>
         </tr>
@@ -1024,7 +1023,7 @@
       Return indices of a netCDF time variable corresponding to the given 
       dates.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#date2index">source code</a></span>
             
           </td>
         </tr>
@@ -1043,7 +1042,7 @@
         <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="netCDF4-pysrc.html#date2num">source code</a></span>
             
           </td>
         </tr>
@@ -1061,7 +1060,7 @@
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#getlibversion">source code</a></span>
             
           </td>
         </tr>
@@ -1080,7 +1079,7 @@
         <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="netCDF4-pysrc.html#num2date">source code</a></span>
             
           </td>
         </tr>
@@ -1099,7 +1098,7 @@
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#stringtoarr">source code</a></span>
             
           </td>
         </tr>
@@ -1116,7 +1115,7 @@
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#stringtochar">source code</a></span>
             
           </td>
         </tr>
@@ -1172,14 +1171,14 @@
     <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.14'"><code class="variable-quote">'</code><code class="variable-string">1.8.14</code><code class="variable-quote">'</code></code>
+        <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>
+        <a name="__netcdf4libversion__"></a><span class="summary-name">__netcdf4libversion__</span> = <code title="u'4.3.2'"><code class="variable-quote">u'</code><code class="variable-string">4.3.2</code><code class="variable-quote">'</code></code>
     </td>
   </tr>
 <tr>
@@ -1193,6 +1192,13 @@
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type"> </span>
     </td><td class="summary">
+        <a name="day_units"></a><span class="summary-name">day_units</span> = <code title="['day', 'days', 'd']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">day</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">days</code><code class="variable-quote">'</code><code class="variable-op">, </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="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>
@@ -1222,6 +1228,13 @@
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type"> </span>
     </td><td class="summary">
+        <a name="hr_units"></a><span class="summary-name">hr_units</span> = <code title="['hour', 'hours', 'hr', 'hrs', 'h']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">hour</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">hours</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote" [...]
+    </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>
@@ -1236,6 +1249,27 @@
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type"> </span>
     </td><td class="summary">
+        <a href="netCDF4-module.html#microsec_units" class="summary-name">microsec_units</a> = <code title="['microseconds', 'microsecond', 'microsec', 'microsecs']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">microseconds</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">microsecond</code><code class="variable-quote">'</code><code cla [...]
+    </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#millisec_units" class="summary-name">millisec_units</a> = <code title="['milliseconds', 'millisecond', 'millisec', 'millisecs']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">milliseconds</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">millisecond</code><code class="variable-quote">'</code><code cla [...]
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type"> </span>
+    </td><td class="summary">
+        <a name="min_units"></a><span class="summary-name">min_units</span> = <code title="['minute', 'minutes', 'min', 'mins']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">minute</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">minutes</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable [...]
+    </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>
@@ -1243,6 +1277,13 @@
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type"> </span>
     </td><td class="summary">
+        <a name="sec_units"></a><span class="summary-name">sec_units</span> = <code title="['second', 'seconds', 'sec', 'secs', 's']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">second</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">seconds</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="var [...]
+    </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>
@@ -1266,7 +1307,7 @@
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#chartostring">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1298,7 +1339,7 @@
         <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="netCDF4-pysrc.html#date2index">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1344,7 +1385,7 @@
         <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="netCDF4-pysrc.html#date2num">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1392,7 +1433,7 @@
         <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="netCDF4-pysrc.html#num2date">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1447,7 +1488,7 @@
         <span class="sig-arg">dtype</span>=<span class="sig-default">'S'</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#stringtoarr">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1478,7 +1519,7 @@
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#stringtochar">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1534,6 +1575,42 @@
   </dl>
 </td></tr></table>
 </div>
+<a name="microsec_units"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">microsec_units</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">microseconds</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">microsecond</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">microsec</code><code class="variable-quote">'</code><code class="variable [...]
+</pre></td></tr></table>
+</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="millisec_units"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">millisec_units</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">milliseconds</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">millisecond</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">millisec</code><code class="variable-quote">'</code><code class="variable [...]
+</pre></td></tr></table>
+</dd>
+  </dl>
+</td></tr></table>
+</div>
 <br />
 <!-- ==================== NAVIGATION BAR ==================== -->
 <table class="navbar" border="0" width="100%" cellpadding="0"
@@ -1561,7 +1638,7 @@
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Sun May  3 20:05:24 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/netCDF4.CompoundType-class.html b/docs/netCDF4.CompoundType-class.html
index b0ead53..a16a19d 100644
--- a/docs/netCDF4.CompoundType-class.html
+++ b/docs/netCDF4.CompoundType-class.html
@@ -49,7 +49,7 @@
   </tr>
 </table>
 <!-- ==================== CLASS DESCRIPTION ==================== -->
-<h1 class="epydoc">Class CompoundType</h1><p class="nomargin-top"></p>
+<h1 class="epydoc">Class CompoundType</h1><p class="nomargin-top"><span class="codelink"><a href="netCDF4-pysrc.html#CompoundType">source code</a></span></p>
 <pre class="base-tree">
 object --+
          |
@@ -111,7 +111,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#CompoundType.__init__">source code</a></span>
             
           </td>
         </tr>
@@ -129,7 +129,7 @@ object --+
         <span class="summary-sig-arg">S</span>,
         <span class="summary-sig-arg">...</span>)</span></td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#CompoundType.__new__">source code</a></span>
             
           </td>
         </tr>
@@ -146,7 +146,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#CompoundType.__repr__">source code</a></span>
             
           </td>
         </tr>
@@ -162,7 +162,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#CompoundType.__unicode__">source code</a></span>
             
           </td>
         </tr>
@@ -248,7 +248,7 @@ object --+
     <br /><em class="fname">(Constructor)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#CompoundType.__init__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -272,7 +272,7 @@ object --+
         <span class="sig-arg">...</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#CompoundType.__new__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -296,7 +296,7 @@ object --+
     <br /><em class="fname">(Representation operator)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#CompoundType.__repr__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -335,7 +335,7 @@ object --+
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Sun May  3 20:05:24 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/netCDF4.Dataset-class.html b/docs/netCDF4.Dataset-class.html
index e498a83..bf9f227 100644
--- a/docs/netCDF4.Dataset-class.html
+++ b/docs/netCDF4.Dataset-class.html
@@ -49,7 +49,7 @@
   </tr>
 </table>
 <!-- ==================== CLASS DESCRIPTION ==================== -->
-<h1 class="epydoc">Class Dataset</h1><p class="nomargin-top"></p>
+<h1 class="epydoc">Class Dataset</h1><p class="nomargin-top"><span class="codelink"><a href="netCDF4-pysrc.html#Dataset">source code</a></span></p>
 <pre class="base-tree">
 object --+
          |
@@ -156,7 +156,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__delattr__">source code</a></span>
             
           </td>
         </tr>
@@ -172,7 +172,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__enter__">source code</a></span>
             
           </td>
         </tr>
@@ -188,7 +188,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__exit__">source code</a></span>
             
           </td>
         </tr>
@@ -204,7 +204,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__getattr__">source code</a></span>
             
           </td>
         </tr>
@@ -221,7 +221,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__getattribute__">source code</a></span>
             
           </td>
         </tr>
@@ -245,7 +245,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__init__">source code</a></span>
             
           </td>
         </tr>
@@ -263,7 +263,7 @@ object --+
         <span class="summary-sig-arg">S</span>,
         <span class="summary-sig-arg">...</span>)</span></td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__new__">source code</a></span>
             
           </td>
         </tr>
@@ -280,7 +280,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__repr__">source code</a></span>
             
           </td>
         </tr>
@@ -297,7 +297,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__setattr__">source code</a></span>
             
           </td>
         </tr>
@@ -313,7 +313,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__unicode__">source code</a></span>
             
           </td>
         </tr>
@@ -330,7 +330,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.close">source code</a></span>
             
           </td>
         </tr>
@@ -350,7 +350,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.createCompoundType">source code</a></span>
             
           </td>
         </tr>
@@ -370,7 +370,7 @@ object --+
       Creates a new dimension with the given <code>dimname</code> and 
       <code>size</code>.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.createDimension">source code</a></span>
             
           </td>
         </tr>
@@ -389,7 +389,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.createGroup">source code</a></span>
             
           </td>
         </tr>
@@ -409,7 +409,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.createVLType">source code</a></span>
             
           </td>
         </tr>
@@ -439,7 +439,7 @@ object --+
       Creates a new variable with the given <code>varname</code>, 
       <code>datatype</code>, and <code>dimensions</code>.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.createVariable">source code</a></span>
             
           </td>
         </tr>
@@ -458,7 +458,7 @@ object --+
         <span class="summary-sig-arg">value</span>)</span><br />
       delete a netCDF dataset or group attribute.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.delncattr">source code</a></span>
             
           </td>
         </tr>
@@ -476,7 +476,7 @@ object --+
       Get the file system path (or the opendap URL) which was used to 
       open/create the Dataset.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.filepath">source code</a></span>
             
           </td>
         </tr>
@@ -494,7 +494,7 @@ object --+
         <span class="summary-sig-arg">name</span>)</span><br />
       retrievel a netCDF dataset or group attribute.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.getncattr">source code</a></span>
             
           </td>
         </tr>
@@ -513,7 +513,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.ncattrs">source code</a></span>
             
           </td>
         </tr>
@@ -535,7 +535,7 @@ object --+
       class="link">Group</a> attribute named <code>oldname</code> to 
       <code>newname</code>.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.renameAttribute">source code</a></span>
             
           </td>
         </tr>
@@ -556,7 +556,7 @@ object --+
       class="link">Dimension</a> named <code>oldname</code> to 
       <code>newname</code>.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.renameDimension">source code</a></span>
             
           </td>
         </tr>
@@ -577,7 +577,7 @@ object --+
       named <code>oldname</code> to <code>newname</code> (requires netcdf 
       >= 4.3.1).</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.renameGroup">source code</a></span>
             
           </td>
         </tr>
@@ -598,7 +598,7 @@ object --+
       class="link">Variable</a> named <code>oldname</code> to 
       <code>newname</code></td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.renameVariable">source code</a></span>
             
           </td>
         </tr>
@@ -620,7 +620,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.set_auto_mask">source code</a></span>
             
           </td>
         </tr>
@@ -642,7 +642,7 @@ object --+
       <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.set_auto_maskandscale">source code</a></span>
             
           </td>
         </tr>
@@ -664,7 +664,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.set_auto_scale">source code</a></span>
             
           </td>
         </tr>
@@ -682,7 +682,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.set_fill_off">source code</a></span>
             
           </td>
         </tr>
@@ -700,7 +700,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.set_fill_on">source code</a></span>
             
           </td>
         </tr>
@@ -719,7 +719,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.setncattr">source code</a></span>
             
           </td>
         </tr>
@@ -738,7 +738,7 @@ object --+
       set a bunch of netCDF dataset or group attributes at once using a 
       python dictionary.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.setncatts">source code</a></span>
             
           </td>
         </tr>
@@ -756,7 +756,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dataset.sync">source code</a></span>
             
           </td>
         </tr>
@@ -914,6 +914,13 @@ object --+
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type"> </span>
     </td><td class="summary">
+        <a name="__orthogonal_indexing__"></a><span class="summary-name">__orthogonal_indexing__</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>
@@ -944,7 +951,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__delattr__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -966,7 +973,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__getattribute__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -996,7 +1003,7 @@ object --+
     <br /><em class="fname">(Constructor)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__init__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1020,7 +1027,7 @@ object --+
         <span class="sig-arg">...</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__new__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1044,7 +1051,7 @@ object --+
     <br /><em class="fname">(Representation operator)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__repr__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1066,7 +1073,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.__setattr__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1090,7 +1097,7 @@ object --+
         <span class="sig-arg">datatype_name</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.createCompoundType">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1122,7 +1129,7 @@ object --+
         <span class="sig-arg">size</span>=<span class="sig-default">None</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.createDimension">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1154,7 +1161,7 @@ object --+
         <span class="sig-arg">groupname</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.createGroup">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1178,7 +1185,7 @@ object --+
         <span class="sig-arg">datatype_name</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.createVLType">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1212,7 +1219,7 @@ object --+
         <span class="sig-arg">fill_value</span>=<span class="sig-default">None</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.createVariable">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1348,7 +1355,7 @@ object --+
         <span class="sig-arg">value</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.delncattr">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1369,7 +1376,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.filepath">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1390,7 +1397,7 @@ object --+
         <span class="sig-arg">name</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.getncattr">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1412,7 +1419,7 @@ object --+
         <span class="sig-arg">True_or_False</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.set_auto_mask">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1443,7 +1450,7 @@ object --+
         <span class="sig-arg">True_or_False</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.set_auto_maskandscale">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1475,7 +1482,7 @@ object --+
         <span class="sig-arg">True_or_False</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.set_auto_scale">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1505,7 +1512,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.set_fill_off">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1528,7 +1535,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.set_fill_on">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1558,7 +1565,7 @@ object --+
         <span class="sig-arg">value</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.setncattr">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1580,7 +1587,7 @@ object --+
         <span class="sig-arg">attdict</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dataset.setncatts">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1676,7 +1683,7 @@ object --+
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Sun May  3 20:05:24 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/netCDF4.Dimension-class.html b/docs/netCDF4.Dimension-class.html
index f71ba38..3b7590e 100644
--- a/docs/netCDF4.Dimension-class.html
+++ b/docs/netCDF4.Dimension-class.html
@@ -49,7 +49,7 @@
   </tr>
 </table>
 <!-- ==================== CLASS DESCRIPTION ==================== -->
-<h1 class="epydoc">Class Dimension</h1><p class="nomargin-top"></p>
+<h1 class="epydoc">Class Dimension</h1><p class="nomargin-top"><span class="codelink"><a href="netCDF4-pysrc.html#Dimension">source code</a></span></p>
 <pre class="base-tree">
 object --+
          |
@@ -108,7 +108,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dimension.__init__">source code</a></span>
             
           </td>
         </tr>
@@ -125,7 +125,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dimension.__len__">source code</a></span>
             
           </td>
         </tr>
@@ -143,7 +143,7 @@ object --+
         <span class="summary-sig-arg">S</span>,
         <span class="summary-sig-arg">...</span>)</span></td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dimension.__new__">source code</a></span>
             
           </td>
         </tr>
@@ -160,7 +160,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dimension.__repr__">source code</a></span>
             
           </td>
         </tr>
@@ -176,7 +176,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dimension.__unicode__">source code</a></span>
             
           </td>
         </tr>
@@ -194,7 +194,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dimension.group">source code</a></span>
             
           </td>
         </tr>
@@ -213,7 +213,7 @@ object --+
       href="netCDF4.Dimension-class.html" class="link">Dimension</a> 
       instance is unlimited, <code>False</code> otherwise.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Dimension.isunlimited">source code</a></span>
             
           </td>
         </tr>
@@ -285,7 +285,7 @@ object --+
     <br /><em class="fname">(Constructor)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dimension.__init__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -309,7 +309,7 @@ object --+
         <span class="sig-arg">...</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dimension.__new__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -333,7 +333,7 @@ object --+
     <br /><em class="fname">(Representation operator)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Dimension.__repr__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -372,7 +372,7 @@ object --+
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Sun May  3 20:05:24 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/netCDF4.Group-class.html b/docs/netCDF4.Group-class.html
index 41122d8..55bef05 100644
--- a/docs/netCDF4.Group-class.html
+++ b/docs/netCDF4.Group-class.html
@@ -49,7 +49,7 @@
   </tr>
 </table>
 <!-- ==================== CLASS DESCRIPTION ==================== -->
-<h1 class="epydoc">Class Group</h1><p class="nomargin-top"></p>
+<h1 class="epydoc">Class Group</h1><p class="nomargin-top"><span class="codelink"><a href="netCDF4-pysrc.html#Group">source code</a></span></p>
 <pre class="base-tree">
 object --+    
          |    
@@ -110,7 +110,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Group.__init__">source code</a></span>
             
           </td>
         </tr>
@@ -128,7 +128,7 @@ object --+
         <span class="summary-sig-arg">S</span>,
         <span class="summary-sig-arg">...</span>)</span></td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Group.__new__">source code</a></span>
             
           </td>
         </tr>
@@ -148,7 +148,7 @@ object --+
       href="netCDF4.Group-class.html" class="link">Group</a> instances, 
       raises IOError.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Group.close">source code</a></span>
             
           </td>
         </tr>
@@ -245,6 +245,7 @@ object --+
   <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#__orthogonal_indexing__">__orthogonal_indexing__</a></code>,
       <code><a href="netCDF4.Dataset-class.html#keepweakref">keepweakref</a></code>
       </p>
     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
@@ -275,7 +276,7 @@ object --+
     <br /><em class="fname">(Constructor)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Group.__init__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -299,7 +300,7 @@ object --+
         <span class="sig-arg">...</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Group.__new__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -322,7 +323,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Group.close">source code</a></span> 
     </td>
   </tr></table>
   
@@ -364,7 +365,7 @@ object --+
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Sun May  3 20:05:24 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/netCDF4.MFDataset-class.html b/docs/netCDF4.MFDataset-class.html
index 119fc23..03b8962 100644
--- a/docs/netCDF4.MFDataset-class.html
+++ b/docs/netCDF4.MFDataset-class.html
@@ -49,7 +49,7 @@
   </tr>
 </table>
 <!-- ==================== CLASS DESCRIPTION ==================== -->
-<h1 class="epydoc">Class MFDataset</h1><p class="nomargin-top"></p>
+<h1 class="epydoc">Class MFDataset</h1><p class="nomargin-top"><span class="codelink"><a href="netCDF4-pysrc.html#MFDataset">source code</a></span></p>
 <pre class="base-tree">
 object --+    
          |    
@@ -103,7 +103,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#MFDataset.__getattribute__">source code</a></span>
             
           </td>
         </tr>
@@ -121,7 +121,7 @@ object --+
       Open a Dataset spanning multiple files, making it look as if it was a
       single file.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#MFDataset.__init__">source code</a></span>
             
           </td>
         </tr>
@@ -138,7 +138,7 @@ object --+
           <td><span class="summary-sig"><a href="netCDF4.MFDataset-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">...</span>)</span><br />
       repr(x)</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#MFDataset.__repr__">source code</a></span>
             
           </td>
         </tr>
@@ -155,7 +155,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#MFDataset.__setattr__">source code</a></span>
             
           </td>
         </tr>
@@ -172,7 +172,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#MFDataset.close">source code</a></span>
             
           </td>
         </tr>
@@ -191,7 +191,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#MFDataset.ncattrs">source code</a></span>
             
           </td>
         </tr>
@@ -293,6 +293,7 @@ object --+
   <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#__orthogonal_indexing__">__orthogonal_indexing__</a></code>,
       <code><a href="netCDF4.Dataset-class.html#keepweakref">keepweakref</a></code>
       </p>
     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
@@ -320,7 +321,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#MFDataset.__getattribute__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -344,7 +345,7 @@ object --+
     <br /><em class="fname">(Constructor)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#MFDataset.__init__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -395,7 +396,7 @@ object --+
     <br /><em class="fname">(Representation operator)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#MFDataset.__repr__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -418,7 +419,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#MFDataset.__setattr__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -440,7 +441,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#MFDataset.close">source code</a></span> 
     </td>
   </tr></table>
   
@@ -463,7 +464,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#MFDataset.ncattrs">source code</a></span> 
     </td>
   </tr></table>
   
@@ -505,7 +506,7 @@ object --+
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Sun May  3 20:05:24 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/netCDF4.MFTime-class.html b/docs/netCDF4.MFTime-class.html
index e01c9d8..131ce36 100644
--- a/docs/netCDF4.MFTime-class.html
+++ b/docs/netCDF4.MFTime-class.html
@@ -49,7 +49,7 @@
   </tr>
 </table>
 <!-- ==================== CLASS DESCRIPTION ==================== -->
-<h1 class="epydoc">Class MFTime</h1><p class="nomargin-top"></p>
+<h1 class="epydoc">Class MFTime</h1><p class="nomargin-top"><span class="codelink"><a href="netCDF4-pysrc.html#MFTime">source code</a></span></p>
 <pre class="base-tree">
 object --+    
          |    
@@ -87,7 +87,7 @@ object --+
 <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-prompt">>>> </span><span class="py-keyword">print</span> T[32]
 <span class="py-output">32</span></pre>
 
 <!-- ==================== INSTANCE METHODS ==================== -->
@@ -107,7 +107,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#MFTime.__getitem__">source code</a></span>
             
           </td>
         </tr>
@@ -127,7 +127,7 @@ object --+
       Create a time Variable with units consistent across a multifile 
       dataset.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#MFTime.__init__">source code</a></span>
             
           </td>
         </tr>
@@ -213,7 +213,7 @@ object --+
     <br /><em class="fname">(Indexing operator)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#MFTime.__getitem__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -239,7 +239,7 @@ object --+
     <br /><em class="fname">(Constructor)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#MFTime.__init__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -285,7 +285,7 @@ object --+
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Sun May  3 20:05:24 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/netCDF4.VLType-class.html b/docs/netCDF4.VLType-class.html
index a3a3b9d..aa81b19 100644
--- a/docs/netCDF4.VLType-class.html
+++ b/docs/netCDF4.VLType-class.html
@@ -49,7 +49,7 @@
   </tr>
 </table>
 <!-- ==================== CLASS DESCRIPTION ==================== -->
-<h1 class="epydoc">Class VLType</h1><p class="nomargin-top"></p>
+<h1 class="epydoc">Class VLType</h1><p class="nomargin-top"><span class="codelink"><a href="netCDF4-pysrc.html#VLType">source code</a></span></p>
 <pre class="base-tree">
 object --+
          |
@@ -98,7 +98,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#VLType.__init__">source code</a></span>
             
           </td>
         </tr>
@@ -116,7 +116,7 @@ object --+
         <span class="summary-sig-arg">S</span>,
         <span class="summary-sig-arg">...</span>)</span></td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#VLType.__new__">source code</a></span>
             
           </td>
         </tr>
@@ -133,7 +133,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#VLType.__repr__">source code</a></span>
             
           </td>
         </tr>
@@ -149,7 +149,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#VLType.__unicode__">source code</a></span>
             
           </td>
         </tr>
@@ -235,7 +235,7 @@ object --+
     <br /><em class="fname">(Constructor)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#VLType.__init__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -259,7 +259,7 @@ object --+
         <span class="sig-arg">...</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#VLType.__new__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -283,7 +283,7 @@ object --+
     <br /><em class="fname">(Representation operator)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#VLType.__repr__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -322,7 +322,7 @@ object --+
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Sun May  3 20:05:24 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/netCDF4.Variable-class.html b/docs/netCDF4.Variable-class.html
index f55bc33..473eb4c 100644
--- a/docs/netCDF4.Variable-class.html
+++ b/docs/netCDF4.Variable-class.html
@@ -49,7 +49,7 @@
   </tr>
 </table>
 <!-- ==================== CLASS DESCRIPTION ==================== -->
-<h1 class="epydoc">Class Variable</h1><p class="nomargin-top"></p>
+<h1 class="epydoc">Class Variable</h1><p class="nomargin-top"><span class="codelink"><a href="netCDF4-pysrc.html#Variable">source code</a></span></p>
 <pre class="base-tree">
 object --+
          |
@@ -189,7 +189,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.__array__">source code</a></span>
             
           </td>
         </tr>
@@ -206,7 +206,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.__delattr__">source code</a></span>
             
           </td>
         </tr>
@@ -224,7 +224,7 @@ object --+
         <span class="summary-sig-arg">y</span>)</span><br />
       del x[y]</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.__delitem__">source code</a></span>
             
           </td>
         </tr>
@@ -240,7 +240,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.__getattr__">source code</a></span>
             
           </td>
         </tr>
@@ -257,7 +257,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.__getattribute__">source code</a></span>
             
           </td>
         </tr>
@@ -275,7 +275,7 @@ object --+
         <span class="summary-sig-arg">y</span>)</span><br />
       x[y]</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.__getitem__">source code</a></span>
             
           </td>
         </tr>
@@ -305,7 +305,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.__init__">source code</a></span>
             
           </td>
         </tr>
@@ -322,7 +322,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.__len__">source code</a></span>
             
           </td>
         </tr>
@@ -340,7 +340,7 @@ object --+
         <span class="summary-sig-arg">S</span>,
         <span class="summary-sig-arg">...</span>)</span></td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.__new__">source code</a></span>
             
           </td>
         </tr>
@@ -357,7 +357,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.__repr__">source code</a></span>
             
           </td>
         </tr>
@@ -374,7 +374,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.__setattr__">source code</a></span>
             
           </td>
         </tr>
@@ -393,7 +393,7 @@ object --+
         <span class="summary-sig-arg">y</span>)</span><br />
       x[i]=y</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.__setitem__">source code</a></span>
             
           </td>
         </tr>
@@ -409,7 +409,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.__unicode__">source code</a></span>
             
           </td>
         </tr>
@@ -427,7 +427,7 @@ object --+
         <span class="summary-sig-arg">val</span>)</span><br />
       assign a value to a scalar variable.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.assignValue">source code</a></span>
             
           </td>
         </tr>
@@ -444,7 +444,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.chunking">source code</a></span>
             
           </td>
         </tr>
@@ -463,7 +463,7 @@ object --+
         <span class="summary-sig-arg">value</span>)</span><br />
       delete a netCDF variable attribute.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.delncattr">source code</a></span>
             
           </td>
         </tr>
@@ -481,7 +481,7 @@ object --+
       return endian-ness (little,big,native) of variable (as stored in HDF5
       file).</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.endian">source code</a></span>
             
           </td>
         </tr>
@@ -498,7 +498,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.filters">source code</a></span>
             
           </td>
         </tr>
@@ -515,7 +515,7 @@ object --+
           <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.getValue">source code</a></span>
             
           </td>
         </tr>
@@ -533,7 +533,7 @@ object --+
       return variable chunk cache information in a tuple 
       (size,nelems,preemption).</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.get_var_chunk_cache">source code</a></span>
             
           </td>
         </tr>
@@ -551,7 +551,7 @@ object --+
         <span class="summary-sig-arg">name</span>)</span><br />
       retrievel a netCDF variable attribute.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.getncattr">source code</a></span>
             
           </td>
         </tr>
@@ -569,7 +569,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.group">source code</a></span>
             
           </td>
         </tr>
@@ -588,7 +588,7 @@ object --+
       href="netCDF4.Variable-class.html" class="link">Variable</a> in a 
       list.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.ncattrs">source code</a></span>
             
           </td>
         </tr>
@@ -609,7 +609,7 @@ object --+
       class="link">Variable</a> attribute named <code>oldname</code> to 
       <code>newname</code>.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.renameAttribute">source code</a></span>
             
           </td>
         </tr>
@@ -628,7 +628,7 @@ object --+
       turn on or off automatic conversion of variable data to and from 
       masked arrays .</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.set_auto_mask">source code</a></span>
             
           </td>
         </tr>
@@ -648,7 +648,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.set_auto_maskandscale">source code</a></span>
             
           </td>
         </tr>
@@ -667,7 +667,7 @@ object --+
       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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.set_auto_scale">source code</a></span>
             
           </td>
         </tr>
@@ -687,7 +687,7 @@ object --+
         <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">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.set_var_chunk_cache">source code</a></span>
             
           </td>
         </tr>
@@ -706,7 +706,7 @@ object --+
         <span class="summary-sig-arg">value</span>)</span><br />
       set a netCDF variable attribute using name,value pair.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.setncattr">source code</a></span>
             
           </td>
         </tr>
@@ -725,7 +725,7 @@ object --+
       set a bunch of netCDF variable attributes at once using a python 
       dictionary.</td>
           <td align="right" valign="top">
-            
+            <span class="codelink"><a href="netCDF4-pysrc.html#Variable.setncatts">source code</a></span>
             
           </td>
         </tr>
@@ -759,6 +759,14 @@ object --+
     <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type"> </span>
     </td><td class="summary">
+        <a href="netCDF4.Variable-class.html#__orthogonal_indexing__" class="summary-name">__orthogonal_indexing__</a><br />
+      Always <code>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="dimensions"></a><span class="summary-name">dimensions</span><br />
       A tuple containing the names of the dimensions associated with this 
       variable.
@@ -876,7 +884,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.__delattr__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -898,7 +906,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.__getattribute__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -934,7 +942,7 @@ object --+
     <br /><em class="fname">(Constructor)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.__init__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -958,7 +966,7 @@ object --+
         <span class="sig-arg">...</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.__new__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -982,7 +990,7 @@ object --+
     <br /><em class="fname">(Representation operator)</em>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.__repr__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1004,7 +1012,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.__setattr__">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1027,7 +1035,7 @@ object --+
         <span class="sig-arg">val</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.assignValue">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1047,7 +1055,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.chunking">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1071,7 +1079,7 @@ object --+
         <span class="sig-arg">value</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.delncattr">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1092,7 +1100,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.getValue">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1112,7 +1120,7 @@ object --+
   <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"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.get_var_chunk_cache">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1134,7 +1142,7 @@ object --+
         <span class="sig-arg">name</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.getncattr">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1156,7 +1164,7 @@ object --+
         <span class="sig-arg">mask</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.set_auto_mask">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1188,7 +1196,7 @@ object --+
         <span class="sig-arg">maskandscale</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.set_auto_maskandscale">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1238,7 +1246,7 @@ object --+
         <span class="sig-arg">scale</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.set_auto_scale">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1280,7 +1288,7 @@ object --+
         <span class="sig-arg">preemption</span>=<span class="sig-default">None</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.set_var_chunk_cache">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1302,7 +1310,7 @@ object --+
         <span class="sig-arg">value</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.setncattr">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1324,7 +1332,7 @@ object --+
         <span class="sig-arg">attdict</span>)</span>
   </h3>
   </td><td align="right" valign="top"
-    > 
+    ><span class="codelink"><a href="netCDF4-pysrc.html#Variable.setncatts">source code</a></span> 
     </td>
   </tr></table>
   
@@ -1346,6 +1354,20 @@ object --+
     <span class="table-header">Instance Variable Details</span></td>
 </tr>
 </table>
+<a name="__orthogonal_indexing__"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <h3 class="epydoc">__orthogonal_indexing__</h3>
+  Always <code>True</code>.  Indicates to client code that the object 
+  supports "orthogonal indexing", which means that slices that 
+  are 1d arrays or lists slice along each dimension independently.  This 
+  behavior is similar to Fortran or Matlab, but different than numpy.
+  <dl class="fields">
+  </dl>
+</td></tr></table>
+</div>
 <a name="least_significant_digit"></a>
 <div>
 <table class="details" border="1" cellpadding="3"
@@ -1420,7 +1442,7 @@ object --+
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Wed Mar 18 10:55:13 2015
+    Generated by Epydoc 3.0.1 on Sun May  3 20:05:24 2015
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"
diff --git a/docs/redirect.html b/docs/redirect.html
index 747dc24..524c955 100644
--- a/docs/redirect.html
+++ b/docs/redirect.html
@@ -7,7 +7,7 @@
 <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 pages = ["netCDF4._netCDF4.CompoundType-c", "netCDF4._netCDF4.Dimension-c", "netCDF4._netCDF4.MFDataset-c", "netCDF4._netCDF4.Variable-c", "netCDF4._netCDF4.Dataset-c", "netCDF4._netCDF4.MFTime-c", "netCDF4._netCDF4.VLType-c", "netCDF4._netCDF4.Group-c", "netCDF4._netCDF4-m"];
 var dottedName = get_anchor();
 if (dottedName) {
     var target = redirect_url(dottedName);
diff --git a/examples/README.md b/examples/README.md
new file mode 100644
index 0000000..318d7ec
--- /dev/null
+++ b/examples/README.md
@@ -0,0 +1,13 @@
+* `tutorial.py`:  code from introduction section of documentation.
+* `json_att.py`:  shows to to use json to serialize python objects, save them as
+  netcdf attributes, and then convert them back to python objects.
+* `subset.py`: shows how to use 'orthogonal indexing' to select geographic regions.
+* `reading_netcdf.ipynb`: ipython notebook from Unidata python workshop.
+* `writing_netcdf.ipynb`: ipython notebook from Unidata python workshop.
+* `threaded_read.py`:  test script for concurrent threaded reads.
+* `bench.py`:  benchmarks for reading/writing using different formats.
+* `bench_compress*.py``: benchmarks for reading/writing with compression.
+* `bench_diskless.py`: benchmarks for 'diskless' IO.
+* `test_stringarr.py`: test utilities for converting arrays of fixed-length strings
+  to arrays of characters (with an extra dimension), and vice-versa.
+  Useful since netcdf does not have a datatype for fixed-length string arrays.
diff --git a/examples/bench.py b/examples/bench.py
index 49122c1..f3ad752 100644
--- a/examples/bench.py
+++ b/examples/bench.py
@@ -6,7 +6,7 @@ from timeit import Timer
 import os, sys
 
 # create an n1dim by n2dim by n3dim random array.
-n1dim = 30   
+n1dim = 30
 n2dim = 15
 n3dim = 73
 n4dim = 144
@@ -31,7 +31,7 @@ def read_netcdf(filename):
 
 for format in ['NETCDF3_CLASSIC','NETCDF3_64BIT','NETCDF4_CLASSIC','NETCDF4']:
     sys.stdout.write('testing file format %s ...\n' % format)
-    # writing, no compression. 
+    # 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))
diff --git a/examples/bench_compress.py b/examples/bench_compress.py
index d06e2b1..9ce0018 100644
--- a/examples/bench_compress.py
+++ b/examples/bench_compress.py
@@ -6,7 +6,7 @@ from timeit import Timer
 import os, sys
 
 # create an n1dim by n2dim by n3dim random array.
-n1dim = 30   
+n1dim = 30
 n2dim = 15
 n3dim = 73
 n4dim = 144
diff --git a/examples/bench_compress2.py b/examples/bench_compress2.py
index 6ac3064..4f0b864 100644
--- a/examples/bench_compress2.py
+++ b/examples/bench_compress2.py
@@ -6,7 +6,7 @@ from timeit import Timer
 import os, sys
 
 # create an n1dim by n2dim by n3dim random array.
-n1dim = 30   
+n1dim = 30
 n2dim = 15
 n3dim = 73
 n4dim = 144
diff --git a/examples/bench_compress3.py b/examples/bench_compress3.py
index 0a35dee..38b36cd 100644
--- a/examples/bench_compress3.py
+++ b/examples/bench_compress3.py
@@ -10,7 +10,7 @@ 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   
+n1dim = 100
 n3dim = 73
 n4dim = 144
 ntrials = 10
diff --git a/examples/bench_diskless.py b/examples/bench_diskless.py
index 4a8f377..dd7a783 100644
--- a/examples/bench_diskless.py
+++ b/examples/bench_diskless.py
@@ -6,7 +6,7 @@ from timeit import Timer
 import os, sys
 
 # create an n1dim by n2dim by n3dim random array.
-n1dim = 30   
+n1dim = 30
 n2dim = 15
 n3dim = 73
 n4dim = 144
@@ -27,7 +27,7 @@ def write_netcdf(filename,zlib=False,least_significant_digit=None,format='NETCDF
     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.testme5="hi I am an attribute"
     foo[:] = array
     if closeit: file.close()
     return file
@@ -37,7 +37,7 @@ def read_netcdf(ncfile):
 
 for format in ['NETCDF4','NETCDF3_CLASSIC','NETCDF3_64BIT']:
     sys.stdout.write('testing file format %s ...\n' % format)
-    # writing, no compression. 
+    # 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))
diff --git a/examples/data/prmsl.2000.nc b/examples/data/prmsl.2000.nc
deleted file mode 100644
index eb3f888..0000000
Binary files a/examples/data/prmsl.2000.nc and /dev/null differ
diff --git a/examples/data/prmsl.2001.nc b/examples/data/prmsl.2001.nc
deleted file mode 100644
index 7a40439..0000000
Binary files a/examples/data/prmsl.2001.nc and /dev/null differ
diff --git a/examples/data/prmsl.2002.nc b/examples/data/prmsl.2002.nc
deleted file mode 100644
index 6adef02..0000000
Binary files a/examples/data/prmsl.2002.nc and /dev/null differ
diff --git a/examples/data/prmsl.2003.nc b/examples/data/prmsl.2003.nc
deleted file mode 100644
index 2f3ab1e..0000000
Binary files a/examples/data/prmsl.2003.nc and /dev/null differ
diff --git a/examples/data/prmsl.2004.nc b/examples/data/prmsl.2004.nc
deleted file mode 100644
index 2122363..0000000
Binary files a/examples/data/prmsl.2004.nc and /dev/null differ
diff --git a/examples/data/prmsl.2005.nc b/examples/data/prmsl.2005.nc
deleted file mode 100644
index 1bf5c7a..0000000
Binary files a/examples/data/prmsl.2005.nc and /dev/null differ
diff --git a/examples/data/prmsl.2006.nc b/examples/data/prmsl.2006.nc
deleted file mode 100644
index b613bc8..0000000
Binary files a/examples/data/prmsl.2006.nc and /dev/null differ
diff --git a/examples/data/prmsl.2007.nc b/examples/data/prmsl.2007.nc
deleted file mode 100644
index df779d4..0000000
Binary files a/examples/data/prmsl.2007.nc and /dev/null differ
diff --git a/examples/data/prmsl.2008.nc b/examples/data/prmsl.2008.nc
deleted file mode 100644
index da7fd8c..0000000
Binary files a/examples/data/prmsl.2008.nc and /dev/null differ
diff --git a/examples/data/prmsl.2009.nc b/examples/data/prmsl.2009.nc
deleted file mode 100644
index 2f36b7f..0000000
Binary files a/examples/data/prmsl.2009.nc and /dev/null differ
diff --git a/examples/data/prmsl.2010.nc b/examples/data/prmsl.2010.nc
deleted file mode 100644
index ec2129c..0000000
Binary files a/examples/data/prmsl.2010.nc and /dev/null differ
diff --git a/examples/data/prmsl.2011.nc b/examples/data/prmsl.2011.nc
deleted file mode 100644
index ff4d862..0000000
Binary files a/examples/data/prmsl.2011.nc and /dev/null differ
diff --git a/examples/data/rtofs_glo_3dz_f006_6hrly_reg3.nc b/examples/data/rtofs_glo_3dz_f006_6hrly_reg3.nc
deleted file mode 100644
index 70f1d6a..0000000
Binary files a/examples/data/rtofs_glo_3dz_f006_6hrly_reg3.nc and /dev/null differ
diff --git a/examples/json_att.py b/examples/json_att.py
new file mode 100644
index 0000000..7d95a7e
--- /dev/null
+++ b/examples/json_att.py
@@ -0,0 +1,24 @@
+from netCDF4 import Dataset
+import json
+# example showing how python objects (lists, dicts, None, True)
+# can be serialized as strings, saved as netCDF attributes,
+# and then converted back to python objects using json.
+ds = Dataset('json.nc', 'w')
+ds.pythonatt1 =  json.dumps([u'foo', {u'bar': [u'baz', None, 1.0, 2]}])
+ds.pythonatt2 = "true" # converted to bool
+ds.pythonatt3 = "null" # converted to None
+print(ds)
+ds.close()
+ds = Dataset('json.nc')
+def convert_json(s):
+    try:
+        a = json.loads(s)
+        return a
+    except:
+        return s
+x = convert_json(ds.pythonatt1)
+print(type(x))
+print(x)
+print(convert_json(ds.pythonatt2))
+print(convert_json(ds.pythonatt3))
+ds.close()
diff --git a/examples/subset.py b/examples/subset.py
new file mode 100644
index 0000000..a8bd246
--- /dev/null
+++ b/examples/subset.py
@@ -0,0 +1,15 @@
+# use 'orthogonal indexing' feature to subselect data over CONUS.
+import netCDF4
+import numpy as np
+import matplotlib.pyplot as plt
+
+# use real data from CFS reanlysis.
+# note:  we're reading GRIB2 data!
+URL="http://nomads.ncdc.noaa.gov/thredds/dodsC/modeldata/cmd_flxf/2010/201007/20100701/flxf00.gdas.2010070100.grb2"
+nc = netCDF4.Dataset(URL)
+lats = nc.variables['lat'][:]; lons = nc.variables['lon'][:]
+latselect = np.logical_and(lats>25,lats<50)
+lonselect = np.logical_and(lons>230,lons<305)
+data = nc.variables['Soil_moisture_content'][0,0,latselect,lonselect]
+plt.contourf(data[::-1]) # flip latitudes so they go south -> north
+plt.show()
diff --git a/examples/test_stringarr.py b/examples/test_stringarr.py
index 0d3ec74..758c4a7 100644
--- a/examples/test_stringarr.py
+++ b/examples/test_stringarr.py
@@ -32,7 +32,7 @@ for nrec in range(nrecs):
     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 
+    # 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
diff --git a/examples/threaded_read.py b/examples/threaded_read.py
index 8059400..c239a33 100644
--- a/examples/threaded_read.py
+++ b/examples/threaded_read.py
@@ -44,7 +44,7 @@ def get_data(serial=None):
     #assert_array_almost_equal(data2,datal[int(fname[4])])
     nc.close()
     if serial is None:
-       items.task_done()
+        items.task_done()
 
 # Time it (no threading).
 start = time.time()
diff --git a/examples/tutorial.py b/examples/tutorial.py
index 033500b..328ca17 100644
--- a/examples/tutorial.py
+++ b/examples/tutorial.py
@@ -11,8 +11,8 @@ rootgrp.close()
 rootgrp = Dataset('test.nc', 'a')
 fcstgrp = rootgrp.createGroup('forecasts')
 analgrp = rootgrp.createGroup('analyses')
-fcstgrp1 = fcstgrp.createGroup('model1')
-fcstgrp2 = fcstgrp.createGroup('model2')
+fcstgrp1 = rootgrp.createGroup('/forecasts/model1')
+fcstgrp2 = rootgrp.createGroup('/forecasts/model2')
 
 # walk the group tree using a Python generator.
 def walktree(top):
@@ -23,8 +23,8 @@ def walktree(top):
             yield  children
 print(rootgrp)
 for children in walktree(rootgrp):
-     for child in children:
-         print(child)
+    for child in children:
+        print(child)
 
 # dimensions.
 level = rootgrp.createDimension('level', None)
@@ -53,6 +53,11 @@ longitudes = rootgrp.createVariable('longitude','f4',('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)
+print(temp)
+# create variable in a group using a path.
+temp = rootgrp.createVariable('/forecasts/model1/temp','f4',('time','level','lat','lon',))
+print(rootgrp['/forecasts/model1']) # print the Group instance
+print(rootgrp['/forecasts/model1/temp']) # print the Variable instance
 
 # attributes.
 import time
@@ -75,8 +80,6 @@ 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)
@@ -201,7 +204,7 @@ 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 
+# 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.
diff --git a/constants.pyx b/include/constants.pyx
similarity index 100%
rename from constants.pyx
rename to include/constants.pyx
diff --git a/netCDF4.pxi b/include/netCDF4.pxi
similarity index 99%
rename from netCDF4.pxi
rename to include/netCDF4.pxi
index fe3e956..102342d 100644
--- a/netCDF4.pxi
+++ b/include/netCDF4.pxi
@@ -288,6 +288,7 @@ cdef extern from "netcdf.h":
                size_t len, void *op)
     int nc_get_att(int ncid, int varid, char *name, void *ip) nogil
     int nc_get_att_string(int ncid, int varid, char *name, char **ip) nogil
+    int nc_put_att_string(int ncid, int varid, char *name, size_t len, char **op) nogil
     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,
diff --git a/man/nc3tonc4.1 b/man/nc3tonc4.1
new file mode 100644
index 0000000..e6a3de5
--- /dev/null
+++ b/man/nc3tonc4.1
@@ -0,0 +1,78 @@
+.\" (C) Copyright 2015, Ross Gammon <rossgammon at mail.dk>,
+.\"
+.TH NC3TONC4 1 "22 Mar 2015"
+.\"
+.SH NAME
+nc3tonc4 \- a program to convert netCDF 3 files to netCDF 4 format files
+.SH SYNOPSIS
+.B nc3tonc4
+.RB [\-h ]
+.RB [\-o ]
+.RB [\-\-vars=\fIvar1,var2,..\fR ]
+.RB [\-\-zlib=\fI(0|1)\fR ]
+.RB [\-\-complevel=\fI(1\-9)\fR ]
+.RB [\-\-shuffle=\fI(0|1)\fR ]
+.RB [\-\-fletcher32=\fI(0|1)\fR ]
+.RB [\-\-unpackshort=\fI(0|1)\fR ]
+.RB [\-\-quantize=\fIvar1=n1,var2=n2,..\fR ]
+.I netcdf3filename
+.I netcdf4filename
+.br
+.SH DESCRIPTION
+This manual page documents briefly the
+.B nc3tonc4
+command.
+.PP
+\fBnc3tonc4\fP is a program that converts a netCDF 3 file into 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.
+.SH OPTIONS
+These programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`-').
+A summary of options is included below.
+.TP
+.B \-h
+Shows a summary of the available options.
+.TP
+.B \-o
+Overwite destination file (default is to raise an error if output file already exists).
+.TP
+.B \-\-vars
+A comma separated list of variable names to copy (default is to copy all variables).
+.TP
+.B \-\-classic=(0|1)
+Use NETCDF4_CLASSIC format instead of NETCDF4 (default = 1).
+.TP
+.B \-\-zlib=(0|1)
+Activate (or disable) zlib compression (the default is to activate).
+.TP
+.B \-\-complevel=(1-9)
+Set the zlib compression level (6 is default).
+.TP
+.B \-\-shuffle=(0|1)
+Activate (or disable) the shuffle filter (it is active by default).
+.TP
+.B \-\-fletcher32=(0|1)
+Activate (or disable) the fletcher32 checksum (it is not active by default).
+.TP
+.B \-\-unpackshort=(0|1)
+Unpack short integer variables to float variables using scale_factor and add_offset netCDF variable attributes (it is active by default).
+.TP
+.B \-\-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.
+.TP
+.B \-\-quiet=(0|1)
+If set to 1, don't print any diagnostic information.
+.TP
+.B \-\-chunk=(integer)
+The number of records along unlimited dimension to write at once. The default is 10. It is ignored if there is no unlimited dimension. If chunk=0, it means write all the data at once.
+.TP
+.B \-\-istart=(integer)
+The number of the record to start at along unlimited dimension. The default is 0. This option is ignored if there is no unlimited dimension.
+.TP
+.B \-\-istop=(integer)
+The number of the record to stop at along unlimited dimension. The default is 1. This option is ignored if there is no unlimited dimension.
+.SH SEE ALSO
+.BR ncinfo (1),
+.BR nc4tonc3 (1).
+.br
+.SH AUTHOR
+This manual page was written by Ross Gammon <rossgammon at mail.dk> based on the options displayed by nc3tonc4 \-h.
diff --git a/man/nc4tonc3.1 b/man/nc4tonc3.1
new file mode 100644
index 0000000..671f582
--- /dev/null
+++ b/man/nc4tonc3.1
@@ -0,0 +1,45 @@
+.\" (C) Copyright 2015, Ross Gammon <rossgammon at mail.dk>,
+.\"
+.TH NC4TONC3 1 "22 Mar 2015"
+.\"
+.SH NAME
+nc4tonc3 \- a program to convert a classic netCDF 4 file to netCDF 3 format
+.SH SYNOPSIS
+.B nc4tonc3
+.RB [\-h ]
+.RB [\-o ]
+.RB [\-\-chunk]
+.I netcdf4filename
+.I netcdf3filename
+.br
+.SH DESCRIPTION
+This manual page documents briefly the
+.B nc4tonc3
+command.
+.PP
+\fBnc4tonc3\fP is a program that converts a netCDF 4 file (in NETCDF4_CLASSIC format) to netCDF 3 format.
+.SH OPTIONS
+These programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`-').
+A summary of options is included below.
+.TP
+.B \-h
+Shows a summary of the available options.
+.TP
+.B \-o
+Overwite destination file (default is to raise an error if output file already exists).
+.TP
+.B \-\-quiet=(0|1)
+If set to 1, don't print any diagnostic information.
+.TP
+.B \-\-format
+Choose the netcdf3 format to use. NETCDF3_64BIT is used by default, or it can be set to NETCDF3_CLASSIC.
+.TP
+.B \-\-chunk=(integer)
+The number of records along unlimited dimension to write at once. The default is 10. It is ignored if there is no unlimited dimension. If chunk=0, this means write all the data at once.
+.SH SEE ALSO
+.BR ncinfo (1),
+.BR nc3tonc4 (1).
+.br
+.SH AUTHOR
+This manual page was written by Ross Gammon <rossgammon at mail.dk> based on the options displayed by nc3tonc4 \-h.
diff --git a/man/ncinfo.1 b/man/ncinfo.1
new file mode 100644
index 0000000..c219e82
--- /dev/null
+++ b/man/ncinfo.1
@@ -0,0 +1,44 @@
+.\" (C) Copyright 2015, Ross Gammon <rossgammon at mail.dk>,
+.\"
+.TH NCINFO 1 "22 Mar 2015"
+.\"
+.SH NAME
+ncinfo \- a program to print summary information about a netCDF file
+.SH SYNOPSIS
+.B ncinfo
+.RB [ \-h ]
+.RB [ \-g|\-\-group=\fIgrp\fR ]
+.RB [ \-v|\-\-variable=\fIvar\fR ]
+.RB [ \-d|\-\-dimension=\fIdim\fR ]
+.I filename
+.br
+.SH DESCRIPTION
+This manual page documents briefly the
+.B ncinfo
+command.
+.PP
+\fBncinfo\fP is a program that prints summary information about a netCDF file
+.SH OPTIONS
+These programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`-').
+A summary of options is included below.
+.TP
+.B \-h
+Shows a summary of the available options.
+.TP
+.B \-g grp, \-\-group=grp
+Prints information for this group. The default group is the root group. Nested groups are specified using posix paths e.g. group1/group2/group3.
+.TP
+.B \-v <variable name>, \-\-variable=<variable name>
+Prints information for this variable.
+.TP
+.B \-d <dimension name>, \-\-dimension=<dimension name>
+Prints information for this dimension.
+.TP
+The filename of the netCDF file must be supplied as the last argument.
+.SH SEE ALSO
+.BR nc3tonc4 (1),
+.BR nc4tonc3 (1).
+.br
+.SH AUTHOR
+This manual page was written by Ross Gammon <rossgammon at mail.dk> based on the options displayed by ncinfo \-h.
diff --git a/netCDF4/__init__.py b/netCDF4/__init__.py
new file mode 100644
index 0000000..5e881d5
--- /dev/null
+++ b/netCDF4/__init__.py
@@ -0,0 +1,8 @@
+# init for netCDF4 package
+# Docstring comes from extension module _netCDF4
+from ._netCDF4 import *
+# Need explicit imports for names beginning with underscores
+from ._netCDF4 import __doc__
+from ._netCDF4 import (__version__, __netcdf4libversion__, __hdf5libversion__,
+                       __has_rename_grp__, __has_nc_inq_path__,
+                       __has_nc_inq_format_extended__)
diff --git a/netCDF4.c b/netCDF4/_netCDF4.c
similarity index 74%
rename from netCDF4.c
rename to netCDF4/_netCDF4.c
index 1e2eb8d..c5bb266 100644
--- a/netCDF4.c
+++ b/netCDF4/_netCDF4.c
@@ -242,8 +242,8 @@ class __Pyx_FakeReference {
 #define _USE_MATH_DEFINES
 #endif
 #include <math.h>
-#define __PYX_HAVE__netCDF4
-#define __PYX_HAVE_API__netCDF4
+#define __PYX_HAVE__netCDF4___netCDF4
+#define __PYX_HAVE_API__netCDF4___netCDF4
 #include "stdlib.h"
 #include "H5public.h"
 #include "netcdf.h"
@@ -430,56 +430,55 @@ static const char *__pyx_filename;
 
 
 static const char *__pyx_f[] = {
-  "netCDF4.pyx",
-  "utils.pyx",
-  "netCDF4.pxi",
+  "netCDF4/_netCDF4.pyx",
+  "include/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__read_compound;
-struct __pyx_opt_args_7netCDF4__read_vlen;
-struct __pyx_opt_args_7netCDF4__strencode;
+struct __pyx_obj_7netCDF4_8_netCDF4_Dataset;
+struct __pyx_obj_7netCDF4_8_netCDF4_Group;
+struct __pyx_obj_7netCDF4_8_netCDF4_Dimension;
+struct __pyx_obj_7netCDF4_8_netCDF4_Variable;
+struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType;
+struct __pyx_obj_7netCDF4_8_netCDF4_VLType;
+struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound;
+struct __pyx_opt_args_7netCDF4_8_netCDF4__read_vlen;
+struct __pyx_opt_args_7netCDF4_8_netCDF4__strencode;
 struct __pyx_defaults;
 typedef struct __pyx_defaults __pyx_defaults;
 
-/* "netCDF4.pyx":4002
+/* "netCDF4/_netCDF4.pyx":4118
  *     return xtype
  * 
  * cdef _read_compound(group, nc_type xtype, endian=None):             # <<<<<<<<<<<<<<
  *     # read a compound data type id from an existing file,
  *     # construct a corresponding numpy dtype instance,
  */
-struct __pyx_opt_args_7netCDF4__read_compound {
+struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound {
   int __pyx_n;
   PyObject *endian;
 };
 
-/* "netCDF4.pyx":4160
+/* "netCDF4/_netCDF4.pyx":4276
  *     return xtype, dt
  * 
  * cdef _read_vlen(group, nc_type xtype, endian=None):             # <<<<<<<<<<<<<<
  *     # read a VLEN data type id from an existing file,
  *     # construct a corresponding numpy dtype instance,
  */
-struct __pyx_opt_args_7netCDF4__read_vlen {
+struct __pyx_opt_args_7netCDF4_8_netCDF4__read_vlen {
   int __pyx_n;
   PyObject *endian;
 };
 
-/* "netCDF4.pyx":4187
+/* "netCDF4/_netCDF4.pyx":4303
  *     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 {
+struct __pyx_opt_args_7netCDF4_8_netCDF4__strencode {
   int __pyx_n;
   PyObject *encoding;
 };
@@ -487,14 +486,14 @@ struct __pyx_defaults {
   PyObject *__pyx_arg_exclude;
 };
 
-/* "netCDF4.pyx":1303
+/* "netCDF4/_netCDF4.pyx":1353
  * 
  * 
  * cdef class Dataset:             # <<<<<<<<<<<<<<
  *     """
  * Dataset(self, filename, mode="r", clobber=True, diskless=False, persist=False, keepweakref=False, format='NETCDF4')
  */
-struct __pyx_obj_7netCDF4_Dataset {
+struct __pyx_obj_7netCDF4_8_netCDF4_Dataset {
   PyObject_HEAD
   PyObject *__weakref__;
   int _grpid;
@@ -510,29 +509,30 @@ struct __pyx_obj_7netCDF4_Dataset {
   PyObject *cmptypes;
   PyObject *vltypes;
   PyObject *keepweakref;
+  PyObject *__orthogonal_indexing__;
 };
 
 
-/* "netCDF4.pyx":2090
+/* "netCDF4/_netCDF4.pyx":2197
  * 
  * 
  * cdef class Group(Dataset):             # <<<<<<<<<<<<<<
  *     """
  * Group(self, parent, name)
  */
-struct __pyx_obj_7netCDF4_Group {
-  struct __pyx_obj_7netCDF4_Dataset __pyx_base;
+struct __pyx_obj_7netCDF4_8_netCDF4_Group {
+  struct __pyx_obj_7netCDF4_8_netCDF4_Dataset __pyx_base;
 };
 
 
-/* "netCDF4.pyx":2178
+/* "netCDF4/_netCDF4.pyx":2287
  * 
  * 
  * cdef class Dimension:             # <<<<<<<<<<<<<<
  *     """
  * Dimension(self, group, name, size=None)
  */
-struct __pyx_obj_7netCDF4_Dimension {
+struct __pyx_obj_7netCDF4_8_netCDF4_Dimension {
   PyObject_HEAD
   int _dimid;
   int _grpid;
@@ -542,14 +542,14 @@ struct __pyx_obj_7netCDF4_Dimension {
 };
 
 
-/* "netCDF4.pyx":2322
+/* "netCDF4/_netCDF4.pyx":2431
  *                 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 {
+struct __pyx_obj_7netCDF4_8_netCDF4_Variable {
   PyObject_HEAD
   int _varid;
   int _grpid;
@@ -565,17 +565,18 @@ struct __pyx_obj_7netCDF4_Variable {
   PyObject *_grp;
   PyObject *_cmptype;
   PyObject *_vltype;
+  PyObject *__orthogonal_indexing__;
 };
 
 
-/* "netCDF4.pyx":3843
+/* "netCDF4/_netCDF4.pyx":3959
  * # Compound datatype support.
  * 
  * cdef class CompoundType:             # <<<<<<<<<<<<<<
  *     """
  * A L{CompoundType} instance is used to describe a compound data type.
  */
-struct __pyx_obj_7netCDF4_CompoundType {
+struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType {
   PyObject_HEAD
   nc_type _nc_type;
   PyObject *dtype;
@@ -583,14 +584,14 @@ struct __pyx_obj_7netCDF4_CompoundType {
 };
 
 
-/* "netCDF4.pyx":4073
+/* "netCDF4/_netCDF4.pyx":4189
  * # 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 {
+struct __pyx_obj_7netCDF4_8_netCDF4_VLType {
   PyObject_HEAD
   nc_type _nc_type;
   PyObject *dtype;
@@ -678,12 +679,54 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject
 
 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
 
+#include <string.h>
+
+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));
+
 #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 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 PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
+
+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
+
+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
+
 #if CYTHON_COMPILING_IN_CPYTHON
 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
 #endif
@@ -717,29 +760,46 @@ 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 void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
 
-static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
 
-#if PY_MAJOR_VERSION >= 3
-#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
-#else
-#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
-#endif
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
 
-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 int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
+    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
+    const char* function_name);
 
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
+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 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 PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
+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));
+}
+
+#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 void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
 
@@ -749,39 +809,6 @@ static CYTHON_INLINE int __Pyx_IterFinish(void);
 
 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
 
-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);
-
-#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;
@@ -798,47 +825,11 @@ static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
 #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_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 int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
-    int result = PySequence_Contains(seq, item);
+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 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;
@@ -859,36 +850,50 @@ static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
     #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
 #endif
 
-static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
+static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
+
+static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
 
+#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
-#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
+    if (likely(tp->tp_setattr))
+        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
 #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
+    return PyObject_SetAttr(obj, attr_name, value);
+}
 #else
-static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
+#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
+#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
 #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;
+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
-    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
+#define __Pyx_PyObject_AsDouble(obj) \
+((likely(PyFloat_CheckExact(obj))) ? \
+ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
 #endif
-}
+
+static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
+
+#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);
+
+static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
+    const char *name, int exact);
 
 #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) ? \
@@ -899,27 +904,23 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyOb
 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 PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
 
-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 CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
 
-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))
+static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d);
+
+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
-#define __Pyx_PyObject_AsDouble(obj) \
-((likely(PyFloat_CheckExact(obj))) ? \
- PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
+    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
 #endif
-
-static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
-    const char *name, int exact);
+}
 
 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
 
@@ -1051,283 +1052,291 @@ 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, struct __pyx_opt_args_7netCDF4__read_compound *__pyx_optional_args); /*proto*/
-static PyObject *__pyx_f_7netCDF4__def_vlen(PyObject *, PyObject *, PyObject *); /*proto*/
-static PyObject *__pyx_f_7netCDF4__read_vlen(PyObject *, nc_type, struct __pyx_opt_args_7netCDF4__read_vlen *__pyx_optional_args); /*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' */
+/* Module declarations from 'netCDF4._netCDF4' */
+static PyTypeObject *__pyx_ptype_7netCDF4_8_netCDF4_ndarray = 0;
+static PyTypeObject *__pyx_ptype_7netCDF4_8_netCDF4_Dataset = 0;
+static PyTypeObject *__pyx_ptype_7netCDF4_8_netCDF4_Group = 0;
+static PyTypeObject *__pyx_ptype_7netCDF4_8_netCDF4_Dimension = 0;
+static PyTypeObject *__pyx_ptype_7netCDF4_8_netCDF4_Variable = 0;
+static PyTypeObject *__pyx_ptype_7netCDF4_8_netCDF4_CompoundType = 0;
+static PyTypeObject *__pyx_ptype_7netCDF4_8_netCDF4_VLType = 0;
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att_names(int, int); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *, int, PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_format(int); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_full_format(int); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__set_att(PyObject *, int, PyObject *, PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_dims(PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_grps(PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_vars(PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_compound(PyObject *, PyObject *, PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__find_cmptype(PyObject *, PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *, nc_type, struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound *__pyx_optional_args); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__def_vlen(PyObject *, PyObject *, PyObject *); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *, nc_type, struct __pyx_opt_args_7netCDF4_8_netCDF4__read_vlen *__pyx_optional_args); /*proto*/
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *, struct __pyx_opt_args_7netCDF4_8_netCDF4__strencode *__pyx_optional_args); /*proto*/
+#define __Pyx_MODULE_NAME "netCDF4._netCDF4"
+int __pyx_module_is_main_netCDF4___netCDF4 = 0;
+
+/* Implementation of 'netCDF4._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_AttributeError;
 static PyObject *__pyx_builtin_KeyError;
+static PyObject *__pyx_builtin_ValueError;
 static PyObject *__pyx_builtin_TypeError;
+static PyObject *__pyx_builtin_IndexError;
+static PyObject *__pyx_builtin_IOError;
+static PyObject *__pyx_builtin_enumerate;
+static PyObject *__pyx_builtin_sum;
+static PyObject *__pyx_builtin_range;
 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 PyObject *__pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_2getlibversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_4_set_default_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_2__enter__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_4__exit__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_6__getitem__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_elem); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_8filepath(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static void __pyx_pf_7netCDF4_8_netCDF4_7Dataset_16__dealloc__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_18sync(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_20_redef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22_enddef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24set_fill_on(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26set_fill_off(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28createDimension(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_dimname, PyObject *__pyx_v_size); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30renameDimension(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32createCompoundType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34createVLType(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createVariable(struct __pyx_obj_7netCDF4_8_netCDF4_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 [...]
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38renameVariable(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createGroup(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_groupname); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42ncattrs(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44setncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46setncatts(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_attdict); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48getncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_50__delattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52delncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_54__setattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_56__getattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58renameAttribute(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_60renameGroup(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_oldname, CYTHON_UNUSED PyObject *__pyx_v_newname); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62set_auto_maskandscale(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64set_auto_mask(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66set_auto_scale(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6_grpid___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6_grpid_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_7_isopen___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_7_isopen_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6groups___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6groups_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6groups_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10dimensions___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_10dimensions_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_10dimensions_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_9variables___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_9variables_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_9variables_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_11disk_format___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11disk_format_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11disk_format_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_4path___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_4path_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_4path_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6parent___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6parent_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6parent_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_11file_format___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11file_format_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11file_format_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10data_model___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_10data_model_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_10data_model_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_8cmptypes___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_8cmptypes_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_8cmptypes_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_7vltypes___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_7vltypes_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_7vltypes_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_11keepweakref___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11keepweakref_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11keepweakref_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing_____get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4_8_netCDF4_Group *__pyx_v_self, PyObject *__pyx_v_parent, PyObject *__pyx_v_name, PyObject *__pyx_v_kwargs); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_2close(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Group *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7netCDF4_8_netCDF4_Group *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Group *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_5Group_4name_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Group *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_2_getname(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_10group(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_dimid___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_dimid_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_grpid___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_grpid_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_11_data_model___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_11_data_model_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_11_data_model_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_5_name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_5_name_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_5_name_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4_grp___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4_grp_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4_grp_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netCDF4_8_netCDF4_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,  [...]
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_2__array__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4name_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4size___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_12group(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_14ncattrs(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_16setncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncatts(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_attdict); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20getncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_22delncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_24filters(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26endian(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28chunking(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30get_var_chunk_cache(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32set_var_chunk_cache(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_size, PyObject *__pyx_v_nelems, PyObject *__pyx_v_preemption); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_34__delattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__setattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_38__getattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40renameAttribute(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_42__getitem__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_elem); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44_toma(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_assign_vlen(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_data); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_48__setitem__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_data); /* proto */
+static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__len__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_52assignValue(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_54getValue(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_56set_auto_maskandscale(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_maskandscale); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_scale(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_scale); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_mask(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_mask); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62_put(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_64_get(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_count, PyObject *__pyx_v_stride); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6_varid___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_6_varid_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6_grpid___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_6_grpid_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_nunlimdim___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_10_nunlimdim_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5_name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5_name_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5_name_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4ndim___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4ndim_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4ndim_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5dtype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5dtype_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5dtype_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4mask___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4mask_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4mask_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5scale___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5scale_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5scale_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_12_isprimitive___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_12_isprimitive_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_12_isprimitive_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_11_iscompound___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_11_iscompound_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_11_iscompound_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_7_isvlen___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_7_isvlen_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_7_isvlen_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4_grp___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4_grp_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4_grp_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_cmptype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_8_cmptype_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_8_cmptype_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_7_vltype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_7_vltype_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_7_vltype_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing_____get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_12CompoundType_2__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_8_nc_type___get__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_8_nc_type_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_5dtype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_5dtype_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_5dtype_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4name_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4name_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_8_nc_type___get__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_8_nc_type_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_5dtype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_5dtype_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_5dtype_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_4name_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_4name_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_VLType *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_dateparse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_timestr); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8stringtoarr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string, PyObject *__pyx_v_NUMCHARS, PyObject *__pyx_v_dtype); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtochar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12chartostring(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14date2num(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16num2date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_times, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18date2index(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_8_netCDF4_9MFDataset_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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_8_netCDF4_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_8_netCDF4_9MFDataset_4__getattribute__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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_8_netCDF4_10_Dimension_2__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_4isunlimited(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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_8_netCDF4_9_Variable_2typecode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_4ncattrs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_6__getattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_8__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_10__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_12_shape(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_14set_auto_maskandscale(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_elem); /* proto */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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_8_netCDF4_6MFTime_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_elem); /* proto */
+static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_Dataset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_Group(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_Dimension(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_Variable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_CompoundType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_VLType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static char __pyx_k_[] = "\000";
 static char __pyx_k_1[] = "1";
 static char __pyx_k_O[] = "O";
 static char __pyx_k_S[] = "S";
@@ -1340,7 +1349,7 @@ 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_r[] = "r";
 static char __pyx_k_s[] = "(%s)";
 static char __pyx_k_t[] = "t";
 static char __pyx_k_u[] = "u'";
@@ -1350,6 +1359,7 @@ 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__2[] = "";
 static char __pyx_k_as[] = "as";
 static char __pyx_k_bs[] = "bs";
 static char __pyx_k_dt[] = "dt";
@@ -1370,19 +1380,17 @@ 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__12[] = "<";
+static char __pyx_k__13[] = ">";
 static char __pyx_k__14[] = "/";
-static char __pyx_k__15[] = "";
-static char __pyx_k__24[] = "\000";
-static char __pyx_k__34[] = "<";
-static char __pyx_k__35[] = ">";
-static char __pyx_k__37[] = "'";
-static char __pyx_k__39[] = ", ";
-static char __pyx_k__40[] = ",";
-static char __pyx_k__42[] = ",)";
-static char __pyx_k__43[] = ")";
-static char __pyx_k__45[] = "__";
-static char __pyx_k__52[] = "=";
-static char __pyx_k__53[] = "|";
+static char __pyx_k__17[] = "'";
+static char __pyx_k__19[] = ", ";
+static char __pyx_k__20[] = ",";
+static char __pyx_k__22[] = ",)";
+static char __pyx_k__23[] = ")";
+static char __pyx_k__26[] = "__";
+static char __pyx_k__33[] = "=";
+static char __pyx_k__34[] = "|";
 static char __pyx_k_all[] = "all";
 static char __pyx_k_any[] = "any";
 static char __pyx_k_arr[] = "arr";
@@ -1394,7 +1402,7 @@ 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_grp[] = "grp";
 static char __pyx_k_idx[] = "idx";
 static char __pyx_k_ind[] = "ind";
 static char __pyx_k_key[] = "_key";
@@ -1404,8 +1412,8 @@ 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_2[] = "r+";
+static char __pyx_k_r_3[] = "%r\n";
 static char __pyx_k_r_s[] = "r+s";
 static char __pyx_k_s_2[] = "s";
 static char __pyx_k_s_s[] = "    %s: %s\n";
@@ -1417,7 +1425,7 @@ 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__115[] = ".";
+static char __pyx_k__118[] = ".";
 static char __pyx_k_bool[] = "bool";
 static char __pyx_k_cdfm[] = "cdfm";
 static char __pyx_k_char[] = "char";
@@ -1452,7 +1460,7 @@ 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_path[] = "path";
 static char __pyx_k_prod[] = "prod";
 static char __pyx_k_repr[] = "__repr__";
 static char __pyx_k_secs[] = "secs";
@@ -1474,7 +1482,7 @@ static char __pyx_k_vlen[] = "vlen";
 static char __pyx_k_warn[] = "warn";
 static char __pyx_k_year[] = "year";
 static char __pyx_k_zlib[] = "zlib";
-static char __pyx_k_1_1_7[] = "1.1.7";
+static char __pyx_k_1_1_8[] = "1.1.8";
 static char __pyx_k_4_2_1[] = "4.2.1";
 static char __pyx_k_align[] = "align";
 static char __pyx_k_array[] = "array";
@@ -1492,9 +1500,8 @@ 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_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";
@@ -1508,7 +1515,7 @@ static char __pyx_k_range[] = "range";
 static char __pyx_k_ravel[] = "ravel";
 static char __pyx_k_redef[] = "_redef";
 static char __pyx_k_round[] = "round";
-static char __pyx_k_s_s_s[] = "%s %s%s\n";
+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";
@@ -1520,6 +1527,7 @@ static char __pyx_k_tostr[] = "_tostr";
 static char __pyx_k_tsecs[] = "tsecs";
 static char __pyx_k_units[] = "units";
 static char __pyx_k_utf_8[] = "utf-8";
+static char __pyx_k_utils[] = "utils";
 static char __pyx_k_utime[] = "utime";
 static char __pyx_k_vInst[] = "vInst";
 static char __pyx_k_vName[] = "vName";
@@ -1556,7 +1564,7 @@ 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_2[] = "_path";
 static char __pyx_k_path_s[] = "path = %s\n";
 static char __pyx_k_recLen[] = "_recLen";
 static char __pyx_k_recVar[] = "_recVar";
@@ -1592,10 +1600,8 @@ 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_minutes[] = "minutes";
 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";
@@ -1606,7 +1612,7 @@ 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_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";
@@ -1638,12 +1644,14 @@ 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_groups_s[] = "    groups: %s\n";
 static char __pyx_k_grpnames[] = "grpnames";
+static char __pyx_k_hr_units[] = "hr_units";
 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_normpath[] = "normpath";
 static char __pyx_k_num2date[] = "num2date";
 static char __pyx_k_qualname[] = "__qualname__";
 static char __pyx_k_quantize[] = "_quantize";
@@ -1665,6 +1673,7 @@ 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_day_units[] = "day_units";
 static char __pyx_k_delncattr[] = "delncattr";
 static char __pyx_k_dimtotlen[] = "dimtotlen";
 static char __pyx_k_enumerate[] = "enumerate";
@@ -1675,11 +1684,13 @@ 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_min_units[] = "min_units";
 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_sec_units[] = "sec_units";
 static char __pyx_k_setncattr[] = "setncattr";
 static char __pyx_k_timedelta[] = "timedelta";
 static char __pyx_k_totaltime[] = "totaltime";
@@ -1693,14 +1704,14 @@ 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_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_groups_s_2[] = "    groups = %s\n";
 static char __pyx_k_iscompound[] = "_iscompound";
 static char __pyx_k_masterDims[] = "masterDims";
 static char __pyx_k_masterType[] = "masterType";
@@ -1723,15 +1734,14 @@ 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_createGroup[] = "createGroup";
 static char __pyx_k_disk_format[] = "_disk_format";
-static char __pyx_k_file_format[] = "_file_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";
@@ -1741,13 +1751,12 @@ 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_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";
@@ -1759,12 +1768,11 @@ 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_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";
@@ -1773,6 +1781,8 @@ 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_microsec_units[] = "microsec_units";
+static char __pyx_k_millisec_units[] = "millisec_units";
 static char __pyx_k_set_auto_scale[] = "set_auto_scale";
 static char __pyx_k_supportedtypes[] = "_supportedtypes";
 static char __pyx_k_Dimension___len[] = "_Dimension.__len__";
@@ -1795,6 +1805,8 @@ 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_netCDF4__netCDF4[] = "netCDF4._netCDF4";
+static char __pyx_k_s_not_found_in_s[] = "%s not found in %s";
 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";
@@ -1807,20 +1819,22 @@ 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_orthogoral_indexing[] = "__orthogoral_indexing__";
 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_unlimited_dimensions_s[] = "unlimited dimensions: %s\n";
+static char __pyx_k_unsupported_time_units[] = "unsupported time units";
 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_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";
@@ -1828,13 +1842,13 @@ static char __pyx_k_s_not_a_valid_dimension_name[] = "%s not a valid dimension n
 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_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_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 HDF5 cl [...]
 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_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/netCDF4/_netCDF4.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";
@@ -1895,13 +1909,13 @@ static char __pyx_k_variable_s_dimensions_mismatch_b[] = "variable %s : dimensio
 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_kp_s_;
 static PyObject *__pyx_kp_s_0m;
 static PyObject *__pyx_kp_s_1;
-static PyObject *__pyx_kp_s_1_1_7;
+static PyObject *__pyx_kp_s_1_1_8;
 static PyObject *__pyx_kp_s_4_2_1;
 static PyObject *__pyx_kp_s_4m;
 static PyObject *__pyx_n_s_AttributeError;
@@ -1956,7 +1970,6 @@ 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;
@@ -1971,20 +1984,19 @@ 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__115;
+static PyObject *__pyx_kp_s__118;
+static PyObject *__pyx_kp_s__12;
+static PyObject *__pyx_kp_s__13;
 static PyObject *__pyx_kp_s__14;
-static PyObject *__pyx_kp_s__15;
-static PyObject *__pyx_kp_s__24;
+static PyObject *__pyx_kp_s__17;
+static PyObject *__pyx_kp_s__19;
+static PyObject *__pyx_kp_s__2;
+static PyObject *__pyx_kp_s__20;
+static PyObject *__pyx_kp_s__22;
+static PyObject *__pyx_kp_s__23;
+static PyObject *__pyx_n_s__26;
+static PyObject *__pyx_kp_s__33;
 static PyObject *__pyx_kp_s__34;
-static PyObject *__pyx_kp_s__35;
-static PyObject *__pyx_kp_s__37;
-static PyObject *__pyx_kp_s__39;
-static PyObject *__pyx_kp_s__40;
-static PyObject *__pyx_kp_s__42;
-static PyObject *__pyx_kp_s__43;
-static PyObject *__pyx_n_s__45;
-static PyObject *__pyx_kp_s__52;
-static PyObject *__pyx_kp_s__53;
 static PyObject *__pyx_n_s_a;
 static PyObject *__pyx_n_s_add_offset;
 static PyObject *__pyx_n_s_aggDimId;
@@ -2049,6 +2061,7 @@ 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_n_s_createGroup;
 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;
@@ -2070,6 +2083,7 @@ static PyObject *__pyx_n_s_dateparse;
 static PyObject *__pyx_n_s_dates;
 static PyObject *__pyx_n_s_datetime;
 static PyObject *__pyx_n_s_day;
+static PyObject *__pyx_n_s_day_units;
 static PyObject *__pyx_n_s_days;
 static PyObject *__pyx_n_s_decode;
 static PyObject *__pyx_n_s_default_encoding;
@@ -2167,7 +2181,7 @@ 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_hr_units;
 static PyObject *__pyx_n_s_http;
 static PyObject *__pyx_n_s_i;
 static PyObject *__pyx_n_s_i0;
@@ -2226,13 +2240,12 @@ 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_microsec_units;
 static PyObject *__pyx_n_s_microseconds;
-static PyObject *__pyx_n_s_millisecond;
-static PyObject *__pyx_n_s_milliseconds;
+static PyObject *__pyx_n_s_millisec_units;
+static PyObject *__pyx_n_s_min_units;
 static PyObject *__pyx_n_s_minorvers;
 static PyObject *__pyx_n_s_minute;
-static PyObject *__pyx_n_s_minutes;
 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;
@@ -2259,13 +2272,13 @@ 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_netCDF4__netCDF4;
 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_normpath;
 static PyObject *__pyx_n_s_nptonctype;
 static PyObject *__pyx_n_s_npversion;
 static PyObject *__pyx_n_s_num;
@@ -2280,6 +2293,7 @@ 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_orthogoral_indexing;
 static PyObject *__pyx_n_s_out_array_shape;
 static PyObject *__pyx_n_s_parent;
 static PyObject *__pyx_n_s_parse_date;
@@ -2304,8 +2318,8 @@ 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_n_s_r;
+static PyObject *__pyx_kp_s_r_2;
 static PyObject *__pyx_kp_s_r_3;
 static PyObject *__pyx_kp_s_r_s;
 static PyObject *__pyx_n_s_range;
@@ -2332,11 +2346,13 @@ 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_not_found_in_s;
 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_sec_units;
 static PyObject *__pyx_n_s_second;
 static PyObject *__pyx_n_s_seconds;
 static PyObject *__pyx_n_s_secs;
@@ -2418,8 +2434,10 @@ 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_unsupported_time_units;
 static PyObject *__pyx_n_s_utc_offset;
 static PyObject *__pyx_kp_s_utf_8;
+static PyObject *__pyx_n_s_utils;
 static PyObject *__pyx_n_s_utime;
 static PyObject *__pyx_n_s_v;
 static PyObject *__pyx_n_s_vInst;
@@ -2486,2582 +2504,1787 @@ static PyObject *__pyx_int_1582;
 static PyObject *__pyx_int_1900;
 static PyObject *__pyx_int_3600;
 static PyObject *__pyx_int_neg_1;
-static PyObject *__pyx_tuple_;
-static PyObject *__pyx_slice__6;
-static PyObject *__pyx_slice__8;
+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__7;
+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__16;
-static PyObject *__pyx_slice__17;
-static PyObject *__pyx_slice__18;
-static PyObject *__pyx_slice__20;
-static PyObject *__pyx_slice__29;
-static PyObject *__pyx_slice__31;
-static PyObject *__pyx_slice__32;
-static PyObject *__pyx_slice__33;
+static PyObject *__pyx_slice__36;
+static PyObject *__pyx_slice__37;
+static PyObject *__pyx_slice__42;
+static PyObject *__pyx_slice__43;
+static PyObject *__pyx_slice__50;
+static PyObject *__pyx_slice__51;
+static PyObject *__pyx_slice__54;
 static PyObject *__pyx_slice__55;
-static PyObject *__pyx_slice__56;
 static PyObject *__pyx_slice__61;
-static PyObject *__pyx_slice__62;
-static PyObject *__pyx_slice__69;
-static PyObject *__pyx_slice__70;
-static PyObject *__pyx_slice__73;
-static PyObject *__pyx_slice__74;
+static PyObject *__pyx_slice__63;
+static PyObject *__pyx_slice__65;
+static PyObject *__pyx_slice__66;
+static PyObject *__pyx_slice__67;
+static PyObject *__pyx_slice__77;
 static PyObject *__pyx_slice__80;
-static PyObject *__pyx_slice__82;
+static PyObject *__pyx_slice__81;
 static PyObject *__pyx_slice__84;
-static PyObject *__pyx_slice__85;
 static PyObject *__pyx_slice__86;
-static PyObject *__pyx_slice__96;
-static PyObject *__pyx_slice__99;
-static PyObject *__pyx_tuple__13;
-static PyObject *__pyx_tuple__19;
+static PyObject *__pyx_slice__91;
+static PyObject *__pyx_slice__92;
+static PyObject *__pyx_tuple__15;
+static PyObject *__pyx_tuple__16;
+static PyObject *__pyx_tuple__18;
 static PyObject *__pyx_tuple__21;
-static PyObject *__pyx_tuple__22;
-static PyObject *__pyx_tuple__23;
+static PyObject *__pyx_tuple__24;
 static PyObject *__pyx_tuple__25;
-static PyObject *__pyx_tuple__26;
 static PyObject *__pyx_tuple__27;
 static PyObject *__pyx_tuple__28;
+static PyObject *__pyx_tuple__29;
 static PyObject *__pyx_tuple__30;
-static PyObject *__pyx_tuple__36;
+static PyObject *__pyx_tuple__31;
+static PyObject *__pyx_tuple__32;
+static PyObject *__pyx_tuple__35;
 static PyObject *__pyx_tuple__38;
+static PyObject *__pyx_tuple__39;
+static PyObject *__pyx_tuple__40;
 static PyObject *__pyx_tuple__41;
 static PyObject *__pyx_tuple__44;
+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__51;
-static PyObject *__pyx_tuple__54;
+static PyObject *__pyx_tuple__52;
+static PyObject *__pyx_tuple__53;
+static PyObject *__pyx_tuple__56;
 static PyObject *__pyx_tuple__57;
 static PyObject *__pyx_tuple__58;
 static PyObject *__pyx_tuple__59;
 static PyObject *__pyx_tuple__60;
-static PyObject *__pyx_tuple__63;
+static PyObject *__pyx_tuple__62;
 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__70;
 static PyObject *__pyx_tuple__71;
 static PyObject *__pyx_tuple__72;
+static PyObject *__pyx_tuple__73;
+static PyObject *__pyx_tuple__74;
 static PyObject *__pyx_tuple__75;
 static PyObject *__pyx_tuple__76;
-static PyObject *__pyx_tuple__77;
 static PyObject *__pyx_tuple__78;
 static PyObject *__pyx_tuple__79;
-static PyObject *__pyx_tuple__81;
+static PyObject *__pyx_tuple__82;
 static PyObject *__pyx_tuple__83;
+static PyObject *__pyx_tuple__85;
 static PyObject *__pyx_tuple__87;
 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__97;
 static PyObject *__pyx_tuple__98;
+static PyObject *__pyx_tuple__99;
 static PyObject *__pyx_slice__100;
-static PyObject *__pyx_slice__103;
+static PyObject *__pyx_slice__104;
 static PyObject *__pyx_slice__105;
+static PyObject *__pyx_slice__106;
+static PyObject *__pyx_slice__107;
+static PyObject *__pyx_slice__109;
 static PyObject *__pyx_slice__110;
 static PyObject *__pyx_slice__111;
+static PyObject *__pyx_slice__113;
 static PyObject *__pyx_tuple__101;
 static PyObject *__pyx_tuple__102;
-static PyObject *__pyx_tuple__104;
-static PyObject *__pyx_tuple__106;
-static PyObject *__pyx_tuple__107;
+static PyObject *__pyx_tuple__103;
 static PyObject *__pyx_tuple__108;
-static PyObject *__pyx_tuple__109;
 static PyObject *__pyx_tuple__112;
-static PyObject *__pyx_tuple__113;
 static PyObject *__pyx_tuple__114;
+static PyObject *__pyx_tuple__115;
 static PyObject *__pyx_tuple__116;
 static PyObject *__pyx_tuple__117;
-static PyObject *__pyx_tuple__118;
 static PyObject *__pyx_tuple__119;
+static PyObject *__pyx_tuple__120;
 static PyObject *__pyx_tuple__121;
-static PyObject *__pyx_tuple__123;
+static PyObject *__pyx_tuple__124;
 static PyObject *__pyx_tuple__125;
-static PyObject *__pyx_tuple__127;
+static PyObject *__pyx_tuple__126;
+static PyObject *__pyx_tuple__128;
 static PyObject *__pyx_tuple__129;
 static PyObject *__pyx_tuple__131;
-static PyObject *__pyx_tuple__134;
-static PyObject *__pyx_tuple__136;
-static PyObject *__pyx_tuple__138;
-static PyObject *__pyx_tuple__140;
-static PyObject *__pyx_tuple__142;
-static PyObject *__pyx_tuple__144;
-static PyObject *__pyx_tuple__146;
-static PyObject *__pyx_tuple__148;
-static PyObject *__pyx_tuple__150;
-static PyObject *__pyx_tuple__152;
-static PyObject *__pyx_tuple__154;
-static PyObject *__pyx_tuple__156;
-static PyObject *__pyx_tuple__158;
-static PyObject *__pyx_tuple__160;
-static PyObject *__pyx_tuple__162;
-static PyObject *__pyx_tuple__164;
-static PyObject *__pyx_tuple__166;
-static PyObject *__pyx_tuple__168;
-static PyObject *__pyx_tuple__170;
-static PyObject *__pyx_tuple__172;
-static PyObject *__pyx_tuple__174;
+static PyObject *__pyx_tuple__133;
+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__177;
 static PyObject *__pyx_tuple__179;
-static PyObject *__pyx_tuple__180;
 static PyObject *__pyx_tuple__181;
-static PyObject *__pyx_codeobj__120;
+static PyObject *__pyx_tuple__183;
+static PyObject *__pyx_tuple__184;
 static PyObject *__pyx_codeobj__122;
-static PyObject *__pyx_codeobj__124;
-static PyObject *__pyx_codeobj__126;
-static PyObject *__pyx_codeobj__128;
+static PyObject *__pyx_codeobj__123;
+static PyObject *__pyx_codeobj__127;
 static PyObject *__pyx_codeobj__130;
 static PyObject *__pyx_codeobj__132;
-static PyObject *__pyx_codeobj__133;
-static PyObject *__pyx_codeobj__135;
-static PyObject *__pyx_codeobj__137;
-static PyObject *__pyx_codeobj__139;
-static PyObject *__pyx_codeobj__141;
-static PyObject *__pyx_codeobj__143;
-static PyObject *__pyx_codeobj__145;
-static PyObject *__pyx_codeobj__147;
-static PyObject *__pyx_codeobj__149;
-static PyObject *__pyx_codeobj__151;
-static PyObject *__pyx_codeobj__153;
-static PyObject *__pyx_codeobj__155;
-static PyObject *__pyx_codeobj__157;
-static PyObject *__pyx_codeobj__159;
-static PyObject *__pyx_codeobj__161;
-static PyObject *__pyx_codeobj__163;
-static PyObject *__pyx_codeobj__165;
-static PyObject *__pyx_codeobj__167;
-static PyObject *__pyx_codeobj__169;
-static PyObject *__pyx_codeobj__171;
-static PyObject *__pyx_codeobj__173;
+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__176;
 static PyObject *__pyx_codeobj__178;
+static PyObject *__pyx_codeobj__180;
 static PyObject *__pyx_codeobj__182;
+static PyObject *__pyx_codeobj__185;
 
-/* "utils.pyx":7
- * gregorian = datetime(1582,10,15)
+/* "netCDF4/_netCDF4.pyx":847
+ * # check for required version of netcdf-4 and hdf5.
  * 
- * def _dateparse(timestr):             # <<<<<<<<<<<<<<
- *     """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,
- *     return a datetime instance"""
+ * def _gethdf5libversion():             # <<<<<<<<<<<<<<
+ *     majorvers = H5_VERS_MAJOR
+ *     minorvers = H5_VERS_MINOR
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_1_gethdf5libversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_1_gethdf5libversion = {"_gethdf5libversion", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_1_gethdf5libversion, METH_NOARGS, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_1_gethdf5libversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_dateparse (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4__dateparse(__pyx_self, ((PyObject *)__pyx_v_timestr));
+  __Pyx_RefNannySetupContext("_gethdf5libversion (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4__gethdf5libversion(__pyx_self);
 
   /* 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_timestr_split = NULL;
-  CYTHON_UNUSED PyObject *__pyx_v_units = NULL;
-  PyObject *__pyx_v_n = NULL;
-  PyObject *__pyx_v_isostring = NULL;
-  PyObject *__pyx_v_year = NULL;
-  PyObject *__pyx_v_month = NULL;
-  PyObject *__pyx_v_day = NULL;
-  PyObject *__pyx_v_hour = NULL;
-  PyObject *__pyx_v_minute = NULL;
-  PyObject *__pyx_v_second = NULL;
-  PyObject *__pyx_v_utc_offset = NULL;
-  PyObject *__pyx_v_basedate = NULL;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4__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;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
+  int __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;
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *__pyx_t_10 = NULL;
-  PyObject *(*__pyx_t_11)(PyObject *);
-  Py_ssize_t __pyx_t_12;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("_dateparse", 0);
-
-  /* "utils.pyx":12
- *     # same as version in netcdftime, but returns a timezone naive
- *     # python datetime instance with the utc_offset included.
- *     timestr_split = timestr.split()             # <<<<<<<<<<<<<<
- *     units = timestr_split[0].lower()
- *     if timestr_split[1].lower() != 'since':
- */
-  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 12; __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 = 12; __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 = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_v_timestr_split = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __Pyx_RefNannySetupContext("_gethdf5libversion", 0);
 
-  /* "utils.pyx":13
- *     # python datetime instance with the utc_offset included.
- *     timestr_split = timestr.split()
- *     units = timestr_split[0].lower()             # <<<<<<<<<<<<<<
- *     if timestr_split[1].lower() != 'since':
- *         raise ValueError("no 'since' in unit_string")
+  /* "netCDF4/_netCDF4.pyx":848
+ * 
+ * def _gethdf5libversion():
+ *     majorvers = H5_VERS_MAJOR             # <<<<<<<<<<<<<<
+ *     minorvers = H5_VERS_MINOR
+ *     releasevers = H5_VERS_RELEASE
  */
-  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_timestr_split, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __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 = 13; __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 = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_v_units = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __pyx_v_majorvers = H5_VERS_MAJOR;
 
-  /* "utils.pyx":14
- *     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.
+  /* "netCDF4/_netCDF4.pyx":849
+ * def _gethdf5libversion():
+ *     majorvers = H5_VERS_MAJOR
+ *     minorvers = H5_VERS_MINOR             # <<<<<<<<<<<<<<
+ *     releasevers = H5_VERS_RELEASE
+ *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
  */
-  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_timestr_split, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __Pyx_GOTREF(__pyx_t_3);
-  __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 = 14; __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 = 14; __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 = 14; __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_PyString_Equals(__pyx_t_1, __pyx_n_s_since, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_4) {
+  __pyx_v_minorvers = H5_VERS_MINOR;
 
-    /* "utils.pyx":15
- *     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
+  /* "netCDF4/_netCDF4.pyx":850
+ *     majorvers = H5_VERS_MAJOR
+ *     minorvers = H5_VERS_MINOR
+ *     releasevers = H5_VERS_RELEASE             # <<<<<<<<<<<<<<
+ *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
+ *     if not patchstring:
  */
-    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __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 = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  __pyx_v_releasevers = H5_VERS_RELEASE;
 
-  /* "utils.pyx":17
- *         raise ValueError("no 'since' in unit_string")
- *     # parse the date string.
- *     n = timestr.find('since')+6             # <<<<<<<<<<<<<<
- *     isostring = timestr[n:]
- *     year, month, day, hour, minute, second, utc_offset =\
+  /* "netCDF4/_netCDF4.pyx":851
+ *     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_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_find); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __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_t_2, __pyx_int_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_v_n = __pyx_t_1;
+  __pyx_v_patchstring = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "utils.pyx":18
- *     # parse the date string.
- *     n = timestr.find('since')+6
- *     isostring = timestr[n:]             # <<<<<<<<<<<<<<
- *     year, month, day, hour, minute, second, utc_offset =\
- *         _parse_date( isostring.strip() )
+  /* "netCDF4/_netCDF4.pyx":852
+ *     releasevers = H5_VERS_RELEASE
+ *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
+ *     if not patchstring:             # <<<<<<<<<<<<<<
+ *         return '%d.%d.%d' % (majorvers,minorvers,releasevers)
+ *     else:
  */
-  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_timestr, 0, 0, &__pyx_v_n, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_isostring = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_patchstring); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = ((!__pyx_t_2) != 0);
+  if (__pyx_t_3) {
 
-  /* "utils.pyx":20
- *     isostring = timestr[n:]
- *     year, month, day, hour, minute, second, utc_offset =\
- *         _parse_date( isostring.strip() )             # <<<<<<<<<<<<<<
- *     basedate = datetime(year, month, day, hour, minute, second)
- *     # add utc_offset to basedate time instance (which is timezone naive)
+    /* "netCDF4/_netCDF4.pyx":853
+ *     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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_date); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_isostring, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __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_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  } else {
-    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_t_5 = NULL;
-  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
-    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-    if (likely(__pyx_t_5)) {
-      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-      __Pyx_INCREF(__pyx_t_5);
-      __Pyx_INCREF(function);
-      __Pyx_DECREF_SET(__pyx_t_2, function);
-    }
-  }
-  if (!__pyx_t_5) {
-    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __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 = 853; __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 = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minorvers); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __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 = 853; __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 = 853; __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_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 = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+    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 = 853; __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;
   }
-  __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 != 7)) {
-      if (size > 7) __Pyx_RaiseTooManyValuesError(7);
-      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __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_5 = PyTuple_GET_ITEM(sequence, 3); 
-      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 4); 
-      __pyx_t_8 = PyTuple_GET_ITEM(sequence, 5); 
-      __pyx_t_9 = PyTuple_GET_ITEM(sequence, 6); 
-    } 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_5 = PyList_GET_ITEM(sequence, 3); 
-      __pyx_t_7 = PyList_GET_ITEM(sequence, 4); 
-      __pyx_t_8 = PyList_GET_ITEM(sequence, 5); 
-      __pyx_t_9 = PyList_GET_ITEM(sequence, 6); 
-    }
-    __Pyx_INCREF(__pyx_t_2);
-    __Pyx_INCREF(__pyx_t_6);
-    __Pyx_INCREF(__pyx_t_3);
-    __Pyx_INCREF(__pyx_t_5);
-    __Pyx_INCREF(__pyx_t_7);
-    __Pyx_INCREF(__pyx_t_8);
-    __Pyx_INCREF(__pyx_t_9);
-    #else
-    {
-      Py_ssize_t i;
-      PyObject** temps[7] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_5,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9};
-      for (i=0; i < 7; i++) {
-        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __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[7] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_5,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9};
-    __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
-    for (index=0; index < 7; index++) {
-      PyObject* item = __pyx_t_11(__pyx_t_10); if (unlikely(!item)) goto __pyx_L4_unpacking_failed;
-      __Pyx_GOTREF(item);
-      *(temps[index]) = item;
-    }
-    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_11 = NULL;
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    goto __pyx_L5_unpacking_done;
-    __pyx_L4_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[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_L5_unpacking_done:;
-  }
-
-  /* "utils.pyx":19
- *     n = timestr.find('since')+6
- *     isostring = timestr[n:]
- *     year, month, day, hour, minute, second, utc_offset =\             # <<<<<<<<<<<<<<
- *         _parse_date( isostring.strip() )
- *     basedate = datetime(year, month, day, hour, minute, second)
- */
-  __pyx_v_year = __pyx_t_2;
-  __pyx_t_2 = 0;
-  __pyx_v_month = __pyx_t_6;
-  __pyx_t_6 = 0;
-  __pyx_v_day = __pyx_t_3;
-  __pyx_t_3 = 0;
-  __pyx_v_hour = __pyx_t_5;
-  __pyx_t_5 = 0;
-  __pyx_v_minute = __pyx_t_7;
-  __pyx_t_7 = 0;
-  __pyx_v_second = __pyx_t_8;
-  __pyx_t_8 = 0;
-  __pyx_v_utc_offset = __pyx_t_9;
-  __pyx_t_9 = 0;
-
-  /* "utils.pyx":21
- *     year, month, day, hour, minute, second, utc_offset =\
- *         _parse_date( isostring.strip() )
- *     basedate = datetime(year, month, day, hour, minute, second)             # <<<<<<<<<<<<<<
- *     # add utc_offset to basedate time instance (which is timezone naive)
- *     basedate += timedelta(days=utc_offset/1440.)
- */
-  __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); 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);
-  __pyx_t_8 = NULL;
-  __pyx_t_12 = 0;
-  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
-    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
-    if (likely(__pyx_t_8)) {
-      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
-      __Pyx_INCREF(__pyx_t_8);
-      __Pyx_INCREF(function);
-      __Pyx_DECREF_SET(__pyx_t_9, function);
-      __pyx_t_12 = 1;
-    }
-  }
-  __pyx_t_7 = PyTuple_New(6+__pyx_t_12); 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);
-  if (__pyx_t_8) {
-    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
-  }
-  __Pyx_INCREF(__pyx_v_year);
-  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_12, __pyx_v_year);
-  __Pyx_GIVEREF(__pyx_v_year);
-  __Pyx_INCREF(__pyx_v_month);
-  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_12, __pyx_v_month);
-  __Pyx_GIVEREF(__pyx_v_month);
-  __Pyx_INCREF(__pyx_v_day);
-  PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_12, __pyx_v_day);
-  __Pyx_GIVEREF(__pyx_v_day);
-  __Pyx_INCREF(__pyx_v_hour);
-  PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_12, __pyx_v_hour);
-  __Pyx_GIVEREF(__pyx_v_hour);
-  __Pyx_INCREF(__pyx_v_minute);
-  PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_12, __pyx_v_minute);
-  __Pyx_GIVEREF(__pyx_v_minute);
-  __Pyx_INCREF(__pyx_v_second);
-  PyTuple_SET_ITEM(__pyx_t_7, 5+__pyx_t_12, __pyx_v_second);
-  __Pyx_GIVEREF(__pyx_v_second);
-  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __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_9); __pyx_t_9 = 0;
-  __pyx_v_basedate = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "utils.pyx":23
- *     basedate = datetime(year, month, day, hour, minute, second)
- *     # add utc_offset to basedate time instance (which is timezone naive)
- *     basedate += timedelta(days=utc_offset/1440.)             # <<<<<<<<<<<<<<
- *     return basedate
- * 
- */
-  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_9 = PyDict_New(); 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_t_7 = __Pyx_PyNumber_Divide(__pyx_v_utc_offset, __pyx_float_1440_); 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);
-  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_days, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __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_9); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_basedate, __pyx_t_7); 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_SET(__pyx_v_basedate, __pyx_t_9);
-  __pyx_t_9 = 0;
+  /*else*/ {
 
-  /* "utils.pyx":24
- *     # add utc_offset to basedate time instance (which is timezone naive)
- *     basedate += timedelta(days=utc_offset/1440.)
- *     return basedate             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":855
+ *         return '%d.%d.%d' % (majorvers,minorvers,releasevers)
+ *     else:
+ *         return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)             # <<<<<<<<<<<<<<
  * 
- * # utility functions (visible from python).
+ * def getlibversion():
  */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_basedate);
-  __pyx_r = __pyx_v_basedate;
-  goto __pyx_L0;
+    __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 = 855; __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 = 855; __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 = 855; __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 = 855; __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 = 855; __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;
+  }
 
-  /* "utils.pyx":7
- * gregorian = datetime(1582,10,15)
+  /* "netCDF4/_netCDF4.pyx":847
+ * # check for required version of netcdf-4 and hdf5.
  * 
- * def _dateparse(timestr):             # <<<<<<<<<<<<<<
- *     """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,
- *     return a datetime instance"""
+ * 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_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_10);
-  __Pyx_AddTraceback("netCDF4._dateparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("netCDF4._netCDF4._gethdf5libversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
-  __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_year);
-  __Pyx_XDECREF(__pyx_v_month);
-  __Pyx_XDECREF(__pyx_v_day);
-  __Pyx_XDECREF(__pyx_v_hour);
-  __Pyx_XDECREF(__pyx_v_minute);
-  __Pyx_XDECREF(__pyx_v_second);
-  __Pyx_XDECREF(__pyx_v_utc_offset);
-  __Pyx_XDECREF(__pyx_v_basedate);
+  __Pyx_XDECREF(__pyx_v_patchstring);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "utils.pyx":28
- * # utility functions (visible from python).
+/* "netCDF4/_netCDF4.pyx":857
+ *         return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
  * 
- * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
+ * def getlibversion():             # <<<<<<<<<<<<<<
  *     """
- * stringtoarr(a, NUMCHARS,dtype='S')
+ * getlibversion()
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_3getlibversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_2getlibversion[] = "\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_8_netCDF4_3getlibversion = {"getlibversion", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_3getlibversion, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_2getlibversion};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_3getlibversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
   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);
+  __Pyx_RefNannySetupContext("getlibversion (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_2getlibversion(__pyx_self);
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_2getlibversion(CYTHON_UNUSED PyObject *__pyx_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  int __pyx_t_3;
+  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);
+
+  /* "netCDF4/_netCDF4.pyx":864
+ * used to build the module, and when it was built.
+ *     """
+ *     return (<char *>nc_inq_libvers()).decode('ascii')             # <<<<<<<<<<<<<<
+ * 
+ * __netcdf4libversion__ = getlibversion().split()[0]
+ */
+  __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[0]; __pyx_lineno = 864; __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;
+
+  /* "netCDF4/_netCDF4.pyx":857
+ *         return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
+ * 
+ * def getlibversion():             # <<<<<<<<<<<<<<
+ *     """
+ * getlibversion()
+ */
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4._netCDF4.getlibversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":926
+ * # 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_8_netCDF4__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;
-  PyObject *__pyx_t_5 = NULL;
+  int __pyx_t_5;
   PyObject *__pyx_t_6 = NULL;
-  Py_ssize_t __pyx_t_7;
+  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("stringtoarr", 0);
+  __Pyx_RefNannySetupContext("_get_att_names", 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')
+  /* "netCDF4/_netCDF4.pyx":930
+ *     cdef int ierr, numatts, n
+ *     cdef char namstring[NC_MAX_NAME+1]
+ *     if varid == NC_GLOBAL:             # <<<<<<<<<<<<<<
+ *         with nogil:
+ *             ierr = nc_inq_natts(grpid, &numatts)
  */
-  __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) {
+  __pyx_t_1 = ((__pyx_v_varid == NC_GLOBAL) != 0);
+  if (__pyx_t_1) {
 
-    /* "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)
+    /* "netCDF4/_netCDF4.pyx":931
+ *     cdef char namstring[NC_MAX_NAME+1]
+ *     if varid == NC_GLOBAL:
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_natts(grpid, &numatts)
+ *     else:
  */
-    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, 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;}
+    {
+        #ifdef WITH_THREAD
+        PyThreadState *_save;
+        Py_UNBLOCK_THREADS
+        #endif
+        /*try:*/ {
+
+          /* "netCDF4/_netCDF4.pyx":932
+ *     if varid == NC_GLOBAL:
+ *         with nogil:
+ *             ierr = nc_inq_natts(grpid, &numatts)             # <<<<<<<<<<<<<<
+ *     else:
+ *         with nogil:
+ */
+          __pyx_v_ierr = nc_inq_natts(__pyx_v_grpid, (&__pyx_v_numatts));
+        }
+
+        /* "netCDF4/_netCDF4.pyx":931
+ *     cdef char namstring[NC_MAX_NAME+1]
+ *     if varid == NC_GLOBAL:
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_natts(grpid, &numatts)
+ *     else:
+ */
+        /*finally:*/ {
+          /*normal exit:*/{
+            #ifdef WITH_THREAD
+            Py_BLOCK_THREADS
+            #endif
+            goto __pyx_L6;
+          }
+          __pyx_L6:;
+        }
+    }
+    goto __pyx_L3;
   }
+  /*else*/ {
 
-  /* "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
+    /* "netCDF4/_netCDF4.pyx":934
+ *             ierr = nc_inq_natts(grpid, &numatts)
+ *     else:
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_varnatts(grpid, varid, &numatts)
+ *     if ierr != NC_NOERR:
  */
-  __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;
+    {
+        #ifdef WITH_THREAD
+        PyThreadState *_save;
+        Py_UNBLOCK_THREADS
+        #endif
+        /*try:*/ {
+
+          /* "netCDF4/_netCDF4.pyx":935
+ *     else:
+ *         with nogil:
+ *             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));
+        }
+
+        /* "netCDF4/_netCDF4.pyx":934
+ *             ierr = nc_inq_natts(grpid, &numatts)
+ *     else:
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_varnatts(grpid, varid, &numatts)
+ *     if ierr != NC_NOERR:
+ */
+        /*finally:*/ {
+          /*normal exit:*/{
+            #ifdef WITH_THREAD
+            Py_BLOCK_THREADS
+            #endif
+            goto __pyx_L9;
+          }
+          __pyx_L9:;
+        }
     }
   }
-  __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_L3:;
+
+  /* "netCDF4/_netCDF4.pyx":936
+ *         with nogil:
+ *             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/_netCDF4.pyx":937
+ *             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 = 937; __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 = 937; __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 = 937; __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 = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __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
+  /* "netCDF4/_netCDF4.pyx":938
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     attslist = []             # <<<<<<<<<<<<<<
+ *     for n from 0 <= n < numatts:
+ *         with nogil:
+ */
+  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_attslist = ((PyObject*)__pyx_t_3);
+  __pyx_t_3 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":939
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     attslist = []
+ *     for n from 0 <= n < numatts:             # <<<<<<<<<<<<<<
+ *         with nogil:
+ *             ierr = nc_inq_attname(grpid, varid, n, namstring)
+ */
+  __pyx_t_5 = __pyx_v_numatts;
+  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_5; __pyx_v_n++) {
+
+    /* "netCDF4/_netCDF4.pyx":940
+ *     attslist = []
+ *     for n from 0 <= n < numatts:
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_attname(grpid, varid, n, namstring)
+ *         if ierr != NC_NOERR:
+ */
+    {
+        #ifdef WITH_THREAD
+        PyThreadState *_save;
+        Py_UNBLOCK_THREADS
+        #endif
+        /*try:*/ {
+
+          /* "netCDF4/_netCDF4.pyx":941
+ *     for n from 0 <= n < numatts:
+ *         with nogil:
+ *             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/_netCDF4.pyx":940
+ *     attslist = []
+ *     for n from 0 <= n < numatts:
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_attname(grpid, varid, n, namstring)
+ *         if ierr != NC_NOERR:
+ */
+        /*finally:*/ {
+          /*normal exit:*/{
+            #ifdef WITH_THREAD
+            Py_BLOCK_THREADS
+            #endif
+            goto __pyx_L17;
+          }
+          __pyx_L17:;
+        }
+    }
+
+    /* "netCDF4/_netCDF4.pyx":942
+ *         with nogil:
+ *             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/_netCDF4.pyx":943
+ *             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 = 943; __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 = 943; __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 = 943; __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 = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4/_netCDF4.pyx":944
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         attslist.append(namstring.decode(default_encoding,unicode_error))             # <<<<<<<<<<<<<<
+ *     return attslist
  * 
  */
-  __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;
+    __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __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 = 944; __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 = 944; __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 = 944; __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 = 944; __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 = 944; __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 = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  }
 
-  /* "utils.pyx":49
- *     arr = numpy.zeros(NUMCHARS,dtype+'1')
- *     arr[0:len(string)] = tuple(string)
- *     return arr             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":945
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         attslist.append(namstring.decode(default_encoding,unicode_error))
+ *     return attslist             # <<<<<<<<<<<<<<
  * 
- * def stringtochar(a):
+ * cdef _get_att(grp, int varid, name):
  */
   __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_arr);
-  __pyx_r = __pyx_v_arr;
+  __Pyx_INCREF(__pyx_v_attslist);
+  __pyx_r = __pyx_v_attslist;
   goto __pyx_L0;
 
-  /* "utils.pyx":28
- * # utility functions (visible from python).
+  /* "netCDF4/_netCDF4.pyx":926
+ * # internal C functions.
  * 
- * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
- *     """
- * stringtoarr(a, NUMCHARS,dtype='S')
+ * 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_1);
+  __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_AddTraceback("netCDF4.stringtoarr", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4._netCDF4._get_att_names", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_arr);
+  __Pyx_XDECREF(__pyx_v_attslist);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "utils.pyx":51
- *     return arr
+/* "netCDF4/_netCDF4.pyx":947
+ *     return attslist
  * 
- * def stringtochar(a):             # <<<<<<<<<<<<<<
- *     """
- * stringtochar(a)
+ * cdef _get_att(grp, int varid, name):             # <<<<<<<<<<<<<<
+ *     # Private function to get an attribute value given its name
+ *     cdef int ierr, n, _grpid
  */
 
-/* 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;
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_v_varid, PyObject *__pyx_v_name) {
+  int __pyx_v_ierr;
+  int __pyx_v__grpid;
+  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;
-  PyObject *__pyx_t_2 = 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;
-  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_8;
   PyObject *__pyx_t_9 = NULL;
-  Py_ssize_t __pyx_t_10;
+  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("stringtochar", 0);
+  __Pyx_RefNannySetupContext("_get_att", 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')")
+  /* "netCDF4/_netCDF4.pyx":955
+ *     cdef nc_type att_type
+ *     cdef ndarray value_arr
+ *     bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *     attname = bytestr
+ *     _grpid = grp._grpid
  */
-  __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_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __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) {
+  __pyx_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-    /* "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,)
+  /* "netCDF4/_netCDF4.pyx":956
+ *     cdef ndarray value_arr
+ *     bytestr = _strencode(name)
+ *     attname = bytestr             # <<<<<<<<<<<<<<
+ *     _grpid = grp._grpid
+ *     with nogil:
  */
-    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, 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;}
-  }
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_attname = __pyx_t_2;
 
-  /* "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
+  /* "netCDF4/_netCDF4.pyx":957
+ *     bytestr = _strencode(name)
+ *     attname = bytestr
+ *     _grpid = grp._grpid             # <<<<<<<<<<<<<<
+ *     with nogil:
+ *         ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len)
  */
-  __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_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __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_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 = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __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;
+  __pyx_v__grpid = __pyx_t_3;
 
-  /* "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
- * 
+  /* "netCDF4/_netCDF4.pyx":958
+ *     attname = bytestr
+ *     _grpid = grp._grpid
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len)
+ *     if ierr != NC_NOERR:
  */
-  __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;
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
 
-  /* "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):
+        /* "netCDF4/_netCDF4.pyx":959
+ *     _grpid = grp._grpid
+ *     with nogil:
+ *         ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_b);
-  __pyx_r = __pyx_v_b;
-  goto __pyx_L0;
+        __pyx_v_ierr = nc_inq_att(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, (&__pyx_v_att_type), (&__pyx_v_att_len));
+      }
 
-  /* "utils.pyx":51
- *     return arr
- * 
- * def stringtochar(a):             # <<<<<<<<<<<<<<
- *     """
- * stringtochar(a)
+      /* "netCDF4/_netCDF4.pyx":958
+ *     attname = bytestr
+ *     _grpid = grp._grpid
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len)
+ *     if ierr != NC_NOERR:
  */
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L5;
+        }
+        __pyx_L5:;
+      }
+  }
 
-  /* 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)
+  /* "netCDF4/_netCDF4.pyx":960
+ *     with nogil:
+ *         ierr = nc_inq_att(_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) {
 
-/* 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')")
+    /* "netCDF4/_netCDF4.pyx":961
+ *         ierr = nc_inq_att(_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_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;
+    __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 = 961; __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 = 961; __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 = 961; __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 = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-  /* "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)
+  /* "netCDF4/_netCDF4.pyx":977
+ *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
+ *         return pstring
+ *     elif att_type == NC_STRING:             # <<<<<<<<<<<<<<
+ *         if att_len == 1:
+ *             with nogil:
  */
-  __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) {
+  switch (__pyx_v_att_type) {
 
-    /* "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])
+    /* "netCDF4/_netCDF4.pyx":963
+ *         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')
+ *         with nogil:
  */
-    __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 = 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;}
-  }
+    case NC_CHAR:
 
-  /* "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))
+    /* "netCDF4/_netCDF4.pyx":964
+ *     # attribute is a character or string ...
+ *     if att_type == NC_CHAR:
+ *         value_arr = numpy.empty(att_len,'S1')             # <<<<<<<<<<<<<<
+ *         with nogil:
+ *             ierr = nc_get_att_text(_grpid, varid, attname, <char *>value_arr.data)
  */
-  __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);
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __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 = 964; __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 = 964; __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;
+      }
     }
-  }
-  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);
+    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __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;
     }
-  }
-  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);
+    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 = 964; __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_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_value_arr = ((PyArrayObject *)__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]
+    /* "netCDF4/_netCDF4.pyx":965
+ *     if att_type == NC_CHAR:
+ *         value_arr = numpy.empty(att_len,'S1')
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_get_att_text(_grpid, varid, attname, <char *>value_arr.data)
+ *         if ierr != NC_NOERR:
  */
-  __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;
+    {
+        #ifdef WITH_THREAD
+        PyThreadState *_save;
+        Py_UNBLOCK_THREADS
+        #endif
+        /*try:*/ {
 
-  /* "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
+          /* "netCDF4/_netCDF4.pyx":966
+ *         value_arr = numpy.empty(att_len,'S1')
+ *         with nogil:
+ *             ierr = nc_get_att_text(_grpid, varid, attname, <char *>value_arr.data)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-  __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;}
+          __pyx_v_ierr = nc_get_att_text(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, ((char *)__pyx_v_value_arr->data));
         }
-        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
- * 
+        /* "netCDF4/_netCDF4.pyx":965
+ *     if att_type == NC_CHAR:
+ *         value_arr = numpy.empty(att_len,'S1')
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_get_att_text(_grpid, varid, attname, <char *>value_arr.data)
+ *         if ierr != NC_NOERR:
  */
-  __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__6, 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;
+        /*finally:*/ {
+          /*normal exit:*/{
+            #ifdef WITH_THREAD
+            Py_BLOCK_THREADS
+            #endif
+            goto __pyx_L9;
+          }
+          __pyx_L9:;
+        }
+    }
 
-  /* "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'):
+    /* "netCDF4/_netCDF4.pyx":967
+ *         with nogil:
+ *             ierr = nc_get_att_text(_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_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_a);
-  __pyx_r = __pyx_v_a;
-  goto __pyx_L0;
+    __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_4) {
 
-  /* "utils.pyx":70
- *     return b
- * 
- * def chartostring(b):             # <<<<<<<<<<<<<<
- *     """
- * chartostring(b)
+      /* "netCDF4/_netCDF4.pyx":968
+ *             ierr = nc_get_att_text(_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 = 968; __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 = 968; __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 = 968; __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 = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-  /* 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;
-}
+    /* "netCDF4/_netCDF4.pyx":969
+ *         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 = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_10) {
+    } else {
+      __pyx_t_4 = __pyx_t_10;
+      goto __pyx_L12_bool_binop_done;
+    }
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __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 = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_4 = __pyx_t_10;
+    __pyx_L12_bool_binop_done:;
+    if (__pyx_t_4) {
 
-/* "utils.pyx":91
- *     return a
- * 
- * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
- *     """
- * date2num(dates,units,calendar='standard')
+      /* "netCDF4/_netCDF4.pyx":972
+ *             # 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 = 972; __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 = 972; __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_L11;
+    }
+    /*else*/ {
 
-/* 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--; }
+      /* "netCDF4/_netCDF4.pyx":975
+ *         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 = 975; __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 (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;}
+      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 = 975; __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 = 975; __pyx_clineno = __LINE__; goto __pyx_L1_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_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 = 975; __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 = 975; __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 = 975; __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 = 975; __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 = 975; __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 = 975; __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__3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __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_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);
+    __pyx_L11:;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":976
+ *             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;
 
-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_basedate = NULL;
-  PyObject *__pyx_v_unit = NULL;
-  int __pyx_v_isscalar;
-  PyObject *__pyx_v_shape = NULL;
-  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;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *__pyx_t_10 = NULL;
-  PyObject *__pyx_t_11 = NULL;
-  Py_ssize_t __pyx_t_12;
-  PyObject *(*__pyx_t_13)(PyObject *);
-  int __pyx_t_14;
-  PyObject *__pyx_t_15 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("date2num", 0);
-  __Pyx_INCREF(__pyx_v_dates);
+    /* "netCDF4/_netCDF4.pyx":977
+ *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
+ *         return pstring
+ *     elif att_type == NC_STRING:             # <<<<<<<<<<<<<<
+ *         if att_len == 1:
+ *             with nogil:
+ */
+    case NC_STRING:
 
-  /* "utils.pyx":120
- * @return: a numeric time value, or an array of numeric time values.
- *     """
- *     basedate = _dateparse(units)             # <<<<<<<<<<<<<<
- *     unit = units.split()[0].lower()
- * 
+    /* "netCDF4/_netCDF4.pyx":978
+ *         return pstring
+ *     elif att_type == NC_STRING:
+ *         if att_len == 1:             # <<<<<<<<<<<<<<
+ *             with nogil:
+ *                 ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
  */
-  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __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 = 120; __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 = 120; __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 = 120; __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;
+    __pyx_t_4 = ((__pyx_v_att_len == 1) != 0);
+    if (__pyx_t_4) {
 
-  /* "utils.pyx":121
- *     """
- *     basedate = _dateparse(units)
- *     unit = units.split()[0].lower()             # <<<<<<<<<<<<<<
- * 
- *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
+      /* "netCDF4/_netCDF4.pyx":979
+ *     elif att_type == NC_STRING:
+ *         if att_len == 1:
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
+ *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
  */
-  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __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_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __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 = 121; __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 = 121; __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 = 121; __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);
+      {
+          #ifdef WITH_THREAD
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
+          #endif
+          /*try:*/ {
+
+            /* "netCDF4/_netCDF4.pyx":980
+ *         if att_len == 1:
+ *             with nogil:
+ *                 ierr = nc_get_att_string(_grpid, varid, attname, &stratt)             # <<<<<<<<<<<<<<
+ *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
+ *             return pstring
+ */
+            __pyx_v_ierr = nc_get_att_string(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, (&__pyx_v_stratt));
+          }
+
+          /* "netCDF4/_netCDF4.pyx":979
+ *     elif att_type == NC_STRING:
+ *         if att_len == 1:
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
+ *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
+ */
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L17;
+            }
+            __pyx_L17:;
+          }
+      }
+
+      /* "netCDF4/_netCDF4.pyx":981
+ *             with nogil:
+ *                 ierr = nc_get_att_string(_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 = 981; __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 = 981; __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 = 981; __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 = 981; __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 = 981; __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 = 981; __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 = 981; __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__4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __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/_netCDF4.pyx":982
+ *                 ierr = nc_get_att_string(_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;
     }
-  }
-  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 = 121; __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 = 121; __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;
+    /*else*/ {
 
-  /* "utils.pyx":123
- *     unit = units.split()[0].lower()
- * 
- *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \             # <<<<<<<<<<<<<<
- *        (calendar in ['gregorian','standard'] and basedate > gregorian):
- *         # use python datetime module,
+      /* "netCDF4/_netCDF4.pyx":984
+ *             return pstring
+ *         else:
+ *             raise KeyError('vlen string array attributes not supported')             # <<<<<<<<<<<<<<
+ *     else:
+ *     # a regular numeric or compound type.
  */
-  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, 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) {
-    goto __pyx_L5_next_or;
-  } else {
-  }
-  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __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_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (!__pyx_t_6) {
-  } else {
-    __pyx_t_5 = __pyx_t_6;
-    goto __pyx_L4_bool_binop_done;
-  }
-  __pyx_L5_next_or:;
+      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __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 = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    break;
+    default:
 
-  /* "utils.pyx":124
- * 
- *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
- *        (calendar in ['gregorian','standard'] and basedate > gregorian):             # <<<<<<<<<<<<<<
- *         # use python datetime module,
- *         isscalar = False
+    /* "netCDF4/_netCDF4.pyx":987
+ *     else:
+ *     # a regular numeric or compound type.
+ *         if att_type == NC_LONG:             # <<<<<<<<<<<<<<
+ *             att_type = NC_INT
+ *         try:
  */
-  __Pyx_INCREF(__pyx_v_calendar);
-  __pyx_t_4 = __pyx_v_calendar;
-  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (!__pyx_t_7) {
-  } else {
-    __pyx_t_6 = __pyx_t_7;
-    goto __pyx_L8_bool_binop_done;
-  }
-  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_6 = __pyx_t_7;
-  __pyx_L8_bool_binop_done:;
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_7 = (__pyx_t_6 != 0);
-  if (__pyx_t_7) {
-  } else {
-    __pyx_t_5 = __pyx_t_7;
-    goto __pyx_L4_bool_binop_done;
-  }
-  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); 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);
-  __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 = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_5 = __pyx_t_7;
-  __pyx_L4_bool_binop_done:;
-  if (__pyx_t_5) {
+    __pyx_t_4 = ((__pyx_v_att_type == NC_LONG) != 0);
+    if (__pyx_t_4) {
 
-    /* "utils.pyx":126
- *        (calendar in ['gregorian','standard'] and basedate > gregorian):
- *         # use python datetime module,
- *         isscalar = False             # <<<<<<<<<<<<<<
+      /* "netCDF4/_netCDF4.pyx":988
+ *     # a regular numeric or compound type.
+ *         if att_type == NC_LONG:
+ *             att_type = NC_INT             # <<<<<<<<<<<<<<
  *         try:
- *             dates[0]
+ *             type_att = _nctonptype[att_type] # see if it is a primitive type
  */
-    __pyx_v_isscalar = 0;
+      __pyx_v_att_type = NC_INT;
+      goto __pyx_L18;
+    }
+    __pyx_L18:;
 
-    /* "utils.pyx":127
- *         # use python datetime module,
- *         isscalar = False
+    /* "netCDF4/_netCDF4.pyx":989
+ *         if att_type == NC_LONG:
+ *             att_type = NC_INT
  *         try:             # <<<<<<<<<<<<<<
- *             dates[0]
- *         except:
+ *             type_att = _nctonptype[att_type] # see if it is a primitive type
+ *         except KeyError:
  */
     {
-      __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);
+      __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:*/ {
 
-        /* "utils.pyx":128
- *         isscalar = False
+        /* "netCDF4/_netCDF4.pyx":990
+ *             att_type = NC_INT
  *         try:
- *             dates[0]             # <<<<<<<<<<<<<<
- *         except:
- *             isscalar = True
+ *             type_att = _nctonptype[att_type] # see if it is a primitive type             # <<<<<<<<<<<<<<
+ *         except KeyError:
+ *             # check if it's a compound
  */
-        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_dates, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L10_error;};
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L19_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 = 990; __pyx_clineno = __LINE__; goto __pyx_L19_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_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_L17_try_end;
-      __pyx_L10_error:;
-      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_L26_try_end;
+      __pyx_L19_error:;
       __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;
+      __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;
 
-      /* "utils.pyx":129
+      /* "netCDF4/_netCDF4.pyx":991
  *         try:
- *             dates[0]
- *         except:             # <<<<<<<<<<<<<<
- *             isscalar = True
- *         if isscalar:
+ *             type_att = _nctonptype[att_type] # see if it is a primitive type
+ *         except KeyError:             # <<<<<<<<<<<<<<
+ *             # check if it's a compound
+ *             try:
  */
-      /*except:*/ {
-        __Pyx_AddTraceback("netCDF4.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename);
-        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+      if (__pyx_t_3) {
+        __Pyx_AddTraceback("netCDF4._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 = 991; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_GOTREF(__pyx_t_7);
 
-        /* "utils.pyx":130
- *             dates[0]
- *         except:
- *             isscalar = True             # <<<<<<<<<<<<<<
- *         if isscalar:
- *             dates = numpy.array([dates])
+        /* "netCDF4/_netCDF4.pyx":993
+ *         except KeyError:
+ *             # check if it's a compound
+ *             try:             # <<<<<<<<<<<<<<
+ *                 type_att = _read_compound(grp, att_type)
+ *             except:
  */
-        __pyx_v_isscalar = 1;
-        __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_L11_exception_handled;
-      }
-      __pyx_L12_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_L1_error;
-      __pyx_L11_exception_handled:;
-      __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);
-      __pyx_L17_try_end:;
-    }
+        {
+          __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:*/ {
 
-    /* "utils.pyx":131
- *         except:
- *             isscalar = True
- *         if isscalar:             # <<<<<<<<<<<<<<
- *             dates = numpy.array([dates])
- *         else:
+            /* "netCDF4/_netCDF4.pyx":994
+ *             # 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_v_isscalar != 0);
-    if (__pyx_t_5) {
+            __pyx_t_5 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_grp, __pyx_v_att_type, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L29_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_L36_try_end;
+          __pyx_L29_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;
 
-      /* "utils.pyx":132
- *             isscalar = True
- *         if isscalar:
- *             dates = numpy.array([dates])             # <<<<<<<<<<<<<<
- *         else:
- *             dates = numpy.array(dates)
+          /* "netCDF4/_netCDF4.pyx":995
+ *             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)
  */
-      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_INCREF(__pyx_v_dates);
-      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_dates);
-      __Pyx_GIVEREF(__pyx_v_dates);
-      __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);
+          /*except:*/ {
+            __Pyx_AddTraceback("netCDF4._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 = 995; __pyx_clineno = __LINE__; goto __pyx_L31_except_error;}
+            __Pyx_GOTREF(__pyx_t_5);
+            __Pyx_GOTREF(__pyx_t_9);
+            __Pyx_GOTREF(__pyx_t_1);
+
+            /* "netCDF4/_netCDF4.pyx":996
+ *                 type_att = _read_compound(grp, att_type)
+ *             except:
+ *                 raise KeyError('attribute %s has unsupported datatype' % attname)             # <<<<<<<<<<<<<<
+ *         value_arr = numpy.empty(att_len,type_att)
+ *         with nogil:
+ */
+            __pyx_t_18 = __Pyx_PyBytes_FromString(__pyx_v_attname); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L31_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 = 996; __pyx_clineno = __LINE__; goto __pyx_L31_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 = 996; __pyx_clineno = __LINE__; goto __pyx_L31_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 = 996; __pyx_clineno = __LINE__; goto __pyx_L31_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 = 996; __pyx_clineno = __LINE__; goto __pyx_L31_except_error;}
+          }
+          __pyx_L31_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_L21_except_error;
+          __pyx_L36_try_end:;
         }
-      }
-      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 = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __Pyx_GOTREF(__pyx_t_1);
-      } else {
-        __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_11);
-        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
-        PyTuple_SET_ITEM(__pyx_t_11, 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_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        goto __pyx_L20_exception_handled;
       }
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF_SET(__pyx_v_dates, __pyx_t_1);
-      __pyx_t_1 = 0;
-      goto __pyx_L20;
+      goto __pyx_L21_except_error;
+      __pyx_L21_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_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_L26_try_end:;
     }
-    /*else*/ {
 
-      /* "utils.pyx":134
- *             dates = numpy.array([dates])
- *         else:
- *             dates = numpy.array(dates)             # <<<<<<<<<<<<<<
- *             shape = dates.shape
- *         ismasked = False
+    /* "netCDF4/_netCDF4.pyx":997
+ *             except:
+ *                 raise KeyError('attribute %s has unsupported datatype' % attname)
+ *         value_arr = numpy.empty(att_len,type_att)             # <<<<<<<<<<<<<<
+ *         with nogil:
+ *             ierr = nc_get_att(_grpid, varid, attname, value_arr.data)
  */
-      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_11);
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_t_2 = NULL;
-      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) {
-        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
-        if (likely(__pyx_t_2)) {
-          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
-          __Pyx_INCREF(__pyx_t_2);
-          __Pyx_INCREF(function);
-          __Pyx_DECREF_SET(__pyx_t_11, function);
-        }
-      }
-      if (!__pyx_t_2) {
-        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_dates); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __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 = 134; __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_dates);
-        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_dates);
-        __Pyx_GIVEREF(__pyx_v_dates);
-        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __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 = 997; __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 = 997; __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_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-      __Pyx_DECREF_SET(__pyx_v_dates, __pyx_t_1);
-      __pyx_t_1 = 0;
-
-      /* "utils.pyx":135
- *         else:
- *             dates = numpy.array(dates)
- *             shape = dates.shape             # <<<<<<<<<<<<<<
- *         ismasked = False
- *         if hasattr(dates,'mask'):
- */
-      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_v_shape = __pyx_t_1;
-      __pyx_t_1 = 0;
     }
-    __pyx_L20:;
-
-    /* "utils.pyx":136
- *             dates = numpy.array(dates)
- *             shape = dates.shape
- *         ismasked = False             # <<<<<<<<<<<<<<
- *         if hasattr(dates,'mask'):
- *             mask = dates.mask
- */
-    __pyx_v_ismasked = 0;
+    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __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 = 997; __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_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_7);
+    __pyx_t_7 = 0;
 
-    /* "utils.pyx":137
- *             shape = dates.shape
- *         ismasked = False
- *         if hasattr(dates,'mask'):             # <<<<<<<<<<<<<<
- *             mask = dates.mask
- *             ismasked = True
+    /* "netCDF4/_netCDF4.pyx":998
+ *                 raise KeyError('attribute %s has unsupported datatype' % attname)
+ *         value_arr = numpy.empty(att_len,type_att)
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_get_att(_grpid, varid, attname, value_arr.data)
+ *         if ierr != NC_NOERR:
  */
-    __pyx_t_5 = PyObject_HasAttr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_7 = (__pyx_t_5 != 0);
-    if (__pyx_t_7) {
+    {
+        #ifdef WITH_THREAD
+        PyThreadState *_save;
+        Py_UNBLOCK_THREADS
+        #endif
+        /*try:*/ {
 
-      /* "utils.pyx":138
- *         ismasked = False
- *         if hasattr(dates,'mask'):
- *             mask = dates.mask             # <<<<<<<<<<<<<<
- *             ismasked = True
- *         times = []
+          /* "netCDF4/_netCDF4.pyx":999
+ *         value_arr = numpy.empty(att_len,type_att)
+ *         with nogil:
+ *             ierr = nc_get_att(_grpid, varid, attname, value_arr.data)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-      __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 = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_v_mask = __pyx_t_1;
-      __pyx_t_1 = 0;
+          __pyx_v_ierr = nc_get_att(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, __pyx_v_value_arr->data);
+        }
 
-      /* "utils.pyx":139
- *         if hasattr(dates,'mask'):
- *             mask = dates.mask
- *             ismasked = True             # <<<<<<<<<<<<<<
- *         times = []
- *         for date in dates.flat:
+        /* "netCDF4/_netCDF4.pyx":998
+ *                 raise KeyError('attribute %s has unsupported datatype' % attname)
+ *         value_arr = numpy.empty(att_len,type_att)
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_get_att(_grpid, varid, attname, value_arr.data)
+ *         if ierr != NC_NOERR:
  */
-      __pyx_v_ismasked = 1;
-      goto __pyx_L21;
+        /*finally:*/ {
+          /*normal exit:*/{
+            #ifdef WITH_THREAD
+            Py_BLOCK_THREADS
+            #endif
+            goto __pyx_L41;
+          }
+          __pyx_L41:;
+        }
     }
-    __pyx_L21:;
 
-    /* "utils.pyx":140
- *             mask = dates.mask
- *             ismasked = True
- *         times = []             # <<<<<<<<<<<<<<
- *         for date in dates.flat:
- *             if ismasked and not date:
+    /* "netCDF4/_netCDF4.pyx":1000
+ *         with nogil:
+ *             ierr = nc_get_att(_grpid, varid, attname, value_arr.data)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if value_arr.shape == ():
  */
-    __pyx_t_1 = PyList_New(0); 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_times = ((PyObject*)__pyx_t_1);
-    __pyx_t_1 = 0;
+    __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_4) {
 
-    /* "utils.pyx":141
- *             ismasked = True
- *         times = []
- *         for date in dates.flat:             # <<<<<<<<<<<<<<
- *             if ismasked and not date:
- *                 times.append(None)
+      /* "netCDF4/_netCDF4.pyx":1001
+ *             ierr = nc_get_att(_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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __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_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); __pyx_t_12 = 0;
-      __pyx_t_13 = NULL;
-    } else {
-      __pyx_t_12 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 1001; __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 = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_11);
-      __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 1001; __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 = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    for (;;) {
-      if (likely(!__pyx_t_13)) {
-        if (likely(PyList_CheckExact(__pyx_t_11))) {
-          if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_11)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else {
-          if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        }
-      } else {
-        __pyx_t_1 = __pyx_t_13(__pyx_t_11);
-        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 = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          break;
-        }
-        __Pyx_GOTREF(__pyx_t_1);
-      }
-      __Pyx_XDECREF_SET(__pyx_v_date, __pyx_t_1);
-      __pyx_t_1 = 0;
 
-      /* "utils.pyx":142
- *         times = []
- *         for date in dates.flat:
- *             if ismasked and not date:             # <<<<<<<<<<<<<<
- *                 times.append(None)
- *             else:
+    /* "netCDF4/_netCDF4.pyx":1002
+ *         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_5 = (__pyx_v_ismasked != 0);
-      if (__pyx_t_5) {
-      } else {
-        __pyx_t_7 = __pyx_t_5;
-        goto __pyx_L25_bool_binop_done;
-      }
-      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_6 = ((!__pyx_t_5) != 0);
-      __pyx_t_7 = __pyx_t_6;
-      __pyx_L25_bool_binop_done:;
-      if (__pyx_t_7) {
+    __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 = 1002; __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 = 1002; __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 = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    if (__pyx_t_4) {
 
-        /* "utils.pyx":143
- *         for date in dates.flat:
- *             if ismasked and not date:
- *                 times.append(None)             # <<<<<<<<<<<<<<
- *             else:
- *                 td = date - basedate
+      /* "netCDF4/_netCDF4.pyx":1004
+ *         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_t_14 = __Pyx_PyList_Append(__pyx_v_times, Py_None); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L24;
+      __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 = 1004; __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);
+        }
       }
-      /*else*/ {
+      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 = 1004; __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 = 1004; __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;
+    }
 
-        /* "utils.pyx":145
- *                 times.append(None)
- *             else:
- *                 td = date - basedate             # <<<<<<<<<<<<<<
- *                 # total time in microseconds.
- *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
+    /* "netCDF4/_netCDF4.pyx":1005
+ *             # 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_1 = PyNumber_Subtract(__pyx_v_date, __pyx_v_basedate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_1);
-        __pyx_t_1 = 0;
+    __pyx_t_4 = ((__pyx_v_att_len == 1) != 0);
+    if (__pyx_t_4) {
 
-        /* "utils.pyx":147
- *                 td = date - basedate
- *                 # total time in microseconds.
- *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6             # <<<<<<<<<<<<<<
- *                 if unit == 'microseconds' or unit == 'microsecond':
- *                     times.append(totaltime)
+      /* "netCDF4/_netCDF4.pyx":1007
+ *         elif att_len == 1:
+ *             # return a scalar for a single element array
+ *             return value_arr[0]             # <<<<<<<<<<<<<<
+ *         else:
+ *             return value_arr
  */
-        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __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 = 147; __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 = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_int_24); 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_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_int_3600); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); 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_4); __pyx_t_4 = 0;
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_float_1_e6); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); 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_1); __pyx_t_1 = 0;
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __Pyx_XDECREF_SET(__pyx_v_totaltime, __pyx_t_3);
-        __pyx_t_3 = 0;
+      __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 = 1007; __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*/ {
 
-        /* "utils.pyx":148
- *                 # total time in microseconds.
- *                 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':
+      /* "netCDF4/_netCDF4.pyx":1009
+ *             return value_arr[0]
+ *         else:
+ *             return value_arr             # <<<<<<<<<<<<<<
+ * 
+ * def _set_default_format(object format='NETCDF4'):
  */
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_microseconds, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (!__pyx_t_6) {
-        } else {
-          __pyx_t_7 = __pyx_t_6;
-          goto __pyx_L28_bool_binop_done;
-        }
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_microsecond, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __pyx_t_6;
-        __pyx_L28_bool_binop_done:;
-        if (__pyx_t_7) {
+      __Pyx_XDECREF(__pyx_r);
+      __Pyx_INCREF(((PyObject *)__pyx_v_value_arr));
+      __pyx_r = ((PyObject *)__pyx_v_value_arr);
+      goto __pyx_L0;
+    }
+    break;
+  }
 
-          /* "utils.pyx":149
- *                 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_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_v_totaltime); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          goto __pyx_L27;
-        }
-
-        /* "utils.pyx":150
- *                 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_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_milliseconds, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (!__pyx_t_6) {
-        } else {
-          __pyx_t_7 = __pyx_t_6;
-          goto __pyx_L30_bool_binop_done;
-        }
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_millisecond, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __pyx_t_6;
-        __pyx_L30_bool_binop_done:;
-        if (__pyx_t_7) {
-
-          /* "utils.pyx":151
- *                     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_3 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          goto __pyx_L27;
-        }
-
-        /* "utils.pyx":152
- *                 elif unit == 'milliseconds' or unit == 'millisecond':
- *                     times.append(totaltime/1.e3)
- *                 elif unit == 'seconds' or unit == 'second':             # <<<<<<<<<<<<<<
- *                     times.append(totaltime/1.e6)
- *                 elif unit == 'minutes' or unit == 'minute':
- */
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_seconds, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (!__pyx_t_6) {
-        } else {
-          __pyx_t_7 = __pyx_t_6;
-          goto __pyx_L32_bool_binop_done;
-        }
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_second, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __pyx_t_6;
-        __pyx_L32_bool_binop_done:;
-        if (__pyx_t_7) {
-
-          /* "utils.pyx":153
- *                     times.append(totaltime/1.e3)
- *                 elif unit == 'seconds' or unit == 'second':
- *                     times.append(totaltime/1.e6)             # <<<<<<<<<<<<<<
- *                 elif unit == 'minutes' or unit == 'minute':
- *                     times.append(totaltime/1.e6/60)
- */
-          __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          goto __pyx_L27;
-        }
-
-        /* "utils.pyx":154
- *                 elif unit == 'seconds' or unit == 'second':
- *                     times.append(totaltime/1.e6)
- *                 elif unit == 'minutes' or unit == 'minute':             # <<<<<<<<<<<<<<
- *                     times.append(totaltime/1.e6/60)
- *                 elif unit == 'hours' or unit == 'hour':
- */
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_minutes, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (!__pyx_t_6) {
-        } else {
-          __pyx_t_7 = __pyx_t_6;
-          goto __pyx_L34_bool_binop_done;
-        }
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_minute, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __pyx_t_6;
-        __pyx_L34_bool_binop_done:;
-        if (__pyx_t_7) {
-
-          /* "utils.pyx":155
- *                     times.append(totaltime/1.e6)
- *                 elif unit == 'minutes' or unit == 'minute':
- *                     times.append(totaltime/1.e6/60)             # <<<<<<<<<<<<<<
- *                 elif unit == 'hours' or unit == 'hour':
- *                     times.append(totaltime/1.e6/3600)
- */
-          __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_int_60); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_2); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-          goto __pyx_L27;
-        }
-
-        /* "utils.pyx":156
- *                 elif unit == 'minutes' or unit == 'minute':
- *                     times.append(totaltime/1.e6/60)
- *                 elif unit == 'hours' or unit == 'hour':             # <<<<<<<<<<<<<<
- *                     times.append(totaltime/1.e6/3600)
- *                 elif unit == 'days' or unit == 'day':
- */
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_hours, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (!__pyx_t_6) {
-        } else {
-          __pyx_t_7 = __pyx_t_6;
-          goto __pyx_L36_bool_binop_done;
-        }
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_hour, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __pyx_t_6;
-        __pyx_L36_bool_binop_done:;
-        if (__pyx_t_7) {
-
-          /* "utils.pyx":157
- *                     times.append(totaltime/1.e6/60)
- *                 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_2 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); 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_t_3 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_int_3600); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          goto __pyx_L27;
-        }
-
-        /* "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_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_days, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (!__pyx_t_6) {
-        } else {
-          __pyx_t_7 = __pyx_t_6;
-          goto __pyx_L38_bool_binop_done;
-        }
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_day, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __pyx_t_6;
-        __pyx_L38_bool_binop_done:;
-        if (__pyx_t_7) {
-
-          /* "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_3 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_float_3600_); 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_3); __pyx_t_3 = 0;
-          __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_float_24_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-          goto __pyx_L27;
-        }
-        __pyx_L27:;
-      }
-      __pyx_L24:;
-
-      /* "utils.pyx":141
- *             ismasked = True
- *         times = []
- *         for date in dates.flat:             # <<<<<<<<<<<<<<
- *             if ismasked and not date:
- *                 times.append(None)
- */
-    }
-    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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_7 = (__pyx_v_isscalar != 0);
-    if (__pyx_t_7) {
-
-      /* "utils.pyx":161
- *                     times.append(totaltime/1.e6/3600./24.)
- *         if isscalar:
- *             return times[0]             # <<<<<<<<<<<<<<
- *         else:
- *             return numpy.reshape(numpy.array(times), shape)
- */
-      __Pyx_XDECREF(__pyx_r);
-      __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_times, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 161; __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*/ {
-
-      /* "utils.pyx":163
- *             return times[0]
- *         else:
- *             return numpy.reshape(numpy.array(times), shape)             # <<<<<<<<<<<<<<
- *     else: # use netcdftime module for other calendars
- *         cdftime = netcdftime.utime(units,calendar=calendar)
- */
-      __Pyx_XDECREF(__pyx_r);
-      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_1 = NULL;
-      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_times); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-      } else {
-        __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_15);
-        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
-        __Pyx_INCREF(__pyx_v_times);
-        PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_times);
-        __Pyx_GIVEREF(__pyx_v_times);
-        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-      }
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-      __pyx_t_4 = NULL;
-      __pyx_t_12 = 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_12 = 1;
-        }
-      }
-      __pyx_t_15 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_15);
-      if (__pyx_t_4) {
-        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+__pyx_t_12, __pyx_t_3);
-      __Pyx_GIVEREF(__pyx_t_3);
-      __Pyx_INCREF(__pyx_v_shape);
-      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_12, __pyx_v_shape);
-      __Pyx_GIVEREF(__pyx_v_shape);
-      __pyx_t_3 = 0;
-      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_11);
-      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __pyx_r = __pyx_t_11;
-      __pyx_t_11 = 0;
-      goto __pyx_L0;
-    }
-  }
-  /*else*/ {
-
-    /* "utils.pyx":165
- *             return numpy.reshape(numpy.array(times), shape)
- *     else: # use netcdftime module for other calendars
- *         cdftime = netcdftime.utime(units,calendar=calendar)             # <<<<<<<<<<<<<<
- *         return cdftime.date2num(dates)
- * 
- */
-    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_11);
-    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __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_11); __pyx_t_11 = 0;
-    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_11);
-    __Pyx_INCREF(__pyx_v_units);
-    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_units);
-    __Pyx_GIVEREF(__pyx_v_units);
-    __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_15);
-    if (PyDict_SetItem(__pyx_t_15, __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_11, __pyx_t_15); 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_11); __pyx_t_11 = 0;
-    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-    __pyx_v_cdftime = __pyx_t_3;
-    __pyx_t_3 = 0;
-
-    /* "utils.pyx":166
- *     else: # use netcdftime module for other calendars
- *         cdftime = netcdftime.utime(units,calendar=calendar)
- *         return cdftime.date2num(dates)             # <<<<<<<<<<<<<<
- * 
- * def num2date(times,units,calendar='standard'):
- */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_date2num); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_15);
-    __pyx_t_11 = NULL;
-    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_15))) {
-      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_15);
-      if (likely(__pyx_t_11)) {
-        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
-        __Pyx_INCREF(__pyx_t_11);
-        __Pyx_INCREF(function);
-        __Pyx_DECREF_SET(__pyx_t_15, function);
-      }
-    }
-    if (!__pyx_t_11) {
-      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __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_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 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_15, __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_15); __pyx_t_15 = 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')
+  /* "netCDF4/_netCDF4.pyx":947
+ *     return attslist
+ * 
+ * cdef _get_att(grp, int varid, name):             # <<<<<<<<<<<<<<
+ *     # Private function to get an attribute value given its name
+ *     cdef int ierr, n, _grpid
  */
 
   /* 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_9);
   __Pyx_XDECREF(__pyx_t_11);
-  __Pyx_XDECREF(__pyx_t_15);
-  __Pyx_AddTraceback("netCDF4.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+  __Pyx_XDECREF(__pyx_t_18);
+  __Pyx_XDECREF(__pyx_t_19);
+  __Pyx_AddTraceback("netCDF4._netCDF4._get_att", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_basedate);
-  __Pyx_XDECREF(__pyx_v_unit);
-  __Pyx_XDECREF(__pyx_v_shape);
-  __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_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;
 }
 
-/* "utils.pyx":168
- *         return cdftime.date2num(dates)
+/* "netCDF4/_netCDF4.pyx":1011
+ *             return value_arr
  * 
- * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
- *     """
- * num2date(times,units,calendar='standard')
+ * 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_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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_5_set_default_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_5_set_default_format = {"_set_default_format", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_5_set_default_format, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_5_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("num2date (wrapper)", 0);
+  __Pyx_RefNannySetupContext("_set_default_format (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);
+    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  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;
@@ -5069,4485 +4292,4434 @@ static PyObject *__pyx_pw_7netCDF4_11num2date(PyObject *__pyx_self, PyObject *__
       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--; }
+          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, "num2date") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_set_default_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __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;
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
         default: goto __pyx_L5_argtuple_error;
       }
     }
-    __pyx_v_times = values[0];
-    __pyx_v_units = values[1];
-    __pyx_v_calendar = values[2];
+    __pyx_v_format = values[0];
   }
   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_RaiseArgtupleInvalid("_set_default_format", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("netCDF4._netCDF4._set_default_format", __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);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_4_set_default_format(__pyx_self, __pyx_v_format);
 
   /* 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_basedate = NULL;
-  PyObject *__pyx_v_unit = NULL;
-  int __pyx_v_isscalar;
-  PyObject *__pyx_v_shape = NULL;
-  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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_4_set_default_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_1;
   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;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *__pyx_t_9 = NULL;
-  PyObject *__pyx_t_10 = NULL;
-  Py_ssize_t __pyx_t_11;
-  PyObject *(*__pyx_t_12)(PyObject *);
-  int __pyx_t_13;
-  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("num2date", 0);
-  __Pyx_INCREF(__pyx_v_times);
-  __Pyx_INCREF(__pyx_v_calendar);
+  __Pyx_RefNannySetupContext("_set_default_format", 0);
 
-  /* "utils.pyx":205
- * contains one.
- *     """
- *     calendar = calendar.lower()             # <<<<<<<<<<<<<<
- *     basedate = _dateparse(units)
- *     unit = units.split()[0].lower()
+  /* "netCDF4/_netCDF4.pyx":1013
+ * 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __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);
-    }
+  __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 = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4/_netCDF4.pyx":1014
+ *     # 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;
   }
-  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 = 205; __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 = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4/_netCDF4.pyx":1015
+ *     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 = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4/_netCDF4.pyx":1016
+ *         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;
   }
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __Pyx_DECREF_SET(__pyx_v_calendar, __pyx_t_1);
-  __pyx_t_1 = 0;
 
-  /* "utils.pyx":206
- *     """
- *     calendar = calendar.lower()
- *     basedate = _dateparse(units)             # <<<<<<<<<<<<<<
- *     unit = units.split()[0].lower()
- * 
+  /* "netCDF4/_netCDF4.pyx":1017
+ *     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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 206; __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);
-    }
+  __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 = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4/_netCDF4.pyx":1018
+ *         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;
   }
-  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 = 206; __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 = 206; __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 = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":1019
+ *     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 = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4/_netCDF4.pyx":1020
+ *         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;
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_v_basedate = __pyx_t_1;
-  __pyx_t_1 = 0;
+  /*else*/ {
 
-  /* "utils.pyx":207
- *     calendar = calendar.lower()
- *     basedate = _dateparse(units)
- *     unit = units.split()[0].lower()             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":1022
+ *         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)             # <<<<<<<<<<<<<<
  * 
- *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
+ * cdef _get_format(int grpid):
  */
-  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __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_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 1022; __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 = 1022; __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 = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     __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 = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __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 = 207; __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 = 207; __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 = 207; __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 = 207; __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;
+  __pyx_L3:;
 
-  /* "utils.pyx":209
- *     unit = units.split()[0].lower()
+  /* "netCDF4/_netCDF4.pyx":1011
+ *             return value_arr
  * 
- *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \             # <<<<<<<<<<<<<<
- *        (calendar in ['gregorian','standard'] and basedate > gregorian):
- *         # use python datetime module,
+ * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
+ *     # Private function to set the netCDF file format
+ *     if format == 'NETCDF4':
  */
-  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, 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) {
-    goto __pyx_L5_next_or;
-  } else {
-  }
-  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __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_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (!__pyx_t_6) {
-  } else {
-    __pyx_t_5 = __pyx_t_6;
-    goto __pyx_L4_bool_binop_done;
-  }
-  __pyx_L5_next_or:;
 
-  /* "utils.pyx":210
+  /* 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._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/_netCDF4.pyx":1024
+ *         raise ValueError("format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'" % format)
  * 
- *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
- *        (calendar in ['gregorian','standard'] and basedate > gregorian):             # <<<<<<<<<<<<<<
- *         # use python datetime module,
- *         isscalar = False
+ * cdef _get_format(int grpid):             # <<<<<<<<<<<<<<
+ *     # Private function to get the netCDF file format
+ *     cdef int ierr, formatp
  */
-  __Pyx_INCREF(__pyx_v_calendar);
-  __pyx_t_4 = __pyx_v_calendar;
-  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (!__pyx_t_7) {
-  } else {
-    __pyx_t_6 = __pyx_t_7;
-    goto __pyx_L8_bool_binop_done;
-  }
-  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_6 = __pyx_t_7;
-  __pyx_L8_bool_binop_done:;
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_7 = (__pyx_t_6 != 0);
-  if (__pyx_t_7) {
-  } else {
-    __pyx_t_5 = __pyx_t_7;
-    goto __pyx_L4_bool_binop_done;
-  }
-  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); 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);
-  __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 = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_5 = __pyx_t_7;
-  __pyx_L4_bool_binop_done:;
-  if (__pyx_t_5) {
 
-    /* "utils.pyx":212
- *        (calendar in ['gregorian','standard'] and basedate > gregorian):
- *         # use python datetime module,
- *         isscalar = False             # <<<<<<<<<<<<<<
- *         try:
- *             times[0]
- */
-    __pyx_v_isscalar = 0;
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__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);
 
-    /* "utils.pyx":213
- *         # use python datetime module,
- *         isscalar = False
- *         try:             # <<<<<<<<<<<<<<
- *             times[0]
- *         except:
+  /* "netCDF4/_netCDF4.pyx":1027
+ *     # Private function to get the netCDF file format
+ *     cdef int ierr, formatp
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_format(grpid, &formatp)
+ *     if ierr != NC_NOERR:
  */
-    {
-      __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);
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
       /*try:*/ {
 
-        /* "utils.pyx":214
- *         isscalar = False
- *         try:
- *             times[0]             # <<<<<<<<<<<<<<
- *         except:
- *             isscalar = True
+        /* "netCDF4/_netCDF4.pyx":1028
+ *     cdef int ierr, formatp
+ *     with nogil:
+ *         ierr = nc_inq_format(grpid, &formatp)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_times, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L10_error;};
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_v_ierr = nc_inq_format(__pyx_v_grpid, (&__pyx_v_formatp));
       }
-      __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_L17_try_end;
-      __pyx_L10_error:;
-      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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;
-
-      /* "utils.pyx":215
- *         try:
- *             times[0]
- *         except:             # <<<<<<<<<<<<<<
- *             isscalar = True
- *         if isscalar:
- */
-      /*except:*/ {
-        __Pyx_AddTraceback("netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
-        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_GOTREF(__pyx_t_1);
 
-        /* "utils.pyx":216
- *             times[0]
- *         except:
- *             isscalar = True             # <<<<<<<<<<<<<<
- *         if isscalar:
- *             times = numpy.array([times],dtype='d')
+      /* "netCDF4/_netCDF4.pyx":1027
+ *     # Private function to get the netCDF file format
+ *     cdef int ierr, formatp
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_format(grpid, &formatp)
+ *     if ierr != NC_NOERR:
  */
-        __pyx_v_isscalar = 1;
-        __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_L11_exception_handled;
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L5;
+        }
+        __pyx_L5:;
       }
-      __pyx_L12_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_L1_error;
-      __pyx_L11_exception_handled:;
-      __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);
-      __pyx_L17_try_end:;
-    }
+  }
 
-    /* "utils.pyx":217
- *         except:
- *             isscalar = True
- *         if isscalar:             # <<<<<<<<<<<<<<
- *             times = numpy.array([times],dtype='d')
- *         else:
+  /* "netCDF4/_netCDF4.pyx":1029
+ *     with nogil:
+ *         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_5 = (__pyx_v_isscalar != 0);
-    if (__pyx_t_5) {
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
 
-      /* "utils.pyx":218
- *             isscalar = True
- *         if isscalar:
- *             times = numpy.array([times],dtype='d')             # <<<<<<<<<<<<<<
- *         else:
- *             times = numpy.array(times, dtype='d')
+    /* "netCDF4/_netCDF4.pyx":1030
+ *         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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __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 = 0;
-      __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_d) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __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_2); __pyx_t_2 = 0;
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_3);
-      __pyx_t_3 = 0;
-      goto __pyx_L20;
-    }
-    /*else*/ {
+    __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 = 1030; __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 = 1030; __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 = 1030; __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 = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-      /* "utils.pyx":220
- *             times = numpy.array([times],dtype='d')
- *         else:
- *             times = numpy.array(times, dtype='d')             # <<<<<<<<<<<<<<
- *             shape = times.shape
- *         ismasked = False
+  /* "netCDF4/_netCDF4.pyx":1037
+ *     elif formatp == NC_FORMAT_64BIT:
+ *         return 'NETCDF3_64BIT'
+ *     elif formatp == NC_FORMAT_CLASSIC:             # <<<<<<<<<<<<<<
+ *         return 'NETCDF3_CLASSIC'
+ * 
  */
-      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __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[1]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_INCREF(__pyx_v_times);
-      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_times);
-      __Pyx_GIVEREF(__pyx_v_times);
-      __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_d) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_4);
-      __pyx_t_4 = 0;
+  switch (__pyx_v_formatp) {
 
-      /* "utils.pyx":221
- *         else:
- *             times = numpy.array(times, dtype='d')
- *             shape = times.shape             # <<<<<<<<<<<<<<
- *         ismasked = False
- *         if hasattr(times,'mask'):
+    /* "netCDF4/_netCDF4.pyx":1031
+ *     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:
  */
-      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_v_shape = __pyx_t_4;
-      __pyx_t_4 = 0;
-    }
-    __pyx_L20:;
+    case NC_FORMAT_NETCDF4:
 
-    /* "utils.pyx":222
- *             times = numpy.array(times, dtype='d')
- *             shape = times.shape
- *         ismasked = False             # <<<<<<<<<<<<<<
- *         if hasattr(times,'mask'):
- *             mask = times.mask
+    /* "netCDF4/_netCDF4.pyx":1032
+ *         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_v_ismasked = 0;
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_NETCDF4);
+    __pyx_r = __pyx_n_s_NETCDF4;
+    goto __pyx_L0;
+    break;
 
-    /* "utils.pyx":223
- *             shape = times.shape
- *         ismasked = False
- *         if hasattr(times,'mask'):             # <<<<<<<<<<<<<<
- *             mask = times.mask
- *             ismasked = True
+    /* "netCDF4/_netCDF4.pyx":1033
+ *     if formatp == NC_FORMAT_NETCDF4:
+ *         return 'NETCDF4'
+ *     elif formatp == NC_FORMAT_NETCDF4_CLASSIC:             # <<<<<<<<<<<<<<
+ *         return 'NETCDF4_CLASSIC'
+ *     elif formatp == NC_FORMAT_64BIT:
  */
-    __pyx_t_5 = PyObject_HasAttr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_7 = (__pyx_t_5 != 0);
-    if (__pyx_t_7) {
+    case NC_FORMAT_NETCDF4_CLASSIC:
 
-      /* "utils.pyx":224
- *         ismasked = False
- *         if hasattr(times,'mask'):
- *             mask = times.mask             # <<<<<<<<<<<<<<
- *             ismasked = True
- *         dates = []
+    /* "netCDF4/_netCDF4.pyx":1034
+ *         return 'NETCDF4'
+ *     elif formatp == NC_FORMAT_NETCDF4_CLASSIC:
+ *         return 'NETCDF4_CLASSIC'             # <<<<<<<<<<<<<<
+ *     elif formatp == NC_FORMAT_64BIT:
+ *         return 'NETCDF3_64BIT'
  */
-      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __pyx_v_mask = __pyx_t_4;
-      __pyx_t_4 = 0;
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_NETCDF4_CLASSIC);
+    __pyx_r = __pyx_n_s_NETCDF4_CLASSIC;
+    goto __pyx_L0;
+    break;
 
-      /* "utils.pyx":225
- *         if hasattr(times,'mask'):
- *             mask = times.mask
- *             ismasked = True             # <<<<<<<<<<<<<<
- *         dates = []
- *         for time in times.flat:
+    /* "netCDF4/_netCDF4.pyx":1035
+ *     elif formatp == NC_FORMAT_NETCDF4_CLASSIC:
+ *         return 'NETCDF4_CLASSIC'
+ *     elif formatp == NC_FORMAT_64BIT:             # <<<<<<<<<<<<<<
+ *         return 'NETCDF3_64BIT'
+ *     elif formatp == NC_FORMAT_CLASSIC:
  */
-      __pyx_v_ismasked = 1;
-      goto __pyx_L21;
-    }
-    __pyx_L21:;
+    case NC_FORMAT_64BIT:
 
-    /* "utils.pyx":226
- *             mask = times.mask
- *             ismasked = True
- *         dates = []             # <<<<<<<<<<<<<<
- *         for time in times.flat:
- *             if ismasked and not time:
+    /* "netCDF4/_netCDF4.pyx":1036
+ *         return 'NETCDF4_CLASSIC'
+ *     elif formatp == NC_FORMAT_64BIT:
+ *         return 'NETCDF3_64BIT'             # <<<<<<<<<<<<<<
+ *     elif formatp == NC_FORMAT_CLASSIC:
+ *         return 'NETCDF3_CLASSIC'
  */
-    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __pyx_v_dates = ((PyObject*)__pyx_t_4);
-    __pyx_t_4 = 0;
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_NETCDF3_64BIT);
+    __pyx_r = __pyx_n_s_NETCDF3_64BIT;
+    goto __pyx_L0;
+    break;
 
-    /* "utils.pyx":227
- *             ismasked = True
- *         dates = []
- *         for time in times.flat:             # <<<<<<<<<<<<<<
- *             if ismasked and not time:
- *                 dates.append(None)
+    /* "netCDF4/_netCDF4.pyx":1037
+ *     elif formatp == NC_FORMAT_64BIT:
+ *         return 'NETCDF3_64BIT'
+ *     elif formatp == NC_FORMAT_CLASSIC:             # <<<<<<<<<<<<<<
+ *         return 'NETCDF3_CLASSIC'
+ * 
  */
-    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_flat); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 227; __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_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_11 = 0;
-      __pyx_t_12 = NULL;
-    } else {
-      __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    for (;;) {
-      if (likely(!__pyx_t_12)) {
-        if (likely(PyList_CheckExact(__pyx_t_2))) {
-          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_2)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        } else {
-          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-          #if CYTHON_COMPILING_IN_CPYTHON
-          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #else
-          __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
-        }
-      } else {
-        __pyx_t_4 = __pyx_t_12(__pyx_t_2);
-        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 = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          break;
-        }
-        __Pyx_GOTREF(__pyx_t_4);
-      }
-      __Pyx_XDECREF_SET(__pyx_v_time, __pyx_t_4);
-      __pyx_t_4 = 0;
+    case NC_FORMAT_CLASSIC:
 
-      /* "utils.pyx":228
- *         dates = []
- *         for time in times.flat:
- *             if ismasked and not time:             # <<<<<<<<<<<<<<
- *                 dates.append(None)
- *             else:
+    /* "netCDF4/_netCDF4.pyx":1038
+ *         return 'NETCDF3_64BIT'
+ *     elif formatp == NC_FORMAT_CLASSIC:
+ *         return 'NETCDF3_CLASSIC'             # <<<<<<<<<<<<<<
+ * 
+ * cdef _get_full_format(int grpid):
  */
-      __pyx_t_5 = (__pyx_v_ismasked != 0);
-      if (__pyx_t_5) {
-      } else {
-        __pyx_t_7 = __pyx_t_5;
-        goto __pyx_L25_bool_binop_done;
-      }
-      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_time); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_6 = ((!__pyx_t_5) != 0);
-      __pyx_t_7 = __pyx_t_6;
-      __pyx_L25_bool_binop_done:;
-      if (__pyx_t_7) {
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_NETCDF3_CLASSIC);
+    __pyx_r = __pyx_n_s_NETCDF3_CLASSIC;
+    goto __pyx_L0;
+    break;
+    default: break;
+  }
 
-        /* "utils.pyx":229
- *         for time in times.flat:
- *             if ismasked and not time:
- *                 dates.append(None)             # <<<<<<<<<<<<<<
- *             else:
- *                 # convert to total seconds
+  /* "netCDF4/_netCDF4.pyx":1024
+ *         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
  */
-        __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dates, Py_None); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L24;
-      }
-      /*else*/ {
 
-        /* "utils.pyx":232
- *             else:
- *                 # convert to total seconds
- *                 if unit == 'microseconds' or unit == 'microsecond':             # <<<<<<<<<<<<<<
- *                     tsecs = time/1.e6
- *                 elif unit == 'milliseconds' or unit == 'millisecond':
- */
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_microseconds, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (!__pyx_t_6) {
-        } else {
-          __pyx_t_7 = __pyx_t_6;
-          goto __pyx_L28_bool_binop_done;
-        }
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_microsecond, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __pyx_t_6;
-        __pyx_L28_bool_binop_done:;
-        if (__pyx_t_7) {
+  /* 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._netCDF4._get_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "utils.pyx":233
- *                 # convert to total seconds
- *                 if unit == 'microseconds' or unit == 'microsecond':
- *                     tsecs = time/1.e6             # <<<<<<<<<<<<<<
- *                 elif unit == 'milliseconds' or unit == 'millisecond':
- *                     tsecs = time/1.e3
+/* "netCDF4/_netCDF4.pyx":1040
+ *         return 'NETCDF3_CLASSIC'
+ * 
+ * cdef _get_full_format(int grpid):             # <<<<<<<<<<<<<<
+ *     # Private function to get the underlying disk format
+ *     cdef int ierr, formatp, modep
  */
-          __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_v_time, __pyx_float_1_e6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_4);
-          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
-          __pyx_t_4 = 0;
-          goto __pyx_L27;
-        }
 
-        /* "utils.pyx":234
- *                 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_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_milliseconds, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (!__pyx_t_6) {
-        } else {
-          __pyx_t_7 = __pyx_t_6;
-          goto __pyx_L30_bool_binop_done;
-        }
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_millisecond, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __pyx_t_6;
-        __pyx_L30_bool_binop_done:;
-        if (__pyx_t_7) {
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_full_format(CYTHON_UNUSED int __pyx_v_grpid) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_get_full_format", 0);
 
-          /* "utils.pyx":235
- *                     tsecs = time/1.e6
- *                 elif unit == 'milliseconds' or unit == 'millisecond':
- *                     tsecs = time/1.e3             # <<<<<<<<<<<<<<
- *                 elif unit == 'seconds' or unit == 'second':
- *                     tsecs = time
+  /* "netCDF4/_netCDF4.pyx":1063
+ *             return 'UNDEFINED'
+ *     ELSE:
+ *         return 'UNDEFINED'             # <<<<<<<<<<<<<<
+ * 
+ * cdef _set_att(grp, int varid, name, value):
  */
-          __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_v_time, __pyx_float_1_e3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_4);
-          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
-          __pyx_t_4 = 0;
-          goto __pyx_L27;
-        }
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_n_s_UNDEFINED);
+  __pyx_r = __pyx_n_s_UNDEFINED;
+  goto __pyx_L0;
 
-        /* "utils.pyx":236
- *                 elif unit == 'milliseconds' or unit == 'millisecond':
- *                     tsecs = time/1.e3
- *                 elif unit == 'seconds' or unit == 'second':             # <<<<<<<<<<<<<<
- *                     tsecs = time
- *                 elif unit == 'minutes' or unit == 'minute':
- */
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_seconds, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (!__pyx_t_6) {
-        } else {
-          __pyx_t_7 = __pyx_t_6;
-          goto __pyx_L32_bool_binop_done;
-        }
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_second, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __pyx_t_6;
-        __pyx_L32_bool_binop_done:;
-        if (__pyx_t_7) {
-
-          /* "utils.pyx":237
- *                     tsecs = time/1.e3
- *                 elif unit == 'seconds' or unit == 'second':
- *                     tsecs = time             # <<<<<<<<<<<<<<
- *                 elif unit == 'minutes' or unit == 'minute':
- *                     tsecs = time*60.
- */
-          __Pyx_INCREF(__pyx_v_time);
-          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_v_time);
-          goto __pyx_L27;
-        }
-
-        /* "utils.pyx":238
- *                 elif unit == 'seconds' or unit == 'second':
- *                     tsecs = time
- *                 elif unit == 'minutes' or unit == 'minute':             # <<<<<<<<<<<<<<
- *                     tsecs = time*60.
- *                 elif unit == 'hours' or unit == 'hour':
- */
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_minutes, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (!__pyx_t_6) {
-        } else {
-          __pyx_t_7 = __pyx_t_6;
-          goto __pyx_L34_bool_binop_done;
-        }
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_minute, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __pyx_t_6;
-        __pyx_L34_bool_binop_done:;
-        if (__pyx_t_7) {
-
-          /* "utils.pyx":239
- *                     tsecs = time
- *                 elif unit == 'minutes' or unit == 'minute':
- *                     tsecs = time*60.             # <<<<<<<<<<<<<<
- *                 elif unit == 'hours' or unit == 'hour':
- *                     tsecs = time*3600.
+  /* "netCDF4/_netCDF4.pyx":1040
+ *         return 'NETCDF3_CLASSIC'
+ * 
+ * cdef _get_full_format(int grpid):             # <<<<<<<<<<<<<<
+ *     # Private function to get the underlying disk format
+ *     cdef int ierr, formatp, modep
  */
-          __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_60_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_4);
-          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
-          __pyx_t_4 = 0;
-          goto __pyx_L27;
-        }
 
-        /* "utils.pyx":240
- *                 elif unit == 'minutes' or unit == 'minute':
- *                     tsecs = time*60.
- *                 elif unit == 'hours' or unit == 'hour':             # <<<<<<<<<<<<<<
- *                     tsecs = time*3600.
- *                 elif unit == 'days' or unit == 'day':
- */
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_hours, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (!__pyx_t_6) {
-        } else {
-          __pyx_t_7 = __pyx_t_6;
-          goto __pyx_L36_bool_binop_done;
-        }
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_hour, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __pyx_t_6;
-        __pyx_L36_bool_binop_done:;
-        if (__pyx_t_7) {
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "utils.pyx":241
- *                     tsecs = time*60.
- *                 elif unit == 'hours' or unit == 'hour':
- *                     tsecs = time*3600.             # <<<<<<<<<<<<<<
- *                 elif unit == 'days' or unit == 'day':
- *                     tsecs = time*86400.
+/* "netCDF4/_netCDF4.pyx":1065
+ *         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
  */
-          __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_3600_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_4);
-          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
-          __pyx_t_4 = 0;
-          goto __pyx_L27;
-        }
 
-        /* "utils.pyx":242
- *                 elif unit == 'hours' or unit == 'hour':
- *                     tsecs = time*3600.
- *                 elif unit == 'days' or unit == 'day':             # <<<<<<<<<<<<<<
- *                     tsecs = time*86400.
- *                 # compute time delta.
- */
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_days, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (!__pyx_t_6) {
-        } else {
-          __pyx_t_7 = __pyx_t_6;
-          goto __pyx_L38_bool_binop_done;
-        }
-        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_day, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __pyx_t_6;
-        __pyx_L38_bool_binop_done:;
-        if (__pyx_t_7) {
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__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);
 
-          /* "utils.pyx":243
- *                     tsecs = time*3600.
- *                 elif unit == 'days' or unit == 'day':
- *                     tsecs = time*86400.             # <<<<<<<<<<<<<<
- *                 # compute time delta.
- *                 days = tsecs // 86400.
+  /* "netCDF4/_netCDF4.pyx":1071
+ *     cdef char *datstring
+ *     cdef ndarray value_arr
+ *     bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *     attname = bytestr
+ *     # put attribute value into a numpy array.
  */
-          __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_86400_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_4);
-          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
-          __pyx_t_4 = 0;
-          goto __pyx_L27;
-        }
-        __pyx_L27:;
+  __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); 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_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-        /* "utils.pyx":245
- *                     tsecs = time*86400.
- *                 # compute time delta.
- *                 days = tsecs // 86400.             # <<<<<<<<<<<<<<
- *                 msecsd = tsecs*1.e6 - days*86400.*1.e6
- *                 secs = msecsd // 1.e6
+  /* "netCDF4/_netCDF4.pyx":1072
+ *     cdef ndarray value_arr
+ *     bytestr = _strencode(name)
+ *     attname = bytestr             # <<<<<<<<<<<<<<
+ *     # put attribute value into a numpy array.
+ *     value_arr = numpy.array(value)
  */
-        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_4 = PyNumber_FloorDivide(__pyx_v_tsecs, __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_XDECREF_SET(__pyx_v_days, __pyx_t_4);
-        __pyx_t_4 = 0;
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_attname = __pyx_t_2;
 
-        /* "utils.pyx":246
- *                 # compute time delta.
- *                 days = tsecs // 86400.
- *                 msecsd = tsecs*1.e6 - days*86400.*1.e6             # <<<<<<<<<<<<<<
- *                 secs = msecsd // 1.e6
- *                 msecs = numpy.round(msecsd - secs*1.e6)
+  /* "netCDF4/_netCDF4.pyx":1074
+ *     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.
  */
-        if (unlikely(!__pyx_v_tsecs)) { __Pyx_RaiseUnboundLocalError("tsecs"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-        __pyx_t_4 = PyNumber_Multiply(__pyx_v_tsecs, __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_t_3 = PyNumber_Multiply(__pyx_v_days, __pyx_float_86400_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_float_1_e6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 246; __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_XDECREF_SET(__pyx_v_msecsd, __pyx_t_3);
-        __pyx_t_3 = 0;
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __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 = 1074; __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 = 1074; __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 = 1074; __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 = 1074; __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_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_1);
+  __pyx_t_1 = 0;
 
-        /* "utils.pyx":247
- *                 days = tsecs // 86400.
- *                 msecsd = tsecs*1.e6 - days*86400.*1.e6
- *                 secs = msecsd // 1.e6             # <<<<<<<<<<<<<<
- *                 msecs = numpy.round(msecsd - secs*1.e6)
- *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)
+  /* "netCDF4/_netCDF4.pyx":1077
+ *     # 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_3 = PyNumber_FloorDivide(__pyx_v_msecsd, __pyx_float_1_e6); 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_XDECREF_SET(__pyx_v_secs, __pyx_t_3);
-        __pyx_t_3 = 0;
+  __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 = 1077; __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 = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_format(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_fmt = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-        /* "utils.pyx":248
- *                 msecsd = tsecs*1.e6 - days*86400.*1.e6
- *                 secs = msecsd // 1.e6
- *                 msecs = numpy.round(msecsd - secs*1.e6)             # <<<<<<<<<<<<<<
- *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)
- *                 # add time delta to base date.
+  /* "netCDF4/_netCDF4.pyx":1078
+ *     # 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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_round); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __pyx_t_1 = PyNumber_Multiply(__pyx_v_secs, __pyx_float_1_e6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_14 = PyNumber_Subtract(__pyx_v_msecsd, __pyx_t_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_14);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __pyx_t_1 = NULL;
-        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_14); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-          __Pyx_GOTREF(__pyx_t_3);
-        } else {
-          __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_15);
-          PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
-          PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_14);
-          __Pyx_GIVEREF(__pyx_t_14);
-          __pyx_t_14 = 0;
-          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); 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);
-          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-        }
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __Pyx_XDECREF_SET(__pyx_v_msecs, __pyx_t_3);
-        __pyx_t_3 = 0;
+  __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 = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __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 = 1078; __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 = 1078; __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;
 
-        /* "utils.pyx":249
- *                 secs = msecsd // 1.e6
- *                 msecs = numpy.round(msecsd - secs*1.e6)
- *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)             # <<<<<<<<<<<<<<
- *                 # add time delta to base date.
- *                 date = basedate + td
+  /* "netCDF4/_netCDF4.pyx":1079
+ *     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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __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[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_4);
-        if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_days, __pyx_v_days) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_seconds, __pyx_v_secs) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_microseconds, __pyx_v_msecs) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_15);
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_15);
-        __pyx_t_15 = 0;
+  __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 = 1079; __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 = 1079; __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__7, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __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 = 1079; __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 = 1079; __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 = 1079; __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;
+  }
 
-        /* "utils.pyx":251
- *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)
- *                 # add time delta to base date.
- *                 date = basedate + td             # <<<<<<<<<<<<<<
- *                 dates.append(date)
- *         if isscalar:
+  /* "netCDF4/_netCDF4.pyx":1080
+ *     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 ascii strings, write a text attribute (stored as bytes).
  */
-        __pyx_t_15 = PyNumber_Add(__pyx_v_basedate, __pyx_v_td); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_15);
-        __Pyx_XDECREF_SET(__pyx_v_date, __pyx_t_15);
-        __pyx_t_15 = 0;
+  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __pyx_t_9;
+  __pyx_L6_bool_binop_done:;
+  if (__pyx_t_7) {
 
-        /* "utils.pyx":252
- *                 # add time delta to base date.
- *                 date = basedate + td
- *                 dates.append(date)             # <<<<<<<<<<<<<<
- *         if isscalar:
- *             return dates[0]
+    /* "netCDF4/_netCDF4.pyx":1081
+ *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\
+ *        is_netcdf3):
+ *         value_arr = value_arr.astype('i4')             # <<<<<<<<<<<<<<
+ *     # if array contains ascii strings, write a text attribute (stored as bytes).
+ *     # if array contains unicode strings, and data model is NETCDF4,
  */
-        __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dates, __pyx_v_date); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      __pyx_L24:;
+    __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 = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __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_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __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:;
 
-      /* "utils.pyx":227
- *             ismasked = True
- *         dates = []
- *         for time in times.flat:             # <<<<<<<<<<<<<<
- *             if ismasked and not time:
- *                 dates.append(None)
+  /* "netCDF4/_netCDF4.pyx":1085
+ *     # if array contains unicode strings, and data model is NETCDF4,
+ *     # write as a string.  string arrays are concatenated into a single string.
+ *     if value_arr.dtype.char in ['S','U']:             # <<<<<<<<<<<<<<
+ *         if not value_arr.shape:
+ *             dats = _strencode(value_arr.item())
  */
-    }
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __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 = 1085; __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 = 1085; __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 = 1085; __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 = 1085; __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) {
 
-    /* "utils.pyx":253
- *                 date = basedate + td
- *                 dates.append(date)
- *         if isscalar:             # <<<<<<<<<<<<<<
- *             return dates[0]
+    /* "netCDF4/_netCDF4.pyx":1086
+ *     # write as a string.  string arrays are concatenated into a single string.
+ *     if value_arr.dtype.char in ['S','U']:
+ *         if not value_arr.shape:             # <<<<<<<<<<<<<<
+ *             dats = _strencode(value_arr.item())
  *         else:
  */
-    __pyx_t_7 = (__pyx_v_isscalar != 0);
+    __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 = 1086; __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 = 1086; __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) {
 
-      /* "utils.pyx":254
- *                 dates.append(date)
- *         if isscalar:
- *             return dates[0]             # <<<<<<<<<<<<<<
+      /* "netCDF4/_netCDF4.pyx":1087
+ *     if value_arr.dtype.char in ['S','U']:
+ *         if not value_arr.shape:
+ *             dats = _strencode(value_arr.item())             # <<<<<<<<<<<<<<
  *         else:
- *             return numpy.reshape(numpy.array(dates), shape)
+ *             value_arr1 = value_arr.ravel()
  */
-      __Pyx_XDECREF(__pyx_r);
-      __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dates, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_r = __pyx_t_2;
-      __pyx_t_2 = 0;
-      goto __pyx_L0;
+      __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 = 1087; __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 = 1087; __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 = 1087; __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_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __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*/ {
 
-      /* "utils.pyx":256
- *             return dates[0]
+      /* "netCDF4/_netCDF4.pyx":1089
+ *             dats = _strencode(value_arr.item())
  *         else:
- *             return numpy.reshape(numpy.array(dates), shape)             # <<<<<<<<<<<<<<
- *     else: # use netcdftime for other calendars
- *         cdftime = netcdftime.utime(units,calendar=calendar)
+ *             value_arr1 = value_arr.ravel()             # <<<<<<<<<<<<<<
+ *             dats = _strencode(''.join(value_arr1.tolist()))
+ *         lenarr = len(dats)
  */
-      __Pyx_XDECREF(__pyx_r);
-      __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_15);
-      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
-      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_14);
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_3 = NULL;
-      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_14))) {
-        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_14);
-        if (likely(__pyx_t_3)) {
-          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
-          __Pyx_INCREF(__pyx_t_3);
+      __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 = 1089; __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_14, function);
+          __Pyx_DECREF_SET(__pyx_t_1, function);
         }
       }
-      if (!__pyx_t_3) {
-        __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_dates); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_15);
+      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 = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       } else {
-        __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __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 = NULL;
-        __Pyx_INCREF(__pyx_v_dates);
-        PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_dates);
-        __Pyx_GIVEREF(__pyx_v_dates);
-        __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_15);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-      if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-      __pyx_t_14 = NULL;
-      __pyx_t_11 = 0;
-      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
-        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4);
-        if (likely(__pyx_t_14)) {
-          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-          __Pyx_INCREF(__pyx_t_14);
+      __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/_netCDF4.pyx":1090
+ *         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 = 1090; __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_4, function);
-          __pyx_t_11 = 1;
+          __Pyx_DECREF_SET(__pyx_t_1, function);
         }
       }
-      __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      if (__pyx_t_14) {
-        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = NULL;
+      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 = 1090; __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 = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-      PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_11, __pyx_t_15);
-      __Pyx_GIVEREF(__pyx_t_15);
-      __Pyx_INCREF(__pyx_v_shape);
-      PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_11, __pyx_v_shape);
-      __Pyx_GIVEREF(__pyx_v_shape);
-      __pyx_t_15 = 0;
-      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(__pyx_t_5);
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __pyx_r = __pyx_t_2;
-      __pyx_t_2 = 0;
-      goto __pyx_L0;
+      __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_5); 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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __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;
     }
-  }
-  /*else*/ {
+    __pyx_L12:;
 
-    /* "utils.pyx":258
- *             return numpy.reshape(numpy.array(dates), shape)
- *     else: # use netcdftime for other calendars
- *         cdftime = netcdftime.utime(units,calendar=calendar)             # <<<<<<<<<<<<<<
- *         return cdftime.num2date(times)
- * 
+    /* "netCDF4/_netCDF4.pyx":1091
+ *             value_arr1 = value_arr.ravel()
+ *             dats = _strencode(''.join(value_arr1.tolist()))
+ *         lenarr = len(dats)             # <<<<<<<<<<<<<<
+ *         datstring = dats
+ *         if lenarr == 0:
  */
-    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); 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);
-    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_utime); 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_t_2 = PyTuple_New(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);
-    __Pyx_INCREF(__pyx_v_units);
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_units);
-    __Pyx_GIVEREF(__pyx_v_units);
-    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_calendar, __pyx_v_calendar) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_15);
-    __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;
-    __pyx_v_cdftime = __pyx_t_15;
-    __pyx_t_15 = 0;
+    __pyx_t_10 = PyObject_Length(__pyx_v_dats); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_lenarr = __pyx_t_10;
 
-    /* "utils.pyx":259
- *     else: # use netcdftime for other calendars
- *         cdftime = netcdftime.utime(units,calendar=calendar)
- *         return cdftime.num2date(times)             # <<<<<<<<<<<<<<
- * 
- * def date2index(dates, nctime, calendar=None, select='exact'):
+    /* "netCDF4/_netCDF4.pyx":1092
+ *             dats = _strencode(''.join(value_arr1.tolist()))
+ *         lenarr = len(dats)
+ *         datstring = dats             # <<<<<<<<<<<<<<
+ *         if lenarr == 0:
+ *             # write null byte
  */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_num2date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __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);
-      }
+    __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_dats); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_datstring = __pyx_t_2;
+
+    /* "netCDF4/_netCDF4.pyx":1093
+ *         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/_netCDF4.pyx":1095
+ *         if lenarr == 0:
+ *             # write null byte
+ *             lenarr=1; datstring = '\x00'             # <<<<<<<<<<<<<<
+ *         if value_arr.dtype.char == 'U' and not is_netcdf3:
+ *             # a unicode string, use put_att_string (if NETCDF4 file).
+ */
+      __pyx_v_lenarr = 1;
+      __pyx_v_datstring = __pyx_k_;
+      goto __pyx_L13;
     }
-    if (!__pyx_t_2) {
-      __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_times); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_15);
+    __pyx_L13:;
+
+    /* "netCDF4/_netCDF4.pyx":1096
+ *             # write null byte
+ *             lenarr=1; datstring = '\x00'
+ *         if value_arr.dtype.char == 'U' and not is_netcdf3:             # <<<<<<<<<<<<<<
+ *             # a unicode string, use put_att_string (if NETCDF4 file).
+ *             ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring)
+ */
+    __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 = 1096; __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 = 1096; __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_U, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_9) {
     } else {
-      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = __pyx_t_9;
+      goto __pyx_L15_bool_binop_done;
+    }
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = ((!__pyx_t_9) != 0);
+    __pyx_t_7 = __pyx_t_8;
+    __pyx_L15_bool_binop_done:;
+    if (__pyx_t_7) {
+
+      /* "netCDF4/_netCDF4.pyx":1098
+ *         if value_arr.dtype.char == 'U' and not is_netcdf3:
+ *             # a unicode string, use put_att_string (if NETCDF4 file).
+ *             ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring)             # <<<<<<<<<<<<<<
+ *         else:
+ *             ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
+ */
+      __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 = 1098; __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 = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_ierr = nc_put_att_string(__pyx_t_6, __pyx_v_varid, __pyx_v_attname, 1, (&__pyx_v_datstring));
+      goto __pyx_L14;
+    }
+    /*else*/ {
+
+      /* "netCDF4/_netCDF4.pyx":1100
+ *             ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring)
+ *         else:
+ *             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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __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 = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_v_ierr = nc_put_att_text(__pyx_t_6, __pyx_v_varid, __pyx_v_attname, __pyx_v_lenarr, __pyx_v_datstring);
+    }
+    __pyx_L14:;
+
+    /* "netCDF4/_netCDF4.pyx":1101
+ *         else:
+ *             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/_netCDF4.pyx":1102
+ *             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_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 = 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_AttributeError, __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;}
+    }
+    goto __pyx_L9;
+  }
+  /*else*/ {
+
+    /* "netCDF4/_netCDF4.pyx":1105
+ *     # 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_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 = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __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_PyString_Equals(__pyx_t_5, __pyx_n_s_V, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (__pyx_t_7) {
+
+      /* "netCDF4/_netCDF4.pyx":1106
+ *     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_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 = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__find_cmptype(__pyx_v_grp, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_v_xtype = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L18;
+    }
+
+    /* "netCDF4/_netCDF4.pyx":1107
+ *         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_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 = 1107; __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 = 1107; __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__9, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __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_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_t_1, __pyx_t_5, Py_NE)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_8 = (__pyx_t_7 != 0);
+    if (__pyx_t_8) {
+
+      /* "netCDF4/_netCDF4.pyx":1108
+ *             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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __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 = 1108; __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 = 1108; __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_times);
-      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_times);
-      __Pyx_GIVEREF(__pyx_v_times);
-      __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_15);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__10, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __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 = 1108; __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);
+      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+      __Pyx_GIVEREF(__pyx_t_1);
+      __pyx_t_5 = 0;
+      __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_illegal_data_type_for_attribute, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_1, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    /*else*/ {
+
+      /* "netCDF4/_netCDF4.pyx":1110
+ *             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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __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 = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __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_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__11, 1, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_5 = PyObject_GetItem(__pyx_t_1, __pyx_t_4); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __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_4); __pyx_t_4 = 0;
+      __pyx_v_xtype = __pyx_t_5;
+      __pyx_t_5 = 0;
+    }
+    __pyx_L18:;
+
+    /* "netCDF4/_netCDF4.pyx":1111
+ *         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/_netCDF4.pyx":1112
+ *             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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __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 = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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 = 1112; __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/_netCDF4.pyx":1113
+ *         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_8 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_8) {
+
+      /* "netCDF4/_netCDF4.pyx":1114
+ *         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_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 = 1114; __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 = 1114; __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_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __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 = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_r = __pyx_t_15;
-    __pyx_t_15 = 0;
-    goto __pyx_L0;
   }
+  __pyx_L9:;
 
-  /* "utils.pyx":168
- *         return cdftime.date2num(dates)
+  /* "netCDF4/_netCDF4.pyx":1065
+ *         return 'UNDEFINED'
  * 
- * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
- *     """
- * num2date(times,units,calendar='standard')
+ * 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_2);
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
-  __Pyx_XDECREF(__pyx_t_14);
-  __Pyx_XDECREF(__pyx_t_15);
-  __Pyx_AddTraceback("netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4._netCDF4._set_att", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_basedate);
-  __Pyx_XDECREF(__pyx_v_unit);
-  __Pyx_XDECREF(__pyx_v_shape);
-  __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_XDECREF(__pyx_v_calendar);
+  __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;
 }
 
-/* "utils.pyx":261
- *         return cdftime.num2date(times)
+/* "netCDF4/_netCDF4.pyx":1116
+ *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
  * 
- * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
- *     """
- * date2index(dates, nctime, calendar=None, select='exact')
+ * 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}.
  */
 
-/* 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 = 261; __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 = 261; __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 = 261; __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_basedate = NULL;
-  PyObject *__pyx_v_times = NULL;
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__get_types(PyObject *__pyx_v_group) {
+  int __pyx_v_ierr;
+  int __pyx_v_ntypes;
+  int __pyx_v_classp;
+  int __pyx_v_n;
+  int __pyx_v__grpid;
+  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;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_3;
+  char *__pyx_t_4;
   PyObject *__pyx_t_5 = NULL;
   PyObject *__pyx_t_6 = NULL;
-  int __pyx_t_7;
-  int __pyx_t_8;
+  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_t_14;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("date2index", 0);
-  __Pyx_INCREF(__pyx_v_calendar);
+  __Pyx_RefNannySetupContext("_get_types", 0);
 
-  /* "utils.pyx":290
- * to the given datetime object(s).
- *     """
- *     if calendar == None:             # <<<<<<<<<<<<<<
- *         calendar = getattr(nctime, 'calendar', 'standard')
- *     calendar = calendar.lower()
+  /* "netCDF4/_netCDF4.pyx":1123
+ *     cdef nc_type typeids[NC_MAX_VARS]
+ *     cdef char namstring[NC_MAX_NAME+1]
+ *     _grpid = group._grpid             # <<<<<<<<<<<<<<
+ *     # get the number of user defined types in this group.
+ *     with nogil:
  */
-  __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_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 1123; __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 = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
+  __pyx_v__grpid = __pyx_t_2;
 
-    /* "utils.pyx":291
- *     """
- *     if calendar == None:
- *         calendar = getattr(nctime, 'calendar', 'standard')             # <<<<<<<<<<<<<<
- *     calendar = calendar.lower()
- *     basedate = _dateparse(nctime.units)
+  /* "netCDF4/_netCDF4.pyx":1125
+ *     _grpid = group._grpid
+ *     # get the number of user defined types in this group.
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_typeids(_grpid, &ntypes, typeids)
+ *     if ierr != NC_NOERR:
+ */
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
+
+        /* "netCDF4/_netCDF4.pyx":1126
+ *     # get the number of user defined types in this group.
+ *     with nogil:
+ *         ierr = nc_inq_typeids(_grpid, &ntypes, typeids)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+        __pyx_v_ierr = nc_inq_typeids(__pyx_v__grpid, (&__pyx_v_ntypes), __pyx_v_typeids);
+      }
+
+      /* "netCDF4/_netCDF4.pyx":1125
+ *     _grpid = group._grpid
+ *     # get the number of user defined types in this group.
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_typeids(_grpid, &ntypes, typeids)
+ *     if ierr != NC_NOERR:
+ */
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L5;
+        }
+        __pyx_L5:;
+      }
+  }
+
+  /* "netCDF4/_netCDF4.pyx":1127
+ *     with nogil:
+ *         ierr = nc_inq_typeids(_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/_netCDF4.pyx":1128
+ *         ierr = nc_inq_typeids(_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_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_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 = 1128; __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_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __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 = 1128; __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 = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "utils.pyx":292
- *     if calendar == None:
- *         calendar = getattr(nctime, 'calendar', 'standard')
- *     calendar = calendar.lower()             # <<<<<<<<<<<<<<
- *     basedate = _dateparse(nctime.units)
- * 
+  /* "netCDF4/_netCDF4.pyx":1130
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # create empty dictionary for CompoundType instances.
+ *     cmptypes = OrderedDict()             # <<<<<<<<<<<<<<
+ *     vltypes = OrderedDict()
+ *     if ntypes > 0:
  */
-  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __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_3, function);
+      __Pyx_DECREF_SET(__pyx_t_5, 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[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  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 = 1130; __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_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __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_calendar, __pyx_t_1);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_cmptypes = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "utils.pyx":293
- *         calendar = getattr(nctime, 'calendar', 'standard')
- *     calendar = calendar.lower()
- *     basedate = _dateparse(nctime.units)             # <<<<<<<<<<<<<<
- * 
- *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
- */
-  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __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 = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = NULL;
-  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
+  /* "netCDF4/_netCDF4.pyx":1131
+ *     # 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 = 1131; __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_3, function);
+      __Pyx_DECREF_SET(__pyx_t_5, 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[1]; __pyx_lineno = 293; __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[1]; __pyx_lineno = 293; __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[1]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+  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 = 1131; __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 = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_v_basedate = __pyx_t_1;
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_v_vltypes = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "utils.pyx":295
- *     basedate = _dateparse(nctime.units)
- * 
- *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \             # <<<<<<<<<<<<<<
- *        (calendar in ['gregorian','standard'] and basedate > gregorian):
- *         # use python datetime
+  /* "netCDF4/_netCDF4.pyx":1132
+ *     cmptypes = OrderedDict()
+ *     vltypes = OrderedDict()
+ *     if ntypes > 0:             # <<<<<<<<<<<<<<
+ *         for n from 0 <= n < ntypes:
+ *             xtype = typeids[n]
  */
-  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (!__pyx_t_7) {
-    goto __pyx_L6_next_or;
-  } else {
-  }
-  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); 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_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  if (!__pyx_t_7) {
-  } else {
-    __pyx_t_2 = __pyx_t_7;
-    goto __pyx_L5_bool_binop_done;
-  }
-  __pyx_L6_next_or:;
+  __pyx_t_3 = ((__pyx_v_ntypes > 0) != 0);
+  if (__pyx_t_3) {
 
-  /* "utils.pyx":296
- * 
- *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
- *        (calendar in ['gregorian','standard'] and basedate > gregorian):             # <<<<<<<<<<<<<<
- *         # use python datetime
- *         times = date2num(dates,nctime.units,calendar=calendar)
+    /* "netCDF4/_netCDF4.pyx":1133
+ *     vltypes = OrderedDict()
+ *     if ntypes > 0:
+ *         for n from 0 <= n < ntypes:             # <<<<<<<<<<<<<<
+ *             xtype = typeids[n]
+ *             with nogil:
  */
-  __Pyx_INCREF(__pyx_v_calendar);
-  __pyx_t_6 = __pyx_v_calendar;
-  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (!__pyx_t_8) {
-  } else {
-    __pyx_t_7 = __pyx_t_8;
-    goto __pyx_L9_bool_binop_done;
-  }
-  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_7 = __pyx_t_8;
-  __pyx_L9_bool_binop_done:;
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  __pyx_t_8 = (__pyx_t_7 != 0);
-  if (__pyx_t_8) {
-  } else {
-    __pyx_t_2 = __pyx_t_8;
-    goto __pyx_L5_bool_binop_done;
-  }
-  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-  __pyx_t_3 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_2 = __pyx_t_8;
-  __pyx_L5_bool_binop_done:;
-  if (__pyx_t_2) {
+    __pyx_t_2 = __pyx_v_ntypes;
+    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
 
-    /* "utils.pyx":298
- *        (calendar in ['gregorian','standard'] and basedate > gregorian):
- *         # use python datetime
- *         times = date2num(dates,nctime.units,calendar=calendar)             # <<<<<<<<<<<<<<
- *         return netcdftime.time2index(times, nctime, calendar, select)
- *     else: # use netcdftime module for other cases
+      /* "netCDF4/_netCDF4.pyx":1134
+ *     if ntypes > 0:
+ *         for n from 0 <= n < ntypes:
+ *             xtype = typeids[n]             # <<<<<<<<<<<<<<
+ *             with nogil:
+ *                 ierr = nc_inq_user_type(_grpid, xtype, namstring,
  */
-    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __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_6);
-    __Pyx_GIVEREF(__pyx_t_6);
-    __pyx_t_6 = 0;
-    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_calendar, __pyx_v_calendar) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    __pyx_v_times = __pyx_t_4;
-    __pyx_t_4 = 0;
+      __pyx_v_xtype = (__pyx_v_typeids[__pyx_v_n]);
 
-    /* "utils.pyx":299
- *         # use python datetime
- *         times = date2num(dates,nctime.units,calendar=calendar)
- *         return netcdftime.time2index(times, nctime, calendar, select)             # <<<<<<<<<<<<<<
- *     else: # use netcdftime module for other cases
- *         return netcdftime.date2index(dates, nctime, calendar, select)
+      /* "netCDF4/_netCDF4.pyx":1135
+ *         for n from 0 <= n < ntypes:
+ *             xtype = typeids[n]
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_user_type(_grpid, xtype, namstring,
+ *                                         NULL,NULL,NULL,&classp)
  */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_time2index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __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;
-    __pyx_t_9 = 0;
-    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);
-        __pyx_t_9 = 1;
-      }
-    }
-    __pyx_t_3 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    if (__pyx_t_6) {
-      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
-    }
-    __Pyx_INCREF(__pyx_v_times);
-    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_9, __pyx_v_times);
-    __Pyx_GIVEREF(__pyx_v_times);
-    __Pyx_INCREF(__pyx_v_nctime);
-    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_9, __pyx_v_nctime);
-    __Pyx_GIVEREF(__pyx_v_nctime);
-    __Pyx_INCREF(__pyx_v_calendar);
-    PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_9, __pyx_v_calendar);
-    __Pyx_GIVEREF(__pyx_v_calendar);
-    __Pyx_INCREF(__pyx_v_select);
-    PyTuple_SET_ITEM(__pyx_t_3, 3+__pyx_t_9, __pyx_v_select);
-    __Pyx_GIVEREF(__pyx_v_select);
-    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __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_r = __pyx_t_4;
-    __pyx_t_4 = 0;
-    goto __pyx_L0;
-  }
-  /*else*/ {
+      {
+          #ifdef WITH_THREAD
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
+          #endif
+          /*try:*/ {
 
-    /* "utils.pyx":301
- *         return netcdftime.time2index(times, nctime, calendar, select)
- *     else: # use netcdftime module for other cases
- *         return netcdftime.date2index(dates, nctime, calendar, select)             # <<<<<<<<<<<<<<
- * 
- * def getlibversion():
+            /* "netCDF4/_netCDF4.pyx":1136
+ *             xtype = typeids[n]
+ *             with nogil:
+ *                 ierr = nc_inq_user_type(_grpid, xtype, namstring,             # <<<<<<<<<<<<<<
+ *                                         NULL,NULL,NULL,&classp)
+ *             if ierr != NC_NOERR:
  */
-    __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 = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_date2index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 301; __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;
-    __pyx_t_9 = 0;
-    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
-        __pyx_t_9 = 1;
+            __pyx_v_ierr = nc_inq_user_type(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_namstring, NULL, NULL, NULL, (&__pyx_v_classp));
+          }
+
+          /* "netCDF4/_netCDF4.pyx":1135
+ *         for n from 0 <= n < ntypes:
+ *             xtype = typeids[n]
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_user_type(_grpid, xtype, namstring,
+ *                                         NULL,NULL,NULL,&classp)
+ */
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L14;
+            }
+            __pyx_L14:;
+          }
       }
-    }
-    __pyx_t_6 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 301; __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_dates);
-    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_v_dates);
-    __Pyx_GIVEREF(__pyx_v_dates);
-    __Pyx_INCREF(__pyx_v_nctime);
-    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_v_nctime);
-    __Pyx_GIVEREF(__pyx_v_nctime);
-    __Pyx_INCREF(__pyx_v_calendar);
-    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_9, __pyx_v_calendar);
-    __Pyx_GIVEREF(__pyx_v_calendar);
-    __Pyx_INCREF(__pyx_v_select);
-    PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_9, __pyx_v_select);
-    __Pyx_GIVEREF(__pyx_v_select);
-    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 301; __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_r = __pyx_t_4;
-    __pyx_t_4 = 0;
-    goto __pyx_L0;
-  }
 
-  /* "utils.pyx":261
- *         return cdftime.num2date(times)
- * 
- * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
- *     """
- * date2index(dates, nctime, calendar=None, select='exact')
+      /* "netCDF4/_netCDF4.pyx":1138
+ *                 ierr = nc_inq_user_type(_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) {
 
-  /* 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.date2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_basedate);
-  __Pyx_XDECREF(__pyx_v_times);
-  __Pyx_XDECREF(__pyx_v_calendar);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":1139
+ *                                         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 = 1139; __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 = 1139; __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 = 1139; __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 = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
 
-/* "utils.pyx":303
- *         return netcdftime.date2index(dates, nctime, calendar, select)
- * 
- * def getlibversion():             # <<<<<<<<<<<<<<
- *     """
- * getlibversion()
+      /* "netCDF4/_netCDF4.pyx":1150
+ *                     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) {
 
-/* 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);
+        /* "netCDF4/_netCDF4.pyx":1140
+ *             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:
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":1141
+ *                 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 = 1141; __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 = 1141; __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 = 1141; __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 = 1141; __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 = 1141; __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 = 1141; __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;
 
-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);
+        /* "netCDF4/_netCDF4.pyx":1144
+ *                 # 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_11, &__pyx_t_12, &__pyx_t_13);
+          __Pyx_XGOTREF(__pyx_t_11);
+          __Pyx_XGOTREF(__pyx_t_12);
+          __Pyx_XGOTREF(__pyx_t_13);
+          /*try:*/ {
 
-  /* "utils.pyx":310
- * used to build the module, and when it was built.
- *     """
- *     return (<char *>nc_inq_libvers()).decode('ascii')             # <<<<<<<<<<<<<<
- * 
- * class MFDataset(Dataset):
+            /* "netCDF4/_netCDF4.pyx":1145
+ *                 # create a CompoundType instance from it.
+ *                 try:
+ *                     cmptype = _read_compound(group, xtype)             # <<<<<<<<<<<<<<
+ *                 except KeyError:
+ *                     #print 'WARNING: unsupported compound type, skipping...'
  */
-  __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 = 310; __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;
+            __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_group, __pyx_v_xtype, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
+            __Pyx_GOTREF(__pyx_t_1);
+            __Pyx_XDECREF_SET(__pyx_v_cmptype, __pyx_t_1);
+            __pyx_t_1 = 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_L23_try_end;
+          __pyx_L16_error:;
+          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "utils.pyx":303
- *         return netcdftime.date2index(dates, nctime, calendar, select)
- * 
- * def getlibversion():             # <<<<<<<<<<<<<<
- *     """
- * getlibversion()
+          /* "netCDF4/_netCDF4.pyx":1146
+ *                 try:
+ *                     cmptype = _read_compound(group, xtype)
+ *                 except KeyError:             # <<<<<<<<<<<<<<
+ *                     #print 'WARNING: unsupported compound type, skipping...'
+ *                     continue
  */
+          __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+          if (__pyx_t_14) {
+            __Pyx_AddTraceback("netCDF4._netCDF4._get_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
+            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
+            __Pyx_GOTREF(__pyx_t_1);
+            __Pyx_GOTREF(__pyx_t_6);
+            __Pyx_GOTREF(__pyx_t_10);
 
-  /* 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;
-}
+            /* "netCDF4/_netCDF4.pyx":1148
+ *                 except KeyError:
+ *                     #print 'WARNING: unsupported compound type, skipping...'
+ *                     continue             # <<<<<<<<<<<<<<
+ *                 cmptypes[name] = cmptype
+ *             elif classp == NC_VLEN: # a vlen
+ */
+            goto __pyx_L25_except_continue;
+            __pyx_L25_except_continue:;
+            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+            goto __pyx_L22_try_continue;
+          }
+          goto __pyx_L18_except_error;
+          __pyx_L18_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_L22_try_continue:;
+          __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_L8_continue;
+          __pyx_L23_try_end:;
+        }
 
-/* "utils.pyx":344
- *     """
- * 
- *     def __init__(self, files, check=False, aggdim=None, exclude=[]):             # <<<<<<<<<<<<<<
- *         """
- * Open a Dataset spanning multiple files, making it look as if it was a
+        /* "netCDF4/_netCDF4.pyx":1149
+ *                     #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 = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        break;
 
-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 = 344; __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 = 344; __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;
+        /* "netCDF4/_netCDF4.pyx":1150
+ *                     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:
 
-  /* 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 = 344; __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--; }
+        /* "netCDF4/_netCDF4.pyx":1151
+ *                 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 = 1151; __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 = 1151; __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 = 1151; __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 = 1151; __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_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_9 = 1;
+          }
         }
-        case  3:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_aggdim);
-          if (value) { values[3] = value; kw_args--; }
+        __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __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;
         }
-        case  4:
-        if (kw_args > 0) {
-          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exclude);
-          if (value) { values[4] = value; kw_args--; }
+        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_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __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_XDECREF_SET(__pyx_v_name, __pyx_t_10);
+        __pyx_t_10 = 0;
+
+        /* "netCDF4/_netCDF4.pyx":1154
+ *                 # 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_13, &__pyx_t_12, &__pyx_t_11);
+          __Pyx_XGOTREF(__pyx_t_13);
+          __Pyx_XGOTREF(__pyx_t_12);
+          __Pyx_XGOTREF(__pyx_t_11);
+          /*try:*/ {
+
+            /* "netCDF4/_netCDF4.pyx":1155
+ *                 # create a VLType instance from it.
+ *                 try:
+ *                     vltype = _read_vlen(group, xtype)             # <<<<<<<<<<<<<<
+ *                 except KeyError:
+ *                     #print 'WARNING: unsupported VLEN type, skipping...'
+ */
+            __pyx_t_10 = __pyx_f_7netCDF4_8_netCDF4__read_vlen(__pyx_v_group, __pyx_v_xtype, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L26_error;}
+            __Pyx_GOTREF(__pyx_t_10);
+            __Pyx_XDECREF_SET(__pyx_v_vltype, __pyx_t_10);
+            __pyx_t_10 = 0;
+          }
+          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+          goto __pyx_L33_try_end;
+          __pyx_L26_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/_netCDF4.pyx":1156
+ *                 try:
+ *                     vltype = _read_vlen(group, xtype)
+ *                 except KeyError:             # <<<<<<<<<<<<<<
+ *                     #print 'WARNING: unsupported VLEN type, skipping...'
+ *                     continue
+ */
+          __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+          if (__pyx_t_14) {
+            __Pyx_AddTraceback("netCDF4._netCDF4._get_types", __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 = 1156; __pyx_clineno = __LINE__; goto __pyx_L28_except_error;}
+            __Pyx_GOTREF(__pyx_t_10);
+            __Pyx_GOTREF(__pyx_t_1);
+            __Pyx_GOTREF(__pyx_t_8);
+
+            /* "netCDF4/_netCDF4.pyx":1158
+ *                 except KeyError:
+ *                     #print 'WARNING: unsupported VLEN type, skipping...'
+ *                     continue             # <<<<<<<<<<<<<<
+ *                 vltypes[name] = vltype
+ *                 pass
+ */
+            goto __pyx_L35_except_continue;
+            __pyx_L35_except_continue:;
+            __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_L32_try_continue;
+          }
+          goto __pyx_L28_except_error;
+          __pyx_L28_except_error:;
+          __Pyx_XGIVEREF(__pyx_t_13);
+          __Pyx_XGIVEREF(__pyx_t_12);
+          __Pyx_XGIVEREF(__pyx_t_11);
+          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
+          goto __pyx_L1_error;
+          __pyx_L32_try_continue:;
+          __Pyx_XGIVEREF(__pyx_t_13);
+          __Pyx_XGIVEREF(__pyx_t_12);
+          __Pyx_XGIVEREF(__pyx_t_11);
+          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
+          goto __pyx_L8_continue;
+          __pyx_L33_try_end:;
         }
-      }
-      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 = 344; __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);
+
+        /* "netCDF4/_netCDF4.pyx":1159
+ *                     #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 = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         break;
-        default: goto __pyx_L5_argtuple_error;
+        default: break;
       }
+      __pyx_L8_continue:;
     }
-    __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_L7;
   }
-  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 = 344; __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);
+  __pyx_L7:;
+
+  /* "netCDF4/_netCDF4.pyx":1161
+ *                 vltypes[name] = vltype
+ *                 pass
+ *     return cmptypes, vltypes             # <<<<<<<<<<<<<<
+ * 
+ * cdef _get_dims(group):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
+  __Pyx_INCREF(__pyx_v_cmptypes);
+  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_cmptypes);
+  __Pyx_GIVEREF(__pyx_v_cmptypes);
+  __Pyx_INCREF(__pyx_v_vltypes);
+  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_vltypes);
+  __Pyx_GIVEREF(__pyx_v_vltypes);
+  __pyx_r = __pyx_t_8;
+  __pyx_t_8 = 0;
+  goto __pyx_L0;
+
+  /* "netCDF4/_netCDF4.pyx":1116
+ *             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_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4._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;
 }
 
-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;
+/* "netCDF4/_netCDF4.pyx":1163
+ *     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_8_netCDF4__get_dims(PyObject *__pyx_v_group) {
+  int __pyx_v_ierr;
+  int __pyx_v_numdims;
+  int __pyx_v_n;
+  int __pyx_v__grpid;
+  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_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;
+  PyObject *__pyx_t_1 = NULL;
   int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
+  int __pyx_t_3;
+  char *__pyx_t_4;
   PyObject *__pyx_t_5 = NULL;
   PyObject *__pyx_t_6 = NULL;
   PyObject *__pyx_t_7 = NULL;
-  int __pyx_t_8;
+  PyObject *__pyx_t_8 = NULL;
   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;
+  PyObject *__pyx_t_10 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__init__", 0);
-  __Pyx_INCREF(__pyx_v_files);
-
-  /* "utils.pyx":381
- *         # 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) {
+  __Pyx_RefNannySetupContext("_get_dims", 0);
 
-    /* "utils.pyx":382
- *         # 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)
+  /* "netCDF4/_netCDF4.pyx":1170
+ *     cdef char namstring[NC_MAX_NAME+1]
+ *     # get number of dimensions in this Group.
+ *     _grpid = group._grpid             # <<<<<<<<<<<<<<
+ *     with nogil:
+ *         ierr = nc_inq_ndims(_grpid, &numdims)
  */
-    __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 = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 382; __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 = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    if (__pyx_t_2) {
+  __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 = 1170; __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 = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v__grpid = __pyx_t_2;
 
-      /* "utils.pyx":383
- *         if isinstance(files, str):
- *             if files.startswith('http'):
- *                 msg='cannot using file globbing for remote (OPeNDAP) datasets'             # <<<<<<<<<<<<<<
- *                 raise ValueError(msg)
- *             else:
+  /* "netCDF4/_netCDF4.pyx":1171
+ *     # get number of dimensions in this Group.
+ *     _grpid = group._grpid
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_ndims(_grpid, &numdims)
+ *     if ierr != NC_NOERR:
  */
-      __Pyx_INCREF(__pyx_kp_s_cannot_using_file_globbing_for_r);
-      __pyx_v_msg = __pyx_kp_s_cannot_using_file_globbing_for_r;
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
 
-      /* "utils.pyx":384
- *             if files.startswith('http'):
- *                 msg='cannot using file globbing for remote (OPeNDAP) datasets'
- *                 raise ValueError(msg)             # <<<<<<<<<<<<<<
- *             else:
- *                 files = sorted(glob(files))
+        /* "netCDF4/_netCDF4.pyx":1172
+ *     _grpid = group._grpid
+ *     with nogil:
+ *         ierr = nc_inq_ndims(_grpid, &numdims)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 384; __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 = 384; __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 = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    /*else*/ {
+        __pyx_v_ierr = nc_inq_ndims(__pyx_v__grpid, (&__pyx_v_numdims));
+      }
 
-      /* "utils.pyx":386
- *                 raise ValueError(msg)
- *             else:
- *                 files = sorted(glob(files))             # <<<<<<<<<<<<<<
- * 
- *         master = files[0]
+      /* "netCDF4/_netCDF4.pyx":1171
+ *     # get number of dimensions in this Group.
+ *     _grpid = group._grpid
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_ndims(_grpid, &numdims)
+ *     if ierr != NC_NOERR:
  */
-      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_glob); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 386; __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);
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L5;
         }
+        __pyx_L5:;
       }
-      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 = 386; __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 = 386; __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 = 386; __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 = 386; __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 = 386; __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":388
- *                 files = sorted(glob(files))
- * 
- *         master = files[0]             # <<<<<<<<<<<<<<
- * 
- *         # Open the master again, this time as a classic CDF instance. This will avoid
+  /* "netCDF4/_netCDF4.pyx":1173
+ *     with nogil:
+ *         ierr = nc_inq_ndims(_grpid, &numdims)
+ *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # create empty dictionary for dimensions.
  */
-  __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 = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_v_master = __pyx_t_3;
-  __pyx_t_3 = 0;
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
 
-  /* "utils.pyx":392
- *         # 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():
+    /* "netCDF4/_netCDF4.pyx":1174
+ *         ierr = nc_inq_ndims(_grpid, &numdims)
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *     # create empty dictionary for dimensions.
+ *     dimensions = OrderedDict()
  */
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 392; __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 = 392; __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;
+    __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;}
+  }
 
-  /* "utils.pyx":394
- *         cdfm = Dataset(master)
- *         # copy attributes from master.
- *         for name, value in cdfm.__dict__.items():             # <<<<<<<<<<<<<<
- *             self.__dict__[name] = value
- * 
+  /* "netCDF4/_netCDF4.pyx":1176
+ *         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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cdfm), __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 394; __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 = 394; __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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __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_4, function);
+      __Pyx_DECREF_SET(__pyx_t_5, 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 = 394; __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 = 394; __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;
+  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 = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   } 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 = 394; __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 = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); 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_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 = 394; __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 = 394; __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 = 394; __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 = 394; __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 = 394; __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 = 394; __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 = 394; __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 = 394; __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 = 394; __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 = 394; __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 = 394; __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;
+  __pyx_v_dimensions = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-    /* "utils.pyx":395
- *         # 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,
+  /* "netCDF4/_netCDF4.pyx":1177
+ *     # create empty dictionary for dimensions.
+ *     dimensions = OrderedDict()
+ *     if numdims > 0:             # <<<<<<<<<<<<<<
+ *         if group.data_model == 'NETCDF4':
+ *             with nogil:
  */
-    __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 = 395; __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 = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_3 = ((__pyx_v_numdims > 0) != 0);
+  if (__pyx_t_3) {
 
-    /* "utils.pyx":394
- *         cdfm = Dataset(master)
- *         # copy attributes from master.
- *         for name, value in cdfm.__dict__.items():             # <<<<<<<<<<<<<<
- *             self.__dict__[name] = value
- * 
+    /* "netCDF4/_netCDF4.pyx":1178
+ *     dimensions = OrderedDict()
+ *     if numdims > 0:
+ *         if group.data_model == 'NETCDF4':             # <<<<<<<<<<<<<<
+ *             with nogil:
+ *                 ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0)
  */
-  }
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __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 = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_3) {
 
-  /* "utils.pyx":399
- *         # 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:
+      /* "netCDF4/_netCDF4.pyx":1179
+ *     if numdims > 0:
+ *         if group.data_model == 'NETCDF4':
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0)
+ *             if ierr != NC_NOERR:
  */
-  __Pyx_INCREF(Py_None);
-  __pyx_v_aggDimId = Py_None;
+      {
+          #ifdef WITH_THREAD
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
+          #endif
+          /*try:*/ {
 
-  /* "utils.pyx":400
- *         # or an unlimited dimension.
- *         aggDimId = None
- *         for dimname,dim in cdfm.dimensions.items():             # <<<<<<<<<<<<<<
- *             if aggdim is None:
- *                 if dim.isunlimited():
+            /* "netCDF4/_netCDF4.pyx":1180
+ *         if group.data_model == 'NETCDF4':
+ *             with nogil:
+ *                 ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-  __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 = 400; __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 = 400; __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 = 400; __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 = 400; __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 = 400; __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 = 400; __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 = 400; __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 = 400; __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 = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
+            __pyx_v_ierr = nc_inq_dimids(__pyx_v__grpid, (&__pyx_v_numdims), __pyx_v_dimids, 0);
+          }
+
+          /* "netCDF4/_netCDF4.pyx":1179
+ *     if numdims > 0:
+ *         if group.data_model == 'NETCDF4':
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0)
+ *             if ierr != NC_NOERR:
+ */
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L11;
+            }
+            __pyx_L11:;
+          }
       }
-    } 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 = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
+
+      /* "netCDF4/_netCDF4.pyx":1181
+ *             with nogil:
+ *                 ierr = nc_inq_dimids(_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/_netCDF4.pyx":1182
+ *                 ierr = nc_inq_dimids(_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 = 1182; __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 = 1182; __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 = 1182; __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 = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-      __Pyx_GOTREF(__pyx_t_4);
+      goto __pyx_L8;
     }
-    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 = 400; __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); 
+    /*else*/ {
+
+      /* "netCDF4/_netCDF4.pyx":1184
+ *                 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/_netCDF4.pyx":1185
+ *         else:
+ *             for n from 0 <= n < numdims:
+ *                 dimids[n] = n             # <<<<<<<<<<<<<<
+ *         for n from 0 <= n < numdims:
+ *             with nogil:
+ */
+        (__pyx_v_dimids[__pyx_v_n]) = __pyx_v_n;
       }
-      __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 = 400; __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 = 400; __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 = 400; __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 = 400; __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 = 400; __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;
+    __pyx_L8:;
 
-    /* "utils.pyx":401
- *         aggDimId = None
- *         for dimname,dim in cdfm.dimensions.items():
- *             if aggdim is None:             # <<<<<<<<<<<<<<
- *                 if dim.isunlimited():
- *                     aggDimId = dim
+    /* "netCDF4/_netCDF4.pyx":1186
+ *             for n from 0 <= n < numdims:
+ *                 dimids[n] = n
+ *         for n from 0 <= n < numdims:             # <<<<<<<<<<<<<<
+ *             with nogil:
+ *                 ierr = nc_inq_dimname(_grpid, dimids[n], namstring)
  */
-    __pyx_t_2 = (__pyx_v_aggdim == Py_None);
-    __pyx_t_1 = (__pyx_t_2 != 0);
-    if (__pyx_t_1) {
+    __pyx_t_2 = __pyx_v_numdims;
+    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
 
-      /* "utils.pyx":402
- *         for dimname,dim in cdfm.dimensions.items():
- *             if aggdim is None:
- *                 if dim.isunlimited():             # <<<<<<<<<<<<<<
- *                     aggDimId = dim
- *                     aggDimName = dimname
+      /* "netCDF4/_netCDF4.pyx":1187
+ *                 dimids[n] = n
+ *         for n from 0 <= n < numdims:
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_dimname(_grpid, dimids[n], namstring)
+ *             if ierr != NC_NOERR:
  */
-      __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 = 402; __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 = 402; __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 = 402; __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 = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_1) {
+      {
+          #ifdef WITH_THREAD
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
+          #endif
+          /*try:*/ {
 
-        /* "utils.pyx":403
- *             if aggdim is None:
- *                 if dim.isunlimited():
- *                     aggDimId = dim             # <<<<<<<<<<<<<<
- *                     aggDimName = dimname
- *             else:
+            /* "netCDF4/_netCDF4.pyx":1188
+ *         for n from 0 <= n < numdims:
+ *             with nogil:
+ *                 ierr = nc_inq_dimname(_grpid, dimids[n], namstring)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-        __Pyx_INCREF(__pyx_v_dim);
-        __Pyx_DECREF_SET(__pyx_v_aggDimId, __pyx_v_dim);
+            __pyx_v_ierr = nc_inq_dimname(__pyx_v__grpid, (__pyx_v_dimids[__pyx_v_n]), __pyx_v_namstring);
+          }
 
-        /* "utils.pyx":404
- *                 if dim.isunlimited():
- *                     aggDimId = dim
- *                     aggDimName = dimname             # <<<<<<<<<<<<<<
- *             else:
- *                 if dimname == aggdim:
+          /* "netCDF4/_netCDF4.pyx":1187
+ *                 dimids[n] = n
+ *         for n from 0 <= n < numdims:
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_dimname(_grpid, dimids[n], namstring)
+ *             if ierr != NC_NOERR:
  */
-        __Pyx_INCREF(__pyx_v_dimname);
-        __Pyx_XDECREF_SET(__pyx_v_aggDimName, __pyx_v_dimname);
-        goto __pyx_L14;
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L21;
+            }
+            __pyx_L21:;
+          }
       }
-      __pyx_L14:;
-      goto __pyx_L13;
-    }
-    /*else*/ {
 
-      /* "utils.pyx":406
- *                     aggDimName = dimname
- *             else:
- *                 if dimname == aggdim:             # <<<<<<<<<<<<<<
- *                     aggDimId = dim
- *                     aggDimName = dimname
+      /* "netCDF4/_netCDF4.pyx":1189
+ *             with nogil:
+ *                 ierr = nc_inq_dimname(_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_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 = 406; __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 = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_1) {
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
 
-        /* "utils.pyx":407
- *             else:
- *                 if dimname == aggdim:
- *                     aggDimId = dim             # <<<<<<<<<<<<<<
- *                     aggDimName = dimname
- *         if aggDimId is None:
+        /* "netCDF4/_netCDF4.pyx":1190
+ *                 ierr = nc_inq_dimname(_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_INCREF(__pyx_v_dim);
-        __Pyx_DECREF_SET(__pyx_v_aggDimId, __pyx_v_dim);
+        __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 = 1190; __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 = 1190; __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 = 1190; __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 = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
 
-        /* "utils.pyx":408
- *                 if dimname == aggdim:
- *                     aggDimId = dim
- *                     aggDimName = dimname             # <<<<<<<<<<<<<<
- *         if aggDimId is None:
- *             raise IOError("master dataset %s does not have a aggregation dimension" % master)
+      /* "netCDF4/_netCDF4.pyx":1191
+ *             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_INCREF(__pyx_v_dimname);
-        __Pyx_XDECREF_SET(__pyx_v_aggDimName, __pyx_v_dimname);
-        goto __pyx_L15;
+      __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __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 = 1191; __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 = 1191; __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 = 1191; __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_L15:;
-    }
-    __pyx_L13:;
+      __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __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 = 1191; __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;
 
-    /* "utils.pyx":400
- *         # or an unlimited dimension.
- *         aggDimId = None
- *         for dimname,dim in cdfm.dimensions.items():             # <<<<<<<<<<<<<<
- *             if aggdim is None:
- *                 if dim.isunlimited():
+      /* "netCDF4/_netCDF4.pyx":1192
+ *                 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 = 1192; __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 = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_6);
+      __pyx_t_10 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_n])); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __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 = 1192; __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_8_netCDF4_Dimension)), __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __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_dimensions, __pyx_v_name, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    }
+    goto __pyx_L7;
   }
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_L7:;
 
-  /* "utils.pyx":409
- *                     aggDimId = dim
- *                     aggDimName = dimname
- *         if aggDimId is None:             # <<<<<<<<<<<<<<
- *             raise IOError("master dataset %s does not have a aggregation dimension" % master)
+  /* "netCDF4/_netCDF4.pyx":1193
+ *             name = namstring.decode(default_encoding,unicode_error)
+ *             dimensions[name] = Dimension(group, name, id=dimids[n])
+ *     return dimensions             # <<<<<<<<<<<<<<
  * 
+ * cdef _get_grps(group):
  */
-  __pyx_t_1 = (__pyx_v_aggDimId == Py_None);
-  __pyx_t_2 = (__pyx_t_1 != 0);
-  if (__pyx_t_2) {
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_dimensions);
+  __pyx_r = __pyx_v_dimensions;
+  goto __pyx_L0;
 
-    /* "utils.pyx":410
- *                     aggDimName = dimname
- *         if aggDimId is None:
- *             raise IOError("master dataset %s does not have a aggregation dimension" % master)             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":1163
+ *     return cmptypes, vltypes
  * 
- *         # Get info on all aggregation variables defined in the master.
+ * cdef _get_dims(group):             # <<<<<<<<<<<<<<
+ *     # Private function to create L{Dimension} instances for all the
+ *     # dimensions in a L{Group} or Dataset
  */
-    __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 = 410; __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 = 410; __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 = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* 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._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/_netCDF4.pyx":1195
+ *     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_8_netCDF4__get_grps(PyObject *__pyx_v_group) {
+  int __pyx_v_ierr;
+  int __pyx_v_numgrps;
+  int __pyx_v_n;
+  int __pyx_v__grpid;
+  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/_netCDF4.pyx":1202
+ *     cdef char namstring[NC_MAX_NAME+1]
+ *     # get number of groups in this Group.
+ *     _grpid = group._grpid             # <<<<<<<<<<<<<<
+ *     with nogil:
+ *         ierr = nc_inq_grps(_grpid, &numgrps, NULL)
+ */
+  __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 = 1202; __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 = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v__grpid = __pyx_t_2;
+
+  /* "netCDF4/_netCDF4.pyx":1203
+ *     # get number of groups in this Group.
+ *     _grpid = group._grpid
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_grps(_grpid, &numgrps, NULL)
+ *     if ierr != NC_NOERR:
+ */
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
+
+        /* "netCDF4/_netCDF4.pyx":1204
+ *     _grpid = group._grpid
+ *     with nogil:
+ *         ierr = nc_inq_grps(_grpid, &numgrps, NULL)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+        __pyx_v_ierr = nc_inq_grps(__pyx_v__grpid, (&__pyx_v_numgrps), NULL);
+      }
+
+      /* "netCDF4/_netCDF4.pyx":1203
+ *     # get number of groups in this Group.
+ *     _grpid = group._grpid
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_grps(_grpid, &numgrps, NULL)
+ *     if ierr != NC_NOERR:
+ */
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L5;
+        }
+        __pyx_L5:;
+      }
+  }
+
+  /* "netCDF4/_netCDF4.pyx":1205
+ *     with nogil:
+ *         ierr = nc_inq_grps(_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/_netCDF4.pyx":1206
+ *         ierr = nc_inq_grps(_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 = 1206; __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 = 1206; __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_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 = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
 
-  /* "utils.pyx":414
- *         # 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.
+  /* "netCDF4/_netCDF4.pyx":1208
+ *         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 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __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":415
- *         # 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 = 415; __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_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_4, function);
+      __Pyx_DECREF_SET(__pyx_t_5, 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 = 415; __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 = 415; __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;
+  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 = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   } 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 = 415; __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 = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
+  __Pyx_GOTREF(__pyx_t_1);
   __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 = 415; __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 = 415; __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 = 415; __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 = 415; __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 = 415; __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 = 415; __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 = 415; __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 = 415; __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 = 415; __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 = 415; __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 = 415; __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":417
- *         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 = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_1 = (__pyx_t_2 != 0);
-    if (__pyx_t_1) {
-      goto __pyx_L17_continue;
-    }
+  __pyx_v_groups = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-    /* "utils.pyx":418
- *             # skip variables specified in exclude list.
- *             if vName in exclude: continue
- *             dims = v.dimensions             # <<<<<<<<<<<<<<
- *             shape = v.shape
- *             dtype = v.dtype
+  /* "netCDF4/_netCDF4.pyx":1209
+ *     # create dictionary containing L{Group} instances for groups in this group
+ *     groups = OrderedDict()
+ *     if numgrps > 0:             # <<<<<<<<<<<<<<
+ *         grpids = <int *>malloc(sizeof(int) * numgrps)
+ *         with nogil:
  */
-    __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 = 418; __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;
+  __pyx_t_3 = ((__pyx_v_numgrps > 0) != 0);
+  if (__pyx_t_3) {
 
-    /* "utils.pyx":419
- *             if vName in exclude: continue
- *             dims = v.dimensions
- *             shape = v.shape             # <<<<<<<<<<<<<<
- *             dtype = v.dtype
- *             # Be carefull: we may deal with a scalar (dimensionless) variable.
+    /* "netCDF4/_netCDF4.pyx":1210
+ *     groups = OrderedDict()
+ *     if numgrps > 0:
+ *         grpids = <int *>malloc(sizeof(int) * numgrps)             # <<<<<<<<<<<<<<
+ *         with nogil:
+ *             ierr = nc_inq_grps(_grpid, NULL, grpids)
  */
-    __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 = 419; __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;
+    __pyx_v_grpids = ((int *)malloc(((sizeof(int)) * __pyx_v_numgrps)));
 
-    /* "utils.pyx":420
- *             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.
+    /* "netCDF4/_netCDF4.pyx":1211
+ *     if numgrps > 0:
+ *         grpids = <int *>malloc(sizeof(int) * numgrps)
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_grps(_grpid, NULL, grpids)
+ *         if ierr != NC_NOERR:
  */
-    __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 = 420; __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;
+    {
+        #ifdef WITH_THREAD
+        PyThreadState *_save;
+        Py_UNBLOCK_THREADS
+        #endif
+        /*try:*/ {
 
-    /* "utils.pyx":423
- *             # 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:
+          /* "netCDF4/_netCDF4.pyx":1212
+ *         grpids = <int *>malloc(sizeof(int) * numgrps)
+ *         with nogil:
+ *             ierr = nc_inq_grps(_grpid, NULL, grpids)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-    __pyx_t_12 = PyObject_Length(__pyx_v_dims); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 423; __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 = 423; __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 = 423; __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 = 423; __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 = 423; __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) {
+          __pyx_v_ierr = nc_inq_grps(__pyx_v__grpid, NULL, __pyx_v_grpids);
+        }
 
-      /* "utils.pyx":424
- *             # 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)
+        /* "netCDF4/_netCDF4.pyx":1211
+ *     if numgrps > 0:
+ *         grpids = <int *>malloc(sizeof(int) * numgrps)
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_grps(_grpid, NULL, grpids)
+ *         if ierr != NC_NOERR:
  */
-      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 424; __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 = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      goto __pyx_L22;
+        /*finally:*/ {
+          /*normal exit:*/{
+            #ifdef WITH_THREAD
+            Py_BLOCK_THREADS
+            #endif
+            goto __pyx_L10;
+          }
+          __pyx_L10:;
+        }
     }
-    __pyx_L22:;
 
-    /* "utils.pyx":415
- *         # 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
+    /* "netCDF4/_netCDF4.pyx":1213
+ *         with nogil:
+ *             ierr = nc_inq_grps(_grpid, NULL, grpids)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         for n from 0 <= n < numgrps:
  */
-    __pyx_L17_continue:;
-  }
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_3) {
 
-  /* "utils.pyx":425
- *             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)
- * 
+      /* "netCDF4/_netCDF4.pyx":1214
+ *             ierr = nc_inq_grps(_grpid, NULL, grpids)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         for n from 0 <= n < numgrps:
+ *             with nogil:
  */
-  __pyx_t_9 = PyDict_Size(__pyx_v_masterRecVar); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_1 = ((__pyx_t_9 == 0) != 0);
-  if (__pyx_t_1) {
+      __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 = 1214; __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 = 1214; __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 = 1214; __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 = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-    /* "utils.pyx":426
- *                 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:
+    /* "netCDF4/_netCDF4.pyx":1215
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         for n from 0 <= n < numgrps:             # <<<<<<<<<<<<<<
+ *             with nogil:
+ *                 ierr = nc_inq_grpname(grpids[n], namstring)
  */
-    __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 = 426; __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 = 426; __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 = 426; __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 = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+    __pyx_t_2 = __pyx_v_numgrps;
+    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
 
-  /* "utils.pyx":434
- *         #             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)]
+      /* "netCDF4/_netCDF4.pyx":1216
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         for n from 0 <= n < numgrps:
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_grpname(grpids[n], namstring)
+ *             if ierr != NC_NOERR:
  */
-  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 434; __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;
+      {
+          #ifdef WITH_THREAD
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
+          #endif
+          /*try:*/ {
 
-  /* "utils.pyx":435
- *         #             cdf file of the file set
- *         cdf = [cdfm]
- *         self._cdf = cdf        # Store this now, because dim() method needs it             # <<<<<<<<<<<<<<
- *         cdfVLen = [len(aggDimId)]
- *         cdfRecVar = {}
+            /* "netCDF4/_netCDF4.pyx":1217
+ *         for n from 0 <= n < numgrps:
+ *             with nogil:
+ *                 ierr = nc_inq_grpname(grpids[n], namstring)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdf, __pyx_v_cdf) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __pyx_v_ierr = nc_inq_grpname((__pyx_v_grpids[__pyx_v_n]), __pyx_v_namstring);
+          }
 
-  /* "utils.pyx":436
- *         cdf = [cdfm]
- *         self._cdf = cdf        # Store this now, because dim() method needs it
- *         cdfVLen = [len(aggDimId)]             # <<<<<<<<<<<<<<
- *         cdfRecVar = {}
- *         for v in masterRecVar.keys():
+          /* "netCDF4/_netCDF4.pyx":1216
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         for n from 0 <= n < numgrps:
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_grpname(grpids[n], namstring)
+ *             if ierr != NC_NOERR:
  */
-  __pyx_t_9 = PyObject_Length(__pyx_v_aggDimId); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 436; __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 = 436; __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 = 436; __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;
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L18;
+            }
+            __pyx_L18:;
+          }
+      }
 
-  /* "utils.pyx":437
- *         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]]
+      /* "netCDF4/_netCDF4.pyx":1218
+ *             with nogil:
+ *                 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_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __pyx_v_cdfRecVar = ((PyObject*)__pyx_t_7);
-  __pyx_t_7 = 0;
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
 
-  /* "utils.pyx":438
- *         cdfVLen = [len(aggDimId)]
- *         cdfRecVar = {}
- *         for v in masterRecVar.keys():             # <<<<<<<<<<<<<<
- *             cdfRecVar[v] = [cdfm.variables[v]]
- * 
+        /* "netCDF4/_netCDF4.pyx":1219
+ *                 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_7 = __Pyx_PyDict_Keys(__pyx_v_masterRecVar); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 438; __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 = 438; __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 = 438; __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 = 438; __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 = 438; __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 = 438; __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 = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
+        __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_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __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 = 1219; __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 = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-    } 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 = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+      /* "netCDF4/_netCDF4.pyx":1220
+ *             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 = 1220; __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 = 1220; __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 = 1220; __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 = 1220; __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;
         }
-        break;
       }
-      __Pyx_GOTREF(__pyx_t_7);
+      __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; __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 = 1220; __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/_netCDF4.pyx":1221
+ *                 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 = 1221; __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 = 1221; __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 = 1221; __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 = 1221; __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_8_netCDF4_Group)), __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __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 = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
     }
-    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
-    __pyx_t_7 = 0;
 
-    /* "utils.pyx":439
- *         cdfRecVar = {}
- *         for v in masterRecVar.keys():
- *             cdfRecVar[v] = [cdfm.variables[v]]             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":1222
+ *             name = namstring.decode(default_encoding,unicode_error)
+ *             groups[name] = Group(group, name, id=grpids[n])
+ *         free(grpids)             # <<<<<<<<<<<<<<
+ *     return groups
  * 
- *         # 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 = 439; __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 = 439; __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 = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    free(__pyx_v_grpids);
+    goto __pyx_L7;
+  }
+  __pyx_L7:;
 
-    /* "utils.pyx":438
- *         cdfVLen = [len(aggDimId)]
- *         cdfRecVar = {}
- *         for v in masterRecVar.keys():             # <<<<<<<<<<<<<<
- *             cdfRecVar[v] = [cdfm.variables[v]]
+  /* "netCDF4/_netCDF4.pyx":1223
+ *             groups[name] = Group(group, name, id=grpids[n])
+ *         free(grpids)
+ *     return groups             # <<<<<<<<<<<<<<
  * 
+ * cdef _get_vars(group):
  */
-  }
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_groups);
+  __pyx_r = __pyx_v_groups;
+  goto __pyx_L0;
 
-  /* "utils.pyx":444
- *         # 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
+  /* "netCDF4/_netCDF4.pyx":1195
+ *     return dimensions
+ * 
+ * cdef _get_grps(group):             # <<<<<<<<<<<<<<
+ *     # Private function to create L{Group} instances for all the
+ *     # groups in a L{Group} or Dataset
  */
-  __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_files, 1, 0, NULL, NULL, &__pyx_slice__8, 1, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __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 = 444; __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 = 444; __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 = 444; __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 = 444; __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 = 444; __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 = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
+
+  /* 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._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/_netCDF4.pyx":1225
+ *     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_8_netCDF4__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_iendian;
+  int __pyx_v__grpid;
+  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_endianness = 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;
+  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_t_14;
+  int __pyx_t_15;
+  PyObject *__pyx_t_16 = NULL;
+  PyObject *__pyx_t_17 = NULL;
+  PyObject *__pyx_t_18 = NULL;
+  struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound __pyx_t_19;
+  struct __pyx_opt_args_7netCDF4_8_netCDF4__read_vlen __pyx_t_20;
+  PyObject *(*__pyx_t_21)(PyObject *);
+  PyObject *(*__pyx_t_22)(PyObject *);
+  int __pyx_t_23;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_get_vars", 0);
+
+  /* "netCDF4/_netCDF4.pyx":1236
+ *     cdef char namstring_cmp[NC_MAX_NAME+1]
+ *     # get number of variables in this Group.
+ *     _grpid = group._grpid             # <<<<<<<<<<<<<<
+ *     with nogil:
+ *         ierr = nc_inq_nvars(_grpid, &numvars)
+ */
+  __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 = 1236; __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 = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v__grpid = __pyx_t_2;
+
+  /* "netCDF4/_netCDF4.pyx":1237
+ *     # get number of variables in this Group.
+ *     _grpid = group._grpid
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_nvars(_grpid, &numvars)
+ *     if ierr != NC_NOERR:
+ */
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
+
+        /* "netCDF4/_netCDF4.pyx":1238
+ *     _grpid = group._grpid
+ *     with nogil:
+ *         ierr = nc_inq_nvars(_grpid, &numvars)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+        __pyx_v_ierr = nc_inq_nvars(__pyx_v__grpid, (&__pyx_v_numvars));
       }
-    } 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 = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+      /* "netCDF4/_netCDF4.pyx":1237
+ *     # get number of variables in this Group.
+ *     _grpid = group._grpid
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_nvars(_grpid, &numvars)
+ *     if ierr != NC_NOERR:
+ */
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L5;
         }
-        break;
+        __pyx_L5:;
       }
-      __Pyx_GOTREF(__pyx_t_4);
-    }
-    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_4);
-    __pyx_t_4 = 0;
+  }
 
-    /* "utils.pyx":445
- *         # 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():
+  /* "netCDF4/_netCDF4.pyx":1239
+ *     with nogil:
+ *         ierr = nc_inq_nvars(_grpid, &numvars)
+ *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # create empty dictionary for variables.
  */
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 445; __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 = 445; __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;
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
 
-    /* "utils.pyx":446
- *         for f in files[1:]:
- *             part = Dataset(f)
- *             varInfo = part.variables             # <<<<<<<<<<<<<<
- *             for v in masterRecVar.keys():
- *                 if check:
+    /* "netCDF4/_netCDF4.pyx":1240
+ *         ierr = nc_inq_nvars(_grpid, &numvars)
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *     # create empty dictionary for variables.
+ *     variables = OrderedDict()
  */
-    __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;
+    __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 = 1240; __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 = 1240; __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 = 1240; __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 = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-    /* "utils.pyx":447
- *             part = Dataset(f)
- *             varInfo = part.variables
- *             for v in masterRecVar.keys():             # <<<<<<<<<<<<<<
- *                 if check:
- *                     # Make sure master rec var is also defined here.
+  /* "netCDF4/_netCDF4.pyx":1242
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     # create empty dictionary for variables.
+ *     variables = OrderedDict()             # <<<<<<<<<<<<<<
+ *     if numvars > 0:
+ *         # get variable ids.
  */
-    __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_masterRecVar); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 447; __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 = 447; __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 = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __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);
     }
-    __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 = 447; __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 = 447; __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 = 447; __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 = 447; __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 = 447; __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;
+  }
+  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 = 1242; __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 = 1242; __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;
 
-      /* "utils.pyx":448
- *             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():
+  /* "netCDF4/_netCDF4.pyx":1243
+ *     # create empty dictionary for variables.
+ *     variables = OrderedDict()
+ *     if numvars > 0:             # <<<<<<<<<<<<<<
+ *         # get variable ids.
+ *         varids = <int *>malloc(sizeof(int) * numvars)
  */
-      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_1) {
+  __pyx_t_3 = ((__pyx_v_numvars > 0) != 0);
+  if (__pyx_t_3) {
 
-        /* "utils.pyx":450
- *                 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))
- * 
+    /* "netCDF4/_netCDF4.pyx":1245
+ *     if numvars > 0:
+ *         # get variable ids.
+ *         varids = <int *>malloc(sizeof(int) * numvars)             # <<<<<<<<<<<<<<
+ *         if group.data_model == 'NETCDF4':
+ *             with nogil:
  */
-        __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 = 450; __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 = 450; __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 = 450; __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 = 450; __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) {
+    __pyx_v_varids = ((int *)malloc(((sizeof(int)) * __pyx_v_numvars)));
 
-          /* "utils.pyx":451
- *                     # 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:
+    /* "netCDF4/_netCDF4.pyx":1246
+ *         # get variable ids.
+ *         varids = <int *>malloc(sizeof(int) * numvars)
+ *         if group.data_model == 'NETCDF4':             # <<<<<<<<<<<<<<
+ *             with nogil:
+ *                 ierr = nc_inq_varids(_grpid, &numvars, varids)
  */
-          __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 451; __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 = 451; __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 = 451; __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 = 451; __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 = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __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 = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_3) {
 
-        /* "utils.pyx":455
- *                     #if not vInst.dimensions[0] != aggDimName:
- * 
- *                     masterDims, masterShape, masterType = masterRecVar[v][:3]             # <<<<<<<<<<<<<<
- *                     extDims, extShape, extType = varInfo[v][:3]
- *                     extDims = varInfo[v].dimensions
+      /* "netCDF4/_netCDF4.pyx":1247
+ *         varids = <int *>malloc(sizeof(int) * numvars)
+ *         if group.data_model == 'NETCDF4':
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_varids(_grpid, &numvars, varids)
+ *             if ierr != NC_NOERR:
  */
-        __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 = 455; __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__9, 0, 1, 1); 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;
-        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);
+      {
+          #ifdef WITH_THREAD
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
           #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 = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          /*try:*/ {
+
+            /* "netCDF4/_netCDF4.pyx":1248
+ *         if group.data_model == 'NETCDF4':
+ *             with nogil:
+ *                 ierr = nc_inq_varids(_grpid, &numvars, varids)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+            __pyx_v_ierr = nc_inq_varids(__pyx_v__grpid, (&__pyx_v_numvars), __pyx_v_varids);
           }
-          #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 = 455; __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 = 455; __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 = 455; __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 = 455; __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 = 455; __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 = 455; __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":456
- * 
- *                     masterDims, masterShape, masterType = masterRecVar[v][:3]
- *                     extDims, extShape, extType = varInfo[v][:3]             # <<<<<<<<<<<<<<
- *                     extDims = varInfo[v].dimensions
- *                     extShape = varInfo[v].shape
+          /* "netCDF4/_netCDF4.pyx":1247
+ *         varids = <int *>malloc(sizeof(int) * numvars)
+ *         if group.data_model == 'NETCDF4':
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_varids(_grpid, &numvars, varids)
+ *             if ierr != NC_NOERR:
  */
-        __pyx_t_7 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __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__10, 0, 1, 1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __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 = 456; __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); 
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L11;
+            }
+            __pyx_L11:;
           }
-          __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 = 456; __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 = 456; __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 = 456; __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 = 456; __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 = 456; __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 = 456; __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":457
- *                     masterDims, masterShape, masterType = masterRecVar[v][:3]
- *                     extDims, extShape, extType = varInfo[v][:3]
- *                     extDims = varInfo[v].dimensions             # <<<<<<<<<<<<<<
- *                     extShape = varInfo[v].shape
- *                     extType = varInfo[v].dtype
+      /* "netCDF4/_netCDF4.pyx":1249
+ *             with nogil:
+ *                 ierr = nc_inq_varids(_grpid, &numvars, varids)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         else:
  */
-        __pyx_t_14 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 457; __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 = 457; __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;
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
 
-        /* "utils.pyx":458
- *                     extDims, extShape, extType = varInfo[v][:3]
- *                     extDims = varInfo[v].dimensions
- *                     extShape = varInfo[v].shape             # <<<<<<<<<<<<<<
- *                     extType = varInfo[v].dtype
- *                     # Check that dimension names are identical.
+        /* "netCDF4/_netCDF4.pyx":1250
+ *                 ierr = nc_inq_varids(_grpid, &numvars, varids)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         else:
+ *             for n from 0 <= n < numvars:
  */
-        __pyx_t_3 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 458; __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 = 458; __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;
+        __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 = 1250; __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 = 1250; __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 = 1250; __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 = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      goto __pyx_L8;
+    }
+    /*else*/ {
 
-        /* "utils.pyx":459
- *                     extDims = varInfo[v].dimensions
- *                     extShape = varInfo[v].shape
- *                     extType = varInfo[v].dtype             # <<<<<<<<<<<<<<
- *                     # Check that dimension names are identical.
- *                     if masterDims != extDims:
+      /* "netCDF4/_netCDF4.pyx":1252
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         else:
+ *             for n from 0 <= n < numvars:             # <<<<<<<<<<<<<<
+ *                 varids[n] = n
+ *         # loop over variables.
  */
-        __pyx_t_14 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 459; __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 = 459; __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;
+      __pyx_t_2 = __pyx_v_numvars;
+      for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
 
-        /* "utils.pyx":461
- *                     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)" %
+        /* "netCDF4/_netCDF4.pyx":1253
+ *         else:
+ *             for n from 0 <= n < numvars:
+ *                 varids[n] = n             # <<<<<<<<<<<<<<
+ *         # loop over variables.
+ *         for n from 0 <= n < numvars:
  */
-        __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 = 461; __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 = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-        if (__pyx_t_2) {
+        (__pyx_v_varids[__pyx_v_n]) = __pyx_v_n;
+      }
+    }
+    __pyx_L8:;
 
-          /* "utils.pyx":464
- *                         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
+    /* "netCDF4/_netCDF4.pyx":1255
+ *                 varids[n] = n
+ *         # loop over variables.
+ *         for n from 0 <= n < numvars:             # <<<<<<<<<<<<<<
+ *             varid = varids[n]
+ *             # get variable name.
  */
-          __pyx_t_3 = PyTuple_New(5); 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_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);
+    __pyx_t_2 = __pyx_v_numvars;
+    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
 
-          /* "utils.pyx":463
- *                     if masterDims != extDims:
- *                         raise IOError("variable %s : dimensions mismatch between "
- *                                        "master %s (%s) and extension %s (%s)" %             # <<<<<<<<<<<<<<
- *                                        (v, master, masterDims, f, extDims))
- * 
+      /* "netCDF4/_netCDF4.pyx":1256
+ *         # loop over variables.
+ *         for n from 0 <= n < numvars:
+ *             varid = varids[n]             # <<<<<<<<<<<<<<
+ *             # get variable name.
+ *             with nogil:
  */
-          __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 = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_14);
-          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_v_varid = (__pyx_v_varids[__pyx_v_n]);
 
-          /* "utils.pyx":462
- *                     # 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))
+      /* "netCDF4/_netCDF4.pyx":1258
+ *             varid = varids[n]
+ *             # get variable name.
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_varname(_grpid, varid, namstring)
+ *             if ierr != NC_NOERR:
  */
-          __pyx_t_3 = PyTuple_New(1); 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);
-          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 = 462; __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 = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
+      {
+          #ifdef WITH_THREAD
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
+          #endif
+          /*try:*/ {
 
-        /* "utils.pyx":469
- *                     # 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)" %
+            /* "netCDF4/_netCDF4.pyx":1259
+ *             # get variable name.
+ *             with nogil:
+ *                 ierr = nc_inq_varname(_grpid, varid, namstring)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-        __pyx_t_16 = PyObject_Length(__pyx_v_masterShape); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __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 = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_2 = ((__pyx_t_16 != __pyx_t_17) != 0);
-        if (__pyx_t_2) {
+            __pyx_v_ierr = nc_inq_varname(__pyx_v__grpid, __pyx_v_varid, __pyx_v_namstring);
+          }
 
-          /* "utils.pyx":472
- *                         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 "
+          /* "netCDF4/_netCDF4.pyx":1258
+ *             varid = varids[n]
+ *             # get variable name.
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_varname(_grpid, varid, namstring)
+ *             if ierr != NC_NOERR:
  */
-          __pyx_t_17 = PyObject_Length(__pyx_v_masterShape); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 472; __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 = 472; __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 = 472; __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 = 472; __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 = 472; __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;
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L21;
+            }
+            __pyx_L21:;
+          }
+      }
 
-          /* "utils.pyx":471
- *                     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:]:
+      /* "netCDF4/_netCDF4.pyx":1260
+ *             with nogil:
+ *                 ierr = nc_inq_varname(_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_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 = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_3);
-          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
 
-          /* "utils.pyx":470
- *                     # 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)))
+        /* "netCDF4/_netCDF4.pyx":1261
+ *                 ierr = nc_inq_varname(_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_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 470; __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 = 470; __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 = 470; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 1261; __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 = 1261; __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 = 1261; __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 = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4/_netCDF4.pyx":1262
+ *             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 = 1262; __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 = 1262; __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 = 1262; __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 = 1262; __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 = 1262; __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 = 1262; __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;
 
-        /* "utils.pyx":473
- *                                        "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)" %
+      /* "netCDF4/_netCDF4.pyx":1263
+ *                 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_PyObject_GetSlice(__pyx_v_masterShape, 1, 0, NULL, NULL, &__pyx_slice__11, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 473; __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__12, 1, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
+
+        /* "netCDF4/_netCDF4.pyx":1264
+ *             name = namstring.decode(default_encoding,unicode_error)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             # get variable type.
+ *             with nogil:
+ */
+        __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 = 1264; __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 = 1264; __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 = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __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 = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
         __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 = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-        if (__pyx_t_2) {
+        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
 
-          /* "utils.pyx":476
- *                         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.
+      /* "netCDF4/_netCDF4.pyx":1266
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             # get variable type.
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_vartype(_grpid, varid, &xtype)
+ *             if ierr != NC_NOERR:
  */
-          __pyx_t_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 476; __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);
+      {
+          #ifdef WITH_THREAD
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
+          #endif
+          /*try:*/ {
 
-          /* "utils.pyx":475
- *                     if masterShape[1:] != extShape[1:]:
- *                         raise IOError("variable %s : shape mismatch between "
- *                                        "master %s (%s) and extension %s (%s)" %             # <<<<<<<<<<<<<<
- *                                        (v, master, masterShape, f, extShape))
- * 
+            /* "netCDF4/_netCDF4.pyx":1267
+ *             # get variable type.
+ *             with nogil:
+ *                 ierr = nc_inq_vartype(_grpid, varid, &xtype)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-          __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 = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+            __pyx_v_ierr = nc_inq_vartype(__pyx_v__grpid, __pyx_v_varid, (&__pyx_v_xtype));
+          }
 
-          /* "utils.pyx":474
- *                                        (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))
+          /* "netCDF4/_netCDF4.pyx":1266
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             # get variable type.
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_vartype(_grpid, varid, &xtype)
+ *             if ierr != NC_NOERR:
  */
-          __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 474; __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 = 474; __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 = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L28;
+            }
+            __pyx_L28:;
+          }
+      }
 
-        /* "utils.pyx":479
- * 
- *                     # 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)" %
+      /* "netCDF4/_netCDF4.pyx":1268
+ *             with nogil:
+ *                 ierr = nc_inq_vartype(_grpid, varid, &xtype)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             # get endian-ness of variable.
  */
-        __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 = 479; __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 = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        if (__pyx_t_2) {
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
 
-          /* "utils.pyx":482
- *                         raise IOError("variable %s : data type mismatch between "
- *                                        "master %s (%s) and extension %s (%s)" %
- *                                        (v, master, masterType, f, extType))             # <<<<<<<<<<<<<<
- * 
- *                     # Everythig ok.
+        /* "netCDF4/_netCDF4.pyx":1269
+ *                 ierr = nc_inq_vartype(_grpid, varid, &xtype)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             # get endian-ness of variable.
+ *             endianness = None
  */
-          __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 482; __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);
+        __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 = 1269; __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 = 1269; __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 = 1269; __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 = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
 
-          /* "utils.pyx":481
- *                     if masterType != extType:
- *                         raise IOError("variable %s : data type mismatch between "
- *                                        "master %s (%s) and extension %s (%s)" %             # <<<<<<<<<<<<<<
- *                                        (v, master, masterType, f, extType))
- * 
+      /* "netCDF4/_netCDF4.pyx":1271
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             # get endian-ness of variable.
+ *             endianness = None             # <<<<<<<<<<<<<<
+ *             with nogil:
+ *                 ierr = nc_inq_var_endian(_grpid, varid, &iendian)
  */
-          __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 = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_14);
-          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __Pyx_INCREF(Py_None);
+      __Pyx_XDECREF_SET(__pyx_v_endianness, Py_None);
 
-          /* "utils.pyx":480
- *                     # 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))
+      /* "netCDF4/_netCDF4.pyx":1272
+ *             # get endian-ness of variable.
+ *             endianness = None
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_var_endian(_grpid, varid, &iendian)
+ *             if ierr == NC_NOERR:
  */
-          __pyx_t_6 = PyTuple_New(1); 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);
-          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 = 480; __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 = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
+      {
+          #ifdef WITH_THREAD
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
+          #endif
+          /*try:*/ {
 
-        /* "utils.pyx":485
- * 
- *                     # Everythig ok.
- *                     vInst = part.variables[v]             # <<<<<<<<<<<<<<
- *                     cdfRecVar[v].append(vInst)
- *                 else:
+            /* "netCDF4/_netCDF4.pyx":1273
+ *             endianness = None
+ *             with nogil:
+ *                 ierr = nc_inq_var_endian(_grpid, varid, &iendian)             # <<<<<<<<<<<<<<
+ *             if ierr == NC_NOERR:
+ *                 if iendian == NC_ENDIAN_LITTLE:
  */
-        __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 = 485; __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;
+            __pyx_v_ierr = nc_inq_var_endian(__pyx_v__grpid, __pyx_v_varid, (&__pyx_v_iendian));
+          }
 
-        /* "utils.pyx":486
- *                     # Everythig ok.
- *                     vInst = part.variables[v]
- *                     cdfRecVar[v].append(vInst)             # <<<<<<<<<<<<<<
- *                 else:
- *                     # No making sure of anything -- assume this is ok..
+          /* "netCDF4/_netCDF4.pyx":1272
+ *             # get endian-ness of variable.
+ *             endianness = None
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_var_endian(_grpid, varid, &iendian)
+ *             if ierr == NC_NOERR:
  */
-        __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 = 486; __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 = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-        goto __pyx_L32;
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L34;
+            }
+            __pyx_L34:;
+          }
       }
-      /*else*/ {
 
-        /* "utils.pyx":489
- *                 else:
- *                     # No making sure of anything -- assume this is ok..
- *                     vInst = part.variables[v]             # <<<<<<<<<<<<<<
- *                     cdfRecVar[v].append(vInst)
- * 
+      /* "netCDF4/_netCDF4.pyx":1274
+ *             with nogil:
+ *                 ierr = nc_inq_var_endian(_grpid, varid, &iendian)
+ *             if ierr == NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 if iendian == NC_ENDIAN_LITTLE:
+ *                     endianness = '<'
  */
-        __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 = 489; __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;
+      __pyx_t_3 = ((__pyx_v_ierr == NC_NOERR) != 0);
+      if (__pyx_t_3) {
 
-        /* "utils.pyx":490
- *                     # No making sure of anything -- assume this is ok..
- *                     vInst = part.variables[v]
- *                     cdfRecVar[v].append(vInst)             # <<<<<<<<<<<<<<
- * 
- *             cdf.append(part)
+        /* "netCDF4/_netCDF4.pyx":1277
+ *                 if iendian == NC_ENDIAN_LITTLE:
+ *                     endianness = '<'
+ *                 elif iendian == NC_ENDIAN_BIG:             # <<<<<<<<<<<<<<
+ *                     endianness = '>'
+ *             # check to see if it is a supported user-defined type.
  */
-        __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 = 490; __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 = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-      }
-      __pyx_L32:;
+        switch (__pyx_v_iendian) {
 
-      /* "utils.pyx":447
- *             part = Dataset(f)
- *             varInfo = part.variables
- *             for v in masterRecVar.keys():             # <<<<<<<<<<<<<<
- *                 if check:
- *                     # Make sure master rec var is also defined here.
+          /* "netCDF4/_netCDF4.pyx":1275
+ *                 ierr = nc_inq_var_endian(_grpid, varid, &iendian)
+ *             if ierr == NC_NOERR:
+ *                 if iendian == NC_ENDIAN_LITTLE:             # <<<<<<<<<<<<<<
+ *                     endianness = '<'
+ *                 elif iendian == NC_ENDIAN_BIG:
  */
-    }
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          case NC_ENDIAN_LITTLE:
 
-    /* "utils.pyx":492
- *                     cdfRecVar[v].append(vInst)
- * 
- *             cdf.append(part)             # <<<<<<<<<<<<<<
- *             cdfVLen.append(len(part.dimensions[aggDimName]))
- * 
+          /* "netCDF4/_netCDF4.pyx":1276
+ *             if ierr == NC_NOERR:
+ *                 if iendian == NC_ENDIAN_LITTLE:
+ *                     endianness = '<'             # <<<<<<<<<<<<<<
+ *                 elif iendian == NC_ENDIAN_BIG:
+ *                     endianness = '>'
  */
-    __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 = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_INCREF(__pyx_kp_s__12);
+          __Pyx_DECREF_SET(__pyx_v_endianness, __pyx_kp_s__12);
+          break;
 
-    /* "utils.pyx":493
- * 
- *             cdf.append(part)
- *             cdfVLen.append(len(part.dimensions[aggDimName]))             # <<<<<<<<<<<<<<
- * 
- *         # Attach attributes to the MFDataset instance.
+          /* "netCDF4/_netCDF4.pyx":1277
+ *                 if iendian == NC_ENDIAN_LITTLE:
+ *                     endianness = '<'
+ *                 elif iendian == NC_ENDIAN_BIG:             # <<<<<<<<<<<<<<
+ *                     endianness = '>'
+ *             # check to see if it is a supported user-defined type.
  */
-    if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 493; __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 = 493; __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 = 493; __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 = 493; __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 = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          case NC_ENDIAN_BIG:
 
-    /* "utils.pyx":444
- *         # 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
+          /* "netCDF4/_netCDF4.pyx":1278
+ *                     endianness = '<'
+ *                 elif iendian == NC_ENDIAN_BIG:
+ *                     endianness = '>'             # <<<<<<<<<<<<<<
+ *             # check to see if it is a supported user-defined type.
+ *             try:
  */
-  }
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+          __Pyx_INCREF(__pyx_kp_s__13);
+          __Pyx_DECREF_SET(__pyx_v_endianness, __pyx_kp_s__13);
+          break;
+          default: break;
+        }
+        goto __pyx_L35;
+      }
+      __pyx_L35:;
 
-  /* "utils.pyx":497
- *         # 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
+      /* "netCDF4/_netCDF4.pyx":1280
+ *                     endianness = '>'
+ *             # check to see if it is a supported user-defined type.
+ *             try:             # <<<<<<<<<<<<<<
+ *                 datatype = _nctonptype[xtype]
+ *                 if endianness is not None:
  */
-  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_files_2, __pyx_v_files) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {
+        __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:*/ {
 
-  /* "utils.pyx":498
- *         # 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
+          /* "netCDF4/_netCDF4.pyx":1281
+ *             # check to see if it is a supported user-defined type.
+ *             try:
+ *                 datatype = _nctonptype[xtype]             # <<<<<<<<<<<<<<
+ *                 if endianness is not None:
+ *                     datatype = endianness + datatype
  */
-  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfVLen, __pyx_v_cdfVLen) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L36_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 = 1281; __pyx_clineno = __LINE__; goto __pyx_L36_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;
 
-  /* "utils.pyx":499
- *         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
+          /* "netCDF4/_netCDF4.pyx":1282
+ *             try:
+ *                 datatype = _nctonptype[xtype]
+ *                 if endianness is not None:             # <<<<<<<<<<<<<<
+ *                     datatype = endianness + datatype
+ *             except KeyError:
  */
-  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 499; __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 = 499; __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 = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          __pyx_t_3 = (__pyx_v_endianness != Py_None);
+          __pyx_t_14 = (__pyx_t_3 != 0);
+          if (__pyx_t_14) {
 
-  /* "utils.pyx":500
- *         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
+            /* "netCDF4/_netCDF4.pyx":1283
+ *                 datatype = _nctonptype[xtype]
+ *                 if endianness is not None:
+ *                     datatype = endianness + datatype             # <<<<<<<<<<<<<<
+ *             except KeyError:
+ *                 if xtype == NC_STRING:
  */
-  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfRecVar, __pyx_v_cdfRecVar) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __pyx_t_6 = PyNumber_Add(__pyx_v_endianness, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L36_error;}
+            __Pyx_GOTREF(__pyx_t_6);
+            __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_6);
+            __pyx_t_6 = 0;
+            goto __pyx_L44;
+          }
+          __pyx_L44:;
+        }
+        __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_L43_try_end;
+        __pyx_L36_error:;
+        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-  /* "utils.pyx":502
- *         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():
+        /* "netCDF4/_netCDF4.pyx":1284
+ *                 if endianness is not None:
+ *                     datatype = endianness + datatype
+ *             except KeyError:             # <<<<<<<<<<<<<<
+ *                 if xtype == NC_STRING:
+ *                     datatype = str
  */
-  __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 = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_15 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+        if (__pyx_t_15) {
+          __Pyx_AddTraceback("netCDF4._netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
+          if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_GOTREF(__pyx_t_1);
+          __Pyx_GOTREF(__pyx_t_10);
 
-  /* "utils.pyx":503
- *                                              # the aggregation variables
- *         self._dims = cdfm.dimensions
- *         self._grps = cdfm.groups             # <<<<<<<<<<<<<<
- *         for dimname, dim in self._dims.items():
- *             if dimname == aggDimName:
+          /* "netCDF4/_netCDF4.pyx":1285
+ *                     datatype = endianness + datatype
+ *             except KeyError:
+ *                 if xtype == NC_STRING:             # <<<<<<<<<<<<<<
+ *                     datatype = str
+ *                 else:
  */
-  __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 = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+          __pyx_t_14 = ((__pyx_v_xtype == NC_STRING) != 0);
+          if (__pyx_t_14) {
 
-  /* "utils.pyx":504
- *         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)
+            /* "netCDF4/_netCDF4.pyx":1286
+ *             except KeyError:
+ *                 if xtype == NC_STRING:
+ *                     datatype = str             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     with nogil:
  */
-  __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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 = 504; __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;
+            __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+            __Pyx_XDECREF_SET(__pyx_v_datatype, ((PyObject *)((PyObject*)(&PyString_Type))));
+            goto __pyx_L47;
+          }
+          /*else*/ {
 
-    /* "utils.pyx":505
- *         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
+            /* "netCDF4/_netCDF4.pyx":1288
+ *                     datatype = str
+ *                 else:
+ *                     with nogil:             # <<<<<<<<<<<<<<
+ *                         ierr = nc_inq_user_type(_grpid, xtype, namstring_cmp,
+ *                                                 NULL, NULL, NULL, &classp)
  */
-    if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 505; __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 = 505; __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 = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    if (__pyx_t_2) {
+            {
+                #ifdef WITH_THREAD
+                PyThreadState *_save;
+                Py_UNBLOCK_THREADS
+                #endif
+                /*try:*/ {
 
-      /* "utils.pyx":506
- *         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():
+                  /* "netCDF4/_netCDF4.pyx":1289
+ *                 else:
+ *                     with nogil:
+ *                         ierr = nc_inq_user_type(_grpid, xtype, namstring_cmp,             # <<<<<<<<<<<<<<
+ *                                                 NULL, NULL, NULL, &classp)
+ *                     if classp == NC_COMPOUND: # a compound type
  */
-      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Dimension); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 506; __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 = 506; __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 = 506; __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 = 506; __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 = 506; __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 = 506; __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 = 506; __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:;
+                  __pyx_v_ierr = nc_inq_user_type(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_namstring_cmp, NULL, NULL, NULL, (&__pyx_v_classp));
+                }
 
-    /* "utils.pyx":504
- *         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)
+                /* "netCDF4/_netCDF4.pyx":1288
+ *                     datatype = str
+ *                 else:
+ *                     with nogil:             # <<<<<<<<<<<<<<
+ *                         ierr = nc_inq_user_type(_grpid, xtype, namstring_cmp,
+ *                                                 NULL, NULL, NULL, &classp)
  */
-  }
-  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+                /*finally:*/ {
+                  /*normal exit:*/{
+                    #ifdef WITH_THREAD
+                    Py_BLOCK_THREADS
+                    #endif
+                    goto __pyx_L52;
+                  }
+                  __pyx_L52:;
+                }
+            }
 
-  /* "utils.pyx":507
- *             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():
+            /* "netCDF4/_netCDF4.pyx":1298
+ *                             #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:
  */
-  __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 = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+            switch (__pyx_v_classp) {
 
-  /* "utils.pyx":508
- *                 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)
+              /* "netCDF4/_netCDF4.pyx":1291
+ *                         ierr = nc_inq_user_type(_grpid, xtype, namstring_cmp,
+ *                                                 NULL, NULL, NULL, &classp)
+ *                     if classp == NC_COMPOUND: # a compound type             # <<<<<<<<<<<<<<
+ *                         # create CompoundType instance describing this compound type.
+ *                         try:
  */
-  __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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 = 508; __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;
+              case NC_COMPOUND:
 
-    /* "utils.pyx":509
- *         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 = []
+              /* "netCDF4/_netCDF4.pyx":1293
+ *                     if classp == NC_COMPOUND: # a compound type
+ *                         # create CompoundType instance describing this compound type.
+ *                         try:             # <<<<<<<<<<<<<<
+ *                             datatype = _read_compound(group, xtype, endian=endianness)
+ *                         except KeyError:
  */
-    __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 = 509; __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 = 509; __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 = 509; __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 = 509; __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 = 509; __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) {
+              {
+                __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
+                __Pyx_XGOTREF(__pyx_t_16);
+                __Pyx_XGOTREF(__pyx_t_17);
+                __Pyx_XGOTREF(__pyx_t_18);
+                /*try:*/ {
 
-      /* "utils.pyx":510
- *         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 = []
+                  /* "netCDF4/_netCDF4.pyx":1294
+ *                         # create CompoundType instance describing this compound type.
+ *                         try:
+ *                             datatype = _read_compound(group, xtype, endian=endianness)             # <<<<<<<<<<<<<<
+ *                         except KeyError:
+ *                             #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
  */
-      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Variable); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 510; __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 = 510; __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 = 510; __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 = 510; __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 = 510; __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 = 510; __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:;
+                  __pyx_t_19.__pyx_n = 1;
+                  __pyx_t_19.endian = __pyx_v_endianness;
+                  __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_group, __pyx_v_xtype, &__pyx_t_19); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L53_error;}
+                  __Pyx_GOTREF(__pyx_t_7);
+                  __Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_7);
+                  __pyx_t_7 = 0;
+                }
+                __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+                __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+                goto __pyx_L60_try_end;
+                __pyx_L53_error:;
+                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-    /* "utils.pyx":508
- *                 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)
+                /* "netCDF4/_netCDF4.pyx":1295
+ *                         try:
+ *                             datatype = _read_compound(group, xtype, endian=endianness)
+ *                         except KeyError:             # <<<<<<<<<<<<<<
+ *                             #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
+ *                             continue
  */
-  }
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+                __pyx_t_15 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+                if (__pyx_t_15) {
+                  __Pyx_AddTraceback("netCDF4._netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
+                  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L55_except_error;}
+                  __Pyx_GOTREF(__pyx_t_7);
+                  __Pyx_GOTREF(__pyx_t_5);
+                  __Pyx_GOTREF(__pyx_t_8);
 
-  /* "utils.pyx":511
- *             if varname in self._cdfRecVar.keys():
- *                 self._vars[varname] = _Variable(self, varname, var, aggDimName)
- *         self._file_format = []             # <<<<<<<<<<<<<<
- *         self._data_model = []
- *         self._disk_format = []
+                  /* "netCDF4/_netCDF4.pyx":1297
+ *                         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.
  */
-  __pyx_t_6 = PyList_New(0); 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 (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_format, __pyx_t_6) < 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;
+                  goto __pyx_L62_except_continue;
+                  __pyx_L62_except_continue:;
+                  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+                  goto __pyx_L59_try_continue;
+                }
+                goto __pyx_L55_except_error;
+                __pyx_L55_except_error:;
+                __Pyx_XGIVEREF(__pyx_t_16);
+                __Pyx_XGIVEREF(__pyx_t_17);
+                __Pyx_XGIVEREF(__pyx_t_18);
+                __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+                goto __pyx_L38_except_error;
+                __pyx_L59_try_continue:;
+                __Pyx_XGIVEREF(__pyx_t_16);
+                __Pyx_XGIVEREF(__pyx_t_17);
+                __Pyx_XGIVEREF(__pyx_t_18);
+                __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
+                goto __pyx_L46_except_continue;
+                __pyx_L60_try_end:;
+              }
+              break;
 
-  /* "utils.pyx":512
- *                 self._vars[varname] = _Variable(self, varname, var, aggDimName)
- *         self._file_format = []
- *         self._data_model = []             # <<<<<<<<<<<<<<
- *         self._disk_format = []
- *         for dset in self._cdf:
+              /* "netCDF4/_netCDF4.pyx":1298
+ *                             #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:
  */
-  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 512; __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 = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+              case NC_VLEN:
 
-  /* "utils.pyx":513
- *         self._file_format = []
- *         self._data_model = []
- *         self._disk_format = []             # <<<<<<<<<<<<<<
- *         for dset in self._cdf:
- *             if dset.file_format == 'NETCDF4' or dset.data_model == 'NETCDF4':
+              /* "netCDF4/_netCDF4.pyx":1300
+ *                     elif classp == NC_VLEN: # a compound type
+ *                         # create VLType instance describing this compound type.
+ *                         try:             # <<<<<<<<<<<<<<
+ *                             datatype = _read_vlen(group, xtype, endian=endianness)
+ *                         except KeyError:
  */
-  __pyx_t_6 = PyList_New(0); 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);
-  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_disk_format, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+              {
+                __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
+                __Pyx_XGOTREF(__pyx_t_18);
+                __Pyx_XGOTREF(__pyx_t_17);
+                __Pyx_XGOTREF(__pyx_t_16);
+                /*try:*/ {
 
-  /* "utils.pyx":514
- *         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')
+                  /* "netCDF4/_netCDF4.pyx":1301
+ *                         # create VLType instance describing this compound type.
+ *                         try:
+ *                             datatype = _read_vlen(group, xtype, endian=endianness)             # <<<<<<<<<<<<<<
+ *                         except KeyError:
+ *                             #print "WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
  */
-  __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 = 514; __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 = 514; __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 = 514; __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 = 514; __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 = 514; __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 = 514; __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 = 514; __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 = 514; __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;
+                  __pyx_t_20.__pyx_n = 1;
+                  __pyx_t_20.endian = __pyx_v_endianness;
+                  __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__read_vlen(__pyx_v_group, __pyx_v_xtype, &__pyx_t_20); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L63_error;}
+                  __Pyx_GOTREF(__pyx_t_8);
+                  __Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_8);
+                  __pyx_t_8 = 0;
+                }
+                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+                __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+                __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+                goto __pyx_L70_try_end;
+                __pyx_L63_error:;
+                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-    /* "utils.pyx":515
- *         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)
+                /* "netCDF4/_netCDF4.pyx":1302
+ *                         try:
+ *                             datatype = _read_vlen(group, xtype, endian=endianness)
+ *                         except KeyError:             # <<<<<<<<<<<<<<
+ *                             #print "WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
+ *                             continue
  */
-    __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 = 515; __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 = 515; __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 = 515; __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 = 515; __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) {
+                __pyx_t_15 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+                if (__pyx_t_15) {
+                  __Pyx_AddTraceback("netCDF4._netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
+                  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L65_except_error;}
+                  __Pyx_GOTREF(__pyx_t_8);
+                  __Pyx_GOTREF(__pyx_t_5);
+                  __Pyx_GOTREF(__pyx_t_7);
 
-      /* "utils.pyx":516
- *         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)
+                  /* "netCDF4/_netCDF4.pyx":1304
+ *                         except KeyError:
+ *                             #print "WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
+ *                             continue             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         #print "WARNING: variable '%s' has unsupported datatype, skipping .." % name
  */
-      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); 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);
-      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+                  goto __pyx_L72_except_continue;
+                  __pyx_L72_except_continue:;
+                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+                  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+                  goto __pyx_L69_try_continue;
+                }
+                goto __pyx_L65_except_error;
+                __pyx_L65_except_error:;
+                __Pyx_XGIVEREF(__pyx_t_18);
+                __Pyx_XGIVEREF(__pyx_t_17);
+                __Pyx_XGIVEREF(__pyx_t_16);
+                __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
+                goto __pyx_L38_except_error;
+                __pyx_L69_try_continue:;
+                __Pyx_XGIVEREF(__pyx_t_18);
+                __Pyx_XGIVEREF(__pyx_t_17);
+                __Pyx_XGIVEREF(__pyx_t_16);
+                __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
+                goto __pyx_L46_except_continue;
+                __pyx_L70_try_end:;
+              }
+              break;
+              default:
 
-    /* "utils.pyx":517
- *             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)
+              /* "netCDF4/_netCDF4.pyx":1307
+ *                     else:
+ *                         #print "WARNING: variable '%s' has unsupported datatype, skipping .." % name
+ *                         continue             # <<<<<<<<<<<<<<
+ *             # get number of dimensions.
+ *             with nogil:
  */
-    __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 = 517; __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 = 517; __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 = 517; __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_except_continue;
+              break;
+            }
+          }
+          __pyx_L47:;
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          goto __pyx_L37_exception_handled;
+          __pyx_L46_except_continue:;
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          goto __pyx_L42_try_continue;
+        }
+        goto __pyx_L38_except_error;
+        __pyx_L38_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_L42_try_continue:;
+        __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_L15_continue;
+        __pyx_L37_exception_handled:;
+        __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);
+        __pyx_L43_try_end:;
+      }
 
-    /* "utils.pyx":518
- *                 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 = '/'
+      /* "netCDF4/_netCDF4.pyx":1309
+ *                         continue
+ *             # get number of dimensions.
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_varndims(_grpid, varid, &numdims)
+ *             if ierr != NC_NOERR:
  */
-    __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 = 518; __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 = 518; __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 = 518; __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;
+      {
+          #ifdef WITH_THREAD
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
+          #endif
+          /*try:*/ {
 
-    /* "utils.pyx":519
- *             self._file_format.append(dset.file_format)
- *             self._data_model.append(dset.data_model)
- *             self._disk_format.append(dset.disk_format)             # <<<<<<<<<<<<<<
- *         self._path = '/'
- * 
+            /* "netCDF4/_netCDF4.pyx":1310
+ *             # get number of dimensions.
+ *             with nogil:
+ *                 ierr = nc_inq_varndims(_grpid, varid, &numdims)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-    __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 = 519; __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 = 519; __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 = 519; __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_v_ierr = nc_inq_varndims(__pyx_v__grpid, __pyx_v_varid, (&__pyx_v_numdims));
+          }
 
-    /* "utils.pyx":514
- *         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')
+          /* "netCDF4/_netCDF4.pyx":1309
+ *                         continue
+ *             # get number of dimensions.
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_varndims(_grpid, varid, &numdims)
+ *             if ierr != NC_NOERR:
  */
-  }
-  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L77;
+            }
+            __pyx_L77:;
+          }
+      }
 
-  /* "utils.pyx":520
- *             self._data_model.append(dset.data_model)
- *             self._disk_format.append(dset.disk_format)
- *         self._path = '/'             # <<<<<<<<<<<<<<
- * 
- *     def __setattr__(self, name, value):
+      /* "netCDF4/_netCDF4.pyx":1311
+ *             with nogil:
+ *                 ierr = nc_inq_varndims(_grpid, varid, &numdims)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             # get dimension ids.
  */
-  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_path, __pyx_kp_s__14) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_14 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_14) {
 
-  /* "utils.pyx":344
- *     """
- * 
- *     def __init__(self, files, check=False, aggdim=None, exclude=[]):             # <<<<<<<<<<<<<<
- *         """
- * Open a Dataset spanning multiple files, making it look as if it was a
+        /* "netCDF4/_netCDF4.pyx":1312
+ *                 ierr = nc_inq_varndims(_grpid, varid, &numdims)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             # get dimension ids.
+ *             with nogil:
  */
+        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_10 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_INCREF(__pyx_t_10);
+        PyTuple_SET_ITEM(__pyx_t_1, 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_1, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 1312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
 
-  /* 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;
-}
+      /* "netCDF4/_netCDF4.pyx":1314
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             # get dimension ids.
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_vardimid(_grpid, varid, dimids)
+ *             if ierr != NC_NOERR:
+ */
+      {
+          #ifdef WITH_THREAD
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
+          #endif
+          /*try:*/ {
 
-/* "utils.pyx":522
- *         self._path = '/'
- * 
- *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
- *         """override base class attribute creation"""
- *         self.__dict__[name] = value
+            /* "netCDF4/_netCDF4.pyx":1315
+ *             # get dimension ids.
+ *             with nogil:
+ *                 ierr = nc_inq_vardimid(_grpid, varid, dimids)             # <<<<<<<<<<<<<<
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
+            __pyx_v_ierr = nc_inq_vardimid(__pyx_v__grpid, __pyx_v_varid, __pyx_v_dimids);
+          }
 
-/* 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 = 522; __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 = 522; __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 = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          /* "netCDF4/_netCDF4.pyx":1314
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             # get dimension ids.
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_vardimid(_grpid, varid, dimids)
+ *             if ierr != NC_NOERR:
+ */
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L83;
+            }
+            __pyx_L83:;
+          }
       }
-    } 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 = 522; __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":524
- *     def __setattr__(self, name, value):
- *         """override base class attribute creation"""
- *         self.__dict__[name] = value             # <<<<<<<<<<<<<<
- * 
- *     def __getattribute__(self, name):
+      /* "netCDF4/_netCDF4.pyx":1316
+ *             with nogil:
+ *                 ierr = nc_inq_vardimid(_grpid, varid, dimids)
+ *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             # loop over dimensions, retrieve names.
  */
-  __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 = 524; __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 = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_14 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_14) {
 
-  /* "utils.pyx":522
- *         self._path = '/'
- * 
- *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
- *         """override base class attribute creation"""
- *         self.__dict__[name] = value
+        /* "netCDF4/_netCDF4.pyx":1317
+ *                 ierr = nc_inq_vardimid(_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.
  */
-
-  /* function exit code */
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
+        __pyx_t_10 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_INCREF(__pyx_t_10);
+        PyTuple_SET_ITEM(__pyx_t_1, 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_1, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4/_netCDF4.pyx":1323
+ *             # 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_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_XDECREF_SET(__pyx_v_dimensions, ((PyObject*)__pyx_t_10));
+      __pyx_t_10 = 0;
+
+      /* "netCDF4/_netCDF4.pyx":1324
+ *             # use the 'foo' dimension from the parent?
+ *             dimensions = []
+ *             for nn from 0 <= nn < numdims:             # <<<<<<<<<<<<<<
+ *                 grp = group
+ *                 found = False
+ */
+      __pyx_t_15 = __pyx_v_numdims;
+      for (__pyx_v_nn = 0; __pyx_v_nn < __pyx_t_15; __pyx_v_nn++) {
+
+        /* "netCDF4/_netCDF4.pyx":1325
+ *             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/_netCDF4.pyx":1326
+ *             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/_netCDF4.pyx":1327
+ *                 grp = group
+ *                 found = False
+ *                 while not found:             # <<<<<<<<<<<<<<
+ *                     for key, value in grp.dimensions.items():
+ *                         if value._dimid == dimids[nn]:
+ */
+        while (1) {
+          __pyx_t_14 = ((!(__pyx_v_found != 0)) != 0);
+          if (!__pyx_t_14) break;
+
+          /* "netCDF4/_netCDF4.pyx":1328
+ *                 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 = 1328; __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 = 1328; __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_10 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          } else {
+            __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          __Pyx_GOTREF(__pyx_t_10);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+          if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) {
+            __pyx_t_6 = __pyx_t_10; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
+            __pyx_t_21 = NULL;
+          } else {
+            __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_6);
+            __pyx_t_21 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          for (;;) {
+            if (likely(!__pyx_t_21)) {
+              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_10 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_10); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+                #else
+                __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __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_10 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_10); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+                #else
+                __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+                #endif
+              }
+            } else {
+              __pyx_t_10 = __pyx_t_21(__pyx_t_6);
+              if (unlikely(!__pyx_t_10)) {
+                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 = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+                }
+                break;
+              }
+              __Pyx_GOTREF(__pyx_t_10);
+            }
+            if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
+              PyObject* sequence = __pyx_t_10;
+              #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 = 1328; __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_7 = PyTuple_GET_ITEM(sequence, 1); 
+              } else {
+                __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
+                __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
+              }
+              __Pyx_INCREF(__pyx_t_1);
+              __Pyx_INCREF(__pyx_t_7);
+              #else
+              __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __Pyx_GOTREF(__pyx_t_1);
+              __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __Pyx_GOTREF(__pyx_t_7);
+              #endif
+              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+            } else {
+              Py_ssize_t index = -1;
+              __pyx_t_5 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __Pyx_GOTREF(__pyx_t_5);
+              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+              __pyx_t_22 = Py_TYPE(__pyx_t_5)->tp_iternext;
+              index = 0; __pyx_t_1 = __pyx_t_22(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L91_unpacking_failed;
+              __Pyx_GOTREF(__pyx_t_1);
+              index = 1; __pyx_t_7 = __pyx_t_22(__pyx_t_5); if (unlikely(!__pyx_t_7)) goto __pyx_L91_unpacking_failed;
+              __Pyx_GOTREF(__pyx_t_7);
+              if (__Pyx_IternextUnpackEndCheck(__pyx_t_22(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __pyx_t_22 = NULL;
+              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+              goto __pyx_L92_unpacking_done;
+              __pyx_L91_unpacking_failed:;
+              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+              __pyx_t_22 = NULL;
+              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+              __pyx_L92_unpacking_done:;
+            }
+            __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
+            __pyx_t_1 = 0;
+            __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
+            __pyx_t_7 = 0;
+
+            /* "netCDF4/_netCDF4.pyx":1329
+ *                 while not found:
+ *                     for key, value in grp.dimensions.items():
+ *                         if value._dimid == dimids[nn]:             # <<<<<<<<<<<<<<
+ *                             dimensions.append(key)
+ *                             found = True
+ */
+            __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_dimid); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_10);
+            __pyx_t_7 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_nn])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_GOTREF(__pyx_t_7);
+            __pyx_t_1 = PyObject_RichCompare(__pyx_t_10, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+            __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+            if (__pyx_t_14) {
+
+              /* "netCDF4/_netCDF4.pyx":1330
+ *                     for key, value in grp.dimensions.items():
+ *                         if value._dimid == dimids[nn]:
+ *                             dimensions.append(key)             # <<<<<<<<<<<<<<
+ *                             found = True
+ *                             break
+ */
+              __pyx_t_23 = __Pyx_PyList_Append(__pyx_v_dimensions, __pyx_v_key); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+              /* "netCDF4/_netCDF4.pyx":1331
+ *                         if value._dimid == dimids[nn]:
+ *                             dimensions.append(key)
+ *                             found = True             # <<<<<<<<<<<<<<
+ *                             break
+ *                     grp = grp.parent
+ */
+              __pyx_v_found = 1;
+
+              /* "netCDF4/_netCDF4.pyx":1332
+ *                             dimensions.append(key)
+ *                             found = True
+ *                             break             # <<<<<<<<<<<<<<
+ *                     grp = grp.parent
+ *             # create new variable instance.
+ */
+              goto __pyx_L90_break;
+            }
+
+            /* "netCDF4/_netCDF4.pyx":1328
+ *                 found = False
+ *                 while not found:
+ *                     for key, value in grp.dimensions.items():             # <<<<<<<<<<<<<<
+ *                         if value._dimid == dimids[nn]:
+ *                             dimensions.append(key)
+ */
+          }
+          __pyx_L90_break:;
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+          /* "netCDF4/_netCDF4.pyx":1333
+ *                             found = True
+ *                             break
+ *                     grp = grp.parent             # <<<<<<<<<<<<<<
+ *             # create new variable instance.
+ *             if endianness == '>':
+ */
+          __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 = 1333; __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/_netCDF4.pyx":1335
+ *                     grp = grp.parent
+ *             # create new variable instance.
+ *             if endianness == '>':             # <<<<<<<<<<<<<<
+ *                 variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big')
+ *             elif endianness == '<':
+ */
+      __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_endianness, __pyx_kp_s__13, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_14) {
+
+        /* "netCDF4/_netCDF4.pyx":1336
+ *             # create new variable instance.
+ *             if endianness == '>':
+ *                 variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big')             # <<<<<<<<<<<<<<
+ *             elif endianness == '<':
+ *                 variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little')
+ */
+        __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __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 = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_endian, __pyx_n_s_big) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_Variable)), __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __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_1); __pyx_t_1 = 0;
+        if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        goto __pyx_L94;
+      }
+
+      /* "netCDF4/_netCDF4.pyx":1337
+ *             if endianness == '>':
+ *                 variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big')
+ *             elif endianness == '<':             # <<<<<<<<<<<<<<
+ *                 variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little')
+ *             else:
+ */
+      __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_endianness, __pyx_kp_s__12, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_14) {
+
+        /* "netCDF4/_netCDF4.pyx":1338
+ *                 variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big')
+ *             elif endianness == '<':
+ *                 variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little')             # <<<<<<<<<<<<<<
+ *             else:
+ *                 variables[name] = Variable(group, name, datatype, dimensions, id=varid)
+ */
+        __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_INCREF(__pyx_v_group);
+        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_group);
+        __Pyx_GIVEREF(__pyx_v_group);
+        __Pyx_INCREF(__pyx_v_name);
+        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_name);
+        __Pyx_GIVEREF(__pyx_v_name);
+        __Pyx_INCREF(__pyx_v_datatype);
+        PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_datatype);
+        __Pyx_GIVEREF(__pyx_v_datatype);
+        __Pyx_INCREF(__pyx_v_dimensions);
+        PyTuple_SET_ITEM(__pyx_t_7, 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 = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_endian, __pyx_n_s_little) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_Variable)), __pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __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_1); __pyx_t_1 = 0;
+        if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_6) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        goto __pyx_L94;
+      }
+      /*else*/ {
+
+        /* "netCDF4/_netCDF4.pyx":1340
+ *                 variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little')
+ *             else:
+ *                 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 = 1340; __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 = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_Variable)), __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __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_1); __pyx_t_1 = 0;
+        if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      }
+      __pyx_L94:;
+      __pyx_L15_continue:;
+    }
+
+    /* "netCDF4/_netCDF4.pyx":1341
+ *             else:
+ *                 variables[name] = Variable(group, name, datatype, dimensions, id=varid)
+ *         free(varids) # free pointer holding variable ids.             # <<<<<<<<<<<<<<
+ *     return variables
+ * 
+ */
+    free(__pyx_v_varids);
+    goto __pyx_L7;
+  }
+  __pyx_L7:;
+
+  /* "netCDF4/_netCDF4.pyx":1342
+ *                 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/_netCDF4.pyx":1225
+ *     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_AddTraceback("netCDF4.MFDataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+  __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._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_endianness);
+  __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;
 }
 
-/* "utils.pyx":526
- *         self.__dict__[name] = value
+/* "netCDF4/_netCDF4.pyx":1477
+ *     __orthogonal_indexing__
  * 
- *     def __getattribute__(self, name):             # <<<<<<<<<<<<<<
- *         if name in ['variables','dimensions','file_format','groups',\
- *                     'data_model','disk_format','path']:
+ *     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 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;
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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;
-  PyObject *__pyx_r = 0;
+  int __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__getattribute__ (wrapper)", 0);
+  __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_self,&__pyx_n_s_name,0};
-    PyObject* values[2] = {0,0};
+    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);
+    values[2] = ((PyObject *)Py_True);
+    values[3] = ((PyObject *)__pyx_n_s_NETCDF4);
+
+    /* "netCDF4/_netCDF4.pyx":1478
+ * 
+ *     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;
@@ -9556,1127 +8728,1198 @@ static PyObject *__pyx_pw_7netCDF4_9MFDataset_5__getattribute__(PyObject *__pyx_
       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--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 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 = 526; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        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, 0, values, pos_args, "__getattribute__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __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);
+      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_self = values[0];
-    __pyx_v_name = values[1];
+    __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("__getattribute__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("netCDF4.MFDataset.__getattribute__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
-  return NULL;
+  return -1;
   __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_7netCDF4_9MFDataset_4__getattribute__(__pyx_self, __pyx_v_self, __pyx_v_name);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(((struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":1477
+ *     __orthogonal_indexing__
+ * 
+ *     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 PyObject *__pyx_pf_7netCDF4_9MFDataset_4__getattribute__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
-  PyObject *__pyx_r = NULL;
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset___init__(struct __pyx_obj_7netCDF4_8_netCDF4_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
-  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_1;
   int __pyx_t_2;
-  int __pyx_t_3;
+  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;
+  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("__getattribute__", 0);
+  __Pyx_RefNannySetupContext("__init__", 0);
 
-  /* "utils.pyx":527
- * 
- *     def __getattribute__(self, name):
- *         if name in ['variables','dimensions','file_format','groups',\             # <<<<<<<<<<<<<<
- *                     'data_model','disk_format','path']:
- *             if name == 'dimensions': return self._dims
+  /* "netCDF4/_netCDF4.pyx":1483
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         # flag to indicate that Variables in this Dataset support orthogonal indexing.
+ *         self.__orthogonal_indexing__ = True             # <<<<<<<<<<<<<<
+ *         if diskless and __netcdf4libversion__ < '4.2.1':
+ *             #diskless = False # don't raise error, instead silently ignore
  */
-  __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 = 527; __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 = 527; __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 = 527; __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 = 527; __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 = 527; __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 = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (!__pyx_t_3) {
+  __Pyx_INCREF(Py_True);
+  __Pyx_GIVEREF(Py_True);
+  __Pyx_GOTREF(__pyx_v_self->__orthogonal_indexing__);
+  __Pyx_DECREF(__pyx_v_self->__orthogonal_indexing__);
+  __pyx_v_self->__orthogonal_indexing__ = Py_True;
+
+  /* "netCDF4/_netCDF4.pyx":1484
+ *         # flag to indicate that Variables in this Dataset support orthogonal indexing.
+ *         self.__orthogonal_indexing__ = True
+ *         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 = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_2) {
   } else {
-    __pyx_t_2 = __pyx_t_3;
+    __pyx_t_1 = __pyx_t_2;
     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 = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = __pyx_t_3;
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __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 = 1484; __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 = 1484; __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:;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = (__pyx_t_2 != 0);
-  if (__pyx_t_3) {
+  if (__pyx_t_1) {
 
-    /* "utils.pyx":529
- *         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
+    /* "netCDF4/_netCDF4.pyx":1486
+ *         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_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 = 529; __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 = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_r = __pyx_t_1;
-      __pyx_t_1 = 0;
-      goto __pyx_L0;
-    }
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; __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 = 1486; __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 = 1486; __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 = 1486; __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 = 1486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-    /* "utils.pyx":530
- *                     '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 = 530; __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 = 530; __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":531
- *             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 = 531; __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 = 531; __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":532
- *             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 = 532; __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 = 532; __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":533
- *             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
+  /* "netCDF4/_netCDF4.pyx":1487
+ *             #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_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 = 533; __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 = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_r = __pyx_t_1;
-      __pyx_t_1 = 0;
-      goto __pyx_L0;
-    }
+  __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_filename, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_bytestr = __pyx_t_3;
+  __pyx_t_3 = 0;
 
-    /* "utils.pyx":534
- *             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:
+  /* "netCDF4/_netCDF4.pyx":1488
+ *             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_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 = 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_path); 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;
-    }
+  __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_path = __pyx_t_5;
 
-    /* "utils.pyx":535
- *             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)
+  /* "netCDF4/_netCDF4.pyx":1489
+ *         bytestr = _strencode(filename)
+ *         path = bytestr
+ *         if mode == 'w':             # <<<<<<<<<<<<<<
+ *             _set_default_format(format=format)
+ *             if clobber:
  */
-    __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 = 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_grps); 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;
-    }
-    goto __pyx_L3;
-  }
-  /*else*/ {
+  __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 = 1489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
 
-    /* "utils.pyx":537
- *             if name == 'groups': return self._grps
- *         else:
- *             return Dataset.__getattribute__(self, name)             # <<<<<<<<<<<<<<
- * 
- *     def ncattrs(self):
+    /* "netCDF4/_netCDF4.pyx":1490
+ *         path = bytestr
+ *         if mode == 'w':
+ *             _set_default_format(format=format)             # <<<<<<<<<<<<<<
+ *             if clobber:
+ *                 if diskless:
  */
-    __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 = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_default_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; __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 = 1490; __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 = 537; __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 = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_format, __pyx_v_format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; __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 = 1490; __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_r = __pyx_t_1;
-    __pyx_t_1 = 0;
-    goto __pyx_L0;
-  }
-  __pyx_L3:;
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-  /* "utils.pyx":526
- *         self.__dict__[name] = value
- * 
- *     def __getattribute__(self, name):             # <<<<<<<<<<<<<<
- *         if name in ['variables','dimensions','file_format','groups',\
- *                     'data_model','disk_format','path']:
+    /* "netCDF4/_netCDF4.pyx":1491
+ *         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 = 1491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
 
-  /* 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":539
- *             return Dataset.__getattribute__(self, name)
- * 
- *     def ncattrs(self):             # <<<<<<<<<<<<<<
- *         return self._cdf[0].__dict__.keys()
- * 
+      /* "netCDF4/_netCDF4.pyx":1492
+ *             _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 = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_1) {
 
-/* 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));
+        /* "netCDF4/_netCDF4.pyx":1493
+ *             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 = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_1) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+          /* "netCDF4/_netCDF4.pyx":1494
+ *                 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 = 1494; __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 = 1494; __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 = 1494; __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 = 1494; __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*/ {
 
-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);
+          /* "netCDF4/_netCDF4.pyx":1496
+ *                         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 = 1496; __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 = 1496; __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 = 1496; __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 = 1496; __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*/ {
 
-  /* "utils.pyx":540
- * 
- *     def ncattrs(self):
- *         return self._cdf[0].__dict__.keys()             # <<<<<<<<<<<<<<
- * 
- *     def close(self):
+        /* "netCDF4/_netCDF4.pyx":1498
+ *                         ierr = nc_create(path, NC_CLOBBER | NC_DISKLESS , &grpid)
+ *                 else:
+ *                     ierr = nc_create(path, NC_CLOBBER, &grpid)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 if diskless:
  */
-  __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 = 540; __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 = 540; __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 = 540; __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 = 540; __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);
+        __pyx_v_ierr = nc_create(__pyx_v_path, NC_CLOBBER, (&__pyx_v_grpid));
+      }
+      __pyx_L8:;
+      goto __pyx_L7;
     }
-  }
-  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 = 540; __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 = 540; __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*/ {
 
-  /* "utils.pyx":539
- *             return Dataset.__getattribute__(self, name)
- * 
- *     def ncattrs(self):             # <<<<<<<<<<<<<<
- *         return self._cdf[0].__dict__.keys()
- * 
+      /* "netCDF4/_netCDF4.pyx":1500
+ *                     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 = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_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.MFDataset.ncattrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "utils.pyx":542
- *         return self._cdf[0].__dict__.keys()
- * 
- *     def close(self):             # <<<<<<<<<<<<<<
- *         for dset in self._cdf:
- *             dset.close()
+        /* "netCDF4/_netCDF4.pyx":1501
+ *             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 = 1501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_1) {
 
-/* 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);
+          /* "netCDF4/_netCDF4.pyx":1502
+ *                 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 = 1502; __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 = 1502; __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 = 1502; __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 = 1502; __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*/ {
 
-  /* "utils.pyx":543
- * 
- *     def close(self):
- *         for dset in self._cdf:             # <<<<<<<<<<<<<<
- *             dset.close()
- * 
+          /* "netCDF4/_netCDF4.pyx":1504
+ *                         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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 543; __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 = 543; __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 = 543; __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 = 543; __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 = 543; __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 = 543; __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 = 543; __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 = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_3 = __Pyx_PyInt_From_int(NC_NOCLOBBER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; __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 = 1504; __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 = 1504; __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 = 1504; __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));
         }
-        break;
+        __pyx_L11:;
+        goto __pyx_L10;
       }
-      __Pyx_GOTREF(__pyx_t_1);
-    }
-    __Pyx_XDECREF_SET(__pyx_v_dset, __pyx_t_1);
-    __pyx_t_1 = 0;
+      /*else*/ {
 
-    /* "utils.pyx":544
- *     def close(self):
- *         for dset in self._cdf:
- *             dset.close()             # <<<<<<<<<<<<<<
- * 
- *     def __repr__(self):
+        /* "netCDF4/_netCDF4.pyx":1506
+ *                         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_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 544; __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);
+        __pyx_v_ierr = nc_create(__pyx_v_path, NC_NOCLOBBER, (&__pyx_v_grpid));
       }
+      __pyx_L10:;
     }
-    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 = 544; __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 = 544; __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;
+    __pyx_L7:;
 
-    /* "utils.pyx":543
- * 
- *     def close(self):
- *         for dset in self._cdf:             # <<<<<<<<<<<<<<
- *             dset.close()
- * 
+    /* "netCDF4/_netCDF4.pyx":1511
+ *             # 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 = 1511; __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 = 1511; __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 = 1511; __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 = 1511; __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;
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "utils.pyx":542
- *         return self._cdf[0].__dict__.keys()
- * 
- *     def close(self):             # <<<<<<<<<<<<<<
- *         for dset in self._cdf:
- *             dset.close()
+  /* "netCDF4/_netCDF4.pyx":1512
+ *             # 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, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
 
-  /* 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":546
- *             dset.close()
- * 
- *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         ncdump = ['%r\n' % type(self)]
- *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
+    /* "netCDF4/_netCDF4.pyx":1513
+ *             _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 = 1513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
 
-/* 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;
-}
+      /* "netCDF4/_netCDF4.pyx":1514
+ *         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 = 1514; __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 = 1514; __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 = 1514; __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 = 1514; __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*/ {
 
-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":547
- * 
- *     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 = 547; __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 = 547; __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":548
- *     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 = ()
+      /* "netCDF4/_netCDF4.pyx":1516
+ *                 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_t_2 = PyList_New(0); 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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 548; __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 = 548; __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 = 548; __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 = 548; __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 = 548; __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 = 548; __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 = 548; __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 = 548; __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 = 548; __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 = 548; __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 = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
-      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_v_ierr = nc_open(__pyx_v_path, NC_NOWRITE, (&__pyx_v_grpid));
     }
-    __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 = 548; __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 = 548; __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 = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_L12:;
+    goto __pyx_L6;
   }
-  __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 = 548; __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":549
- *         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 == '/':
+  /* "netCDF4/_netCDF4.pyx":1517
+ *             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_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 549; __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 = 549; __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 = 549; __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 = 549; __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 = 549; __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;
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_kp_s_r_2, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_2) {
   } 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 = 549; __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 = 549; __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 = 549; __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 = 549; __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 = 549; __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 = 549; __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 = 549; __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 = 549; __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 = 549; __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 = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_1 = __pyx_t_2;
+    goto __pyx_L13_bool_binop_done;
   }
-  __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 = 549; __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":550
- *         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;
+  __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 = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_t_2;
+  __pyx_L13_bool_binop_done:;
+  if (__pyx_t_1) {
 
-  /* "utils.pyx":551
- *         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]))
+    /* "netCDF4/_netCDF4.pyx":1518
+ *                 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_GetAttrStr(__pyx_v_self, __pyx_n_s_path_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_7) {
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
 
-    /* "utils.pyx":553
- *         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)
+      /* "netCDF4/_netCDF4.pyx":1519
+ *         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_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 = 553; __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 = 553; __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 = 553; __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 = 553; __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 = 553; __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;
+      __pyx_t_6 = __Pyx_PyInt_From_int(NC_WRITE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; __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 = 1519; __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 = 1519; __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 = 1519; __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*/ {
 
-    /* "utils.pyx":552
- *         grpnames = ()
- *         if self.path == '/':
- *             ncdump.append('root group (%s data model, file format %s):\n' %             # <<<<<<<<<<<<<<
- *                     (self.data_model[0], self.disk_format[0]))
- *         else:
+      /* "netCDF4/_netCDF4.pyx":1521
+ *                 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_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 = 552; __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 = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    goto __pyx_L7;
+      __pyx_v_ierr = nc_open(__pyx_v_path, NC_WRITE, (&__pyx_v_grpid));
+    }
+    __pyx_L15:;
+    goto __pyx_L6;
   }
-  /*else*/ {
 
-    /* "utils.pyx":555
- *                     (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()]
+  /* "netCDF4/_netCDF4.pyx":1522
+ *             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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __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 = 555; __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 = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __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 = 1522; __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_L7:;
+  __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 = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_t_2;
+  __pyx_L16_bool_binop_done:;
+  if (__pyx_t_1) {
 
-  /* "utils.pyx":556
- *         else:
- *             ncdump.append('group %s:\n' % self.path)
- *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\             # <<<<<<<<<<<<<<
- *                 self.ncattrs()]
- *         ncdump = ncdump + attrs
+    /* "netCDF4/_netCDF4.pyx":1523
+ *                 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 = PyList_New(0); 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_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
 
-  /* "utils.pyx":557
- *             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))
+      /* "netCDF4/_netCDF4.pyx":1524
+ *         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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 557; __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 = 557; __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 = 557; __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 = 557; __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 = 557; __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 = 557; __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 = 557; __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 = 557; __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 = 557; __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 = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
+      __pyx_t_3 = __Pyx_PyInt_From_int(NC_SHARE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __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 = 1524; __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 = 1524; __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 = 1524; __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;
     }
-    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
-    __pyx_t_3 = 0;
+    /*else*/ {
 
-    /* "utils.pyx":556
- *         else:
- *             ncdump.append('group %s:\n' % self.path)
- *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\             # <<<<<<<<<<<<<<
- *                 self.ncattrs()]
- *         ncdump = ncdump + attrs
+      /* "netCDF4/_netCDF4.pyx":1526
+ *                 ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid)
+ *             else:
+ *                 ierr = nc_open(path, NC_SHARE, &grpid)             # <<<<<<<<<<<<<<
+ *         elif mode == 'ws':
+ *             if clobber:
  */
-    __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 = 556; __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 = 556; __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 = 556; __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 = 556; __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 = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_v_ierr = nc_open(__pyx_v_path, NC_SHARE, (&__pyx_v_grpid));
+    }
+    __pyx_L18:;
+    goto __pyx_L6;
   }
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __pyx_v_attrs = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
 
-  /* "utils.pyx":558
- *         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))
+  /* "netCDF4/_netCDF4.pyx":1527
+ *             else:
+ *                 ierr = nc_open(path, NC_SHARE, &grpid)
+ *         elif mode == 'ws':             # <<<<<<<<<<<<<<
+ *             if clobber:
+ *                 if diskless:
  */
-  __pyx_t_1 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); 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_DECREF_SET(__pyx_v_ncdump, ((PyObject*)__pyx_t_1));
-  __pyx_t_1 = 0;
+  __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 = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
 
-  /* "utils.pyx":559
- *                 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))
+    /* "netCDF4/_netCDF4.pyx":1528
+ *                 ierr = nc_open(path, NC_SHARE, &grpid)
+ *         elif mode == 'ws':
+ *             if clobber:             # <<<<<<<<<<<<<<
+ *                 if diskless:
+ *                     if persist:
  */
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 559; __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 = 559; __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 = 559; __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 = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_clobber); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
 
-  /* "utils.pyx":560
- *         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)
+      /* "netCDF4/_netCDF4.pyx":1529
+ *         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 = PyTuple_New(1); 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_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 = 560; __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 = 560; __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 = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_1) {
 
-  /* "utils.pyx":561
- *         ncdump.append('    dimensions = %s\n' % str(dimnames))
- *         ncdump.append('    variables = %s\n' % str(varnames))
- *         ncdump.append('    groups = %s\n' % str(grpnames))             # <<<<<<<<<<<<<<
- *         return ''.join(ncdump)
- * 
+        /* "netCDF4/_netCDF4.pyx":1530
+ *             if clobber:
+ *                 if diskless:
+ *                     if persist:             # <<<<<<<<<<<<<<
+ *                         ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)
+ *                     else:
  */
-  __pyx_t_1 = PyTuple_New(1); 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);
-  __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 = 561; __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 = 561; __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 = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_1) {
 
-  /* "utils.pyx":562
- *         ncdump.append('    variables = %s\n' % str(varnames))
- *         ncdump.append('    groups = %s\n' % str(grpnames))
- *         return ''.join(ncdump)             # <<<<<<<<<<<<<<
- * 
- * class _Dimension(object):
+          /* "netCDF4/_netCDF4.pyx":1531
+ *                 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_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__15, __pyx_v_ncdump); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
+          __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 = 1531; __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 = 1531; __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 = 1531; __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 = 1531; __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*/ {
 
-  /* "utils.pyx":546
- *             dset.close()
- * 
- *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         ncdump = ['%r\n' % type(self)]
- *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
+          /* "netCDF4/_netCDF4.pyx":1533
+ *                         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)
  */
-
-  /* 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_t_3 = __Pyx_PyInt_From_int((NC_SHARE | NC_CLOBBER)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __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 = 1533; __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 = 1533; __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 = 1533; __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/_netCDF4.pyx":1535
+ *                         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/_netCDF4.pyx":1537
+ *                     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 = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_1) {
+
+        /* "netCDF4/_netCDF4.pyx":1538
+ *             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 = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_1) {
+
+          /* "netCDF4/_netCDF4.pyx":1539
+ *                 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 = 1539; __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 = 1539; __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 = 1539; __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 = 1539; __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/_netCDF4.pyx":1541
+ *                         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 = 1541; __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 = 1541; __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 = 1541; __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 = 1541; __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/_netCDF4.pyx":1543
+ *                         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/_netCDF4.pyx":1545
+ *                     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 = 1545; __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 = 1545; __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 = 1545; __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 = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_L6:;
+
+  /* "netCDF4/_netCDF4.pyx":1546
+ *         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/_netCDF4.pyx":1547
+ *             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 = 1547; __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 = 1547; __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 = 1547; __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 = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4/_netCDF4.pyx":1549
+ *             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_8_netCDF4__get_format(__pyx_v_grpid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; __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/_netCDF4.pyx":1552
+ *         # 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/_netCDF4.pyx":1553
+ *         # 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_8_netCDF4__get_full_format(__pyx_v_grpid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1553; __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/_netCDF4.pyx":1558
+ *         #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/_netCDF4.pyx":1559
+ *         #    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/_netCDF4.pyx":1560
+ *         self._grpid = grpid
+ *         self._isopen = 1
+ *         self.path = '/'             # <<<<<<<<<<<<<<
+ *         self.parent = None
+ *         self.keepweakref = keepweakref
+ */
+  __Pyx_INCREF(__pyx_kp_s__14);
+  __Pyx_GIVEREF(__pyx_kp_s__14);
+  __Pyx_GOTREF(__pyx_v_self->path);
+  __Pyx_DECREF(__pyx_v_self->path);
+  __pyx_v_self->path = __pyx_kp_s__14;
+
+  /* "netCDF4/_netCDF4.pyx":1561
+ *         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/_netCDF4.pyx":1562
+ *         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/_netCDF4.pyx":1564
+ *         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_8_netCDF4__get_types(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __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 = 1564; __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 = 1564; __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 = 1564; __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 = 1564; __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 = 1564; __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 = 1564; __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/_netCDF4.pyx":1566
+ *         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_8_netCDF4__get_dims(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; __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/_netCDF4.pyx":1568
+ *         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_8_netCDF4__get_vars(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __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/_netCDF4.pyx":1570
+ *         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 = 1570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4/_netCDF4.pyx":1571
+ *         # 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_8_netCDF4__get_grps(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; __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/_netCDF4.pyx":1573
+ *             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 = 1573; __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 = 1573; __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 = 1573; __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/_netCDF4.pyx":1477
+ *     __orthogonal_indexing__
+ * 
+ *     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._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/_netCDF4.pyx":1576
+ * 
+ *     # 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_8_netCDF4_7Dataset_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_2__enter__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_2__enter__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__enter__", 0);
+
+  /* "netCDF4/_netCDF4.pyx":1577
+ *     # 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/_netCDF4.pyx":1576
+ * 
+ *     # 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_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":565
+/* "netCDF4/_netCDF4.pyx":1578
+ *     def __enter__(self):
+ *         return self
+ *     def __exit__(self,atype,value,traceback):             # <<<<<<<<<<<<<<
+ *         self.close()
  * 
- * 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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("__init__ (wrapper)", 0);
+  __Pyx_RefNannySetupContext("__exit__ (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};
+    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  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);
@@ -10686,110 +9929,104 @@ static PyObject *__pyx_pw_7netCDF4_10_Dimension_1__init__(PyObject *__pyx_self,
       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--;
+        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_dimname)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __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 = 565; __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 = 565; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
-        case  4:
-        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimtotlen)) != 0)) kw_args--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __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 = 565; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+    } 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);
-      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];
+    __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("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("netCDF4._Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.__exit__", __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);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_4__exit__(((struct __pyx_obj_7netCDF4_8_netCDF4_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_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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_4__exit__(struct __pyx_obj_7netCDF4_8_netCDF4_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("__init__", 0);
+  __Pyx_RefNannySetupContext("__exit__", 0);
 
-  /* "utils.pyx":566
- * class _Dimension(object):
- *     def __init__(self, dimname, dim, dimlens, dimtotlen):
- *         self.dimlens = dimlens             # <<<<<<<<<<<<<<
- *         self.dimtotlen = dimtotlen
- *         self._name = dimname
+  /* "netCDF4/_netCDF4.pyx":1579
+ *         return self
+ *     def __exit__(self,atype,value,traceback):
+ *         self.close()             # <<<<<<<<<<<<<<
+ * 
+ *     def __getitem__(self, elem):
  */
-  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimlens, __pyx_v_dimlens) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "utils.pyx":567
- *     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 = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "utils.pyx":568
- *         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 = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 1579; __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 = 1579; __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 = 1579; __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;
 
-  /* "utils.pyx":565
+  /* "netCDF4/_netCDF4.pyx":1578
+ *     def __enter__(self):
+ *         return self
+ *     def __exit__(self,atype,value,traceback):             # <<<<<<<<<<<<<<
+ *         self.close()
  * 
- * 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_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -10797,277 +10034,642 @@ static PyObject *__pyx_pf_7netCDF4_10_Dimension___init__(CYTHON_UNUSED PyObject
   return __pyx_r;
 }
 
-/* "utils.pyx":569
- *         self.dimtotlen = dimtotlen
- *         self._name = dimname
- *     def __len__(self):             # <<<<<<<<<<<<<<
- *         return self.dimtotlen
- *     def isunlimited(self):
+/* "netCDF4/_netCDF4.pyx":1581
+ *         self.close()
+ * 
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         # return variable or group defined in relative path.
+ *         # split out group names in unix path.
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_elem); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_elem) {
   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));
+  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_elem));
 
   /* 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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6__getitem__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_elem) {
+  PyObject *__pyx_v_dirname = NULL;
+  PyObject *__pyx_v_lastname = NULL;
+  PyObject *__pyx_v_nestedgroups = NULL;
+  PyObject *__pyx_v_group = NULL;
+  PyObject *__pyx_v_g = 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)(PyObject *);
+  Py_ssize_t __pyx_t_6;
+  PyObject *(*__pyx_t_7)(PyObject *);
+  int __pyx_t_8;
+  int __pyx_t_9;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__len__", 0);
+  __Pyx_RefNannySetupContext("__getitem__", 0);
+  __Pyx_INCREF(__pyx_v_elem);
 
-  /* "utils.pyx":570
- *         self._name = dimname
- *     def __len__(self):
- *         return self.dimtotlen             # <<<<<<<<<<<<<<
- *     def isunlimited(self):
- *         return True
+  /* "netCDF4/_netCDF4.pyx":1584
+ *         # return variable or group defined in relative path.
+ *         # split out group names in unix path.
+ *         elem = posixpath.normpath(elem)             # <<<<<<<<<<<<<<
+ *         # last name in path, could be a variable or group
+ *         dirname, lastname = posixpath.split(elem)
  */
-  __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 = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = __pyx_t_1;
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_normpath); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; __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_elem); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; __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 = 1584; __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_elem);
+    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_elem);
+    __Pyx_GIVEREF(__pyx_v_elem);
+    __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 = 1584; __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_DECREF_SET(__pyx_v_elem, __pyx_t_1);
   __pyx_t_1 = 0;
-  goto __pyx_L0;
 
-  /* "utils.pyx":569
- *         self.dimtotlen = dimtotlen
- *         self._name = dimname
- *     def __len__(self):             # <<<<<<<<<<<<<<
- *         return self.dimtotlen
- *     def isunlimited(self):
+  /* "netCDF4/_netCDF4.pyx":1586
+ *         elem = posixpath.normpath(elem)
+ *         # last name in path, could be a variable or group
+ *         dirname, lastname = posixpath.split(elem)             # <<<<<<<<<<<<<<
+ *         nestedgroups = dirname.split('/')
+ *         group = self
+ */
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __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[0]; __pyx_lineno = 1586; __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_elem); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __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 = 1586; __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_elem);
+    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_elem);
+    __Pyx_GIVEREF(__pyx_v_elem);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __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_4); __pyx_t_4 = 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 != 2)) {
+      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __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_2 = PyTuple_GET_ITEM(sequence, 1); 
+    } else {
+      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
+      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
+    }
+    __Pyx_INCREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_2);
+    #else
+    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    #endif
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  } else {
+    Py_ssize_t index = -1;
+    __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
+    index = 0; __pyx_t_4 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_4);
+    index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_2);
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = NULL;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L4_unpacking_done;
+    __pyx_L3_unpacking_failed:;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_5 = NULL;
+    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L4_unpacking_done:;
+  }
+  __pyx_v_dirname = __pyx_t_4;
+  __pyx_t_4 = 0;
+  __pyx_v_lastname = __pyx_t_2;
+  __pyx_t_2 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":1587
+ *         # last name in path, could be a variable or group
+ *         dirname, lastname = posixpath.split(elem)
+ *         nestedgroups = dirname.split('/')             # <<<<<<<<<<<<<<
+ *         group = self
+ *         # iterate over groups in path.
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dirname, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_nestedgroups = __pyx_t_2;
+  __pyx_t_2 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":1588
+ *         dirname, lastname = posixpath.split(elem)
+ *         nestedgroups = dirname.split('/')
+ *         group = self             # <<<<<<<<<<<<<<
+ *         # iterate over groups in path.
+ *         for g in nestedgroups:
+ */
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_v_group = ((PyObject *)__pyx_v_self);
+
+  /* "netCDF4/_netCDF4.pyx":1590
+ *         group = self
+ *         # iterate over groups in path.
+ *         for g in nestedgroups:             # <<<<<<<<<<<<<<
+ *             if g: group = group.groups[g]
+ *         # return last one, either a group or a variable.
+ */
+  if (likely(PyList_CheckExact(__pyx_v_nestedgroups)) || PyTuple_CheckExact(__pyx_v_nestedgroups)) {
+    __pyx_t_2 = __pyx_v_nestedgroups; __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_nestedgroups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1590; __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 = 1590; __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_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 = 1590; __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 = 1590; __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 = 1590; __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 = 1590; __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 = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":1591
+ *         # iterate over groups in path.
+ *         for g in nestedgroups:
+ *             if g: group = group.groups[g]             # <<<<<<<<<<<<<<
+ *         # return last one, either a group or a variable.
+ *         if lastname in group.groups:
+ */
+    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_g); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_8) {
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_g); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __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_group, __pyx_t_4);
+      __pyx_t_4 = 0;
+      goto __pyx_L7;
+    }
+    __pyx_L7:;
+
+    /* "netCDF4/_netCDF4.pyx":1590
+ *         group = self
+ *         # iterate over groups in path.
+ *         for g in nestedgroups:             # <<<<<<<<<<<<<<
+ *             if g: group = group.groups[g]
+ *         # return last one, either a group or a variable.
+ */
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":1593
+ *             if g: group = group.groups[g]
+ *         # return last one, either a group or a variable.
+ *         if lastname in group.groups:             # <<<<<<<<<<<<<<
+ *             return group.groups[lastname]
+ *         elif lastname in group.variables:
+ */
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_8 = (__Pyx_PySequence_Contains(__pyx_v_lastname, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_9 = (__pyx_t_8 != 0);
+  if (__pyx_t_9) {
+
+    /* "netCDF4/_netCDF4.pyx":1594
+ *         # return last one, either a group or a variable.
+ *         if lastname in group.groups:
+ *             return group.groups[lastname]             # <<<<<<<<<<<<<<
+ *         elif lastname in group.variables:
+ *             return group.variables[lastname]
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = PyObject_GetItem(__pyx_t_2, __pyx_v_lastname); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4/_netCDF4.pyx":1595
+ *         if lastname in group.groups:
+ *             return group.groups[lastname]
+ *         elif lastname in group.variables:             # <<<<<<<<<<<<<<
+ *             return group.variables[lastname]
+ *         else:
+ */
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_v_lastname, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_8 = (__pyx_t_9 != 0);
+  if (__pyx_t_8) {
+
+    /* "netCDF4/_netCDF4.pyx":1596
+ *             return group.groups[lastname]
+ *         elif lastname in group.variables:
+ *             return group.variables[lastname]             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise IndexError('%s not found in %s' % (lastname,group.path))
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_2 = PyObject_GetItem(__pyx_t_4, __pyx_v_lastname); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_r = __pyx_t_2;
+    __pyx_t_2 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
+
+    /* "netCDF4/_netCDF4.pyx":1598
+ *             return group.variables[lastname]
+ *         else:
+ *             raise IndexError('%s not found in %s' % (lastname,group.path))             # <<<<<<<<<<<<<<
+ * 
+ *     def filepath(self):
+ */
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_v_lastname);
+    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lastname);
+    __Pyx_GIVEREF(__pyx_v_lastname);
+    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_not_found_in_s, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __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 = 1598; __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 = 0;
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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 = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4/_netCDF4.pyx":1581
+ *         self.close()
+ * 
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         # return variable or group defined in relative path.
+ *         # split out group names in unix path.
  */
 
   /* function exit code */
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("netCDF4._Dimension.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_dirname);
+  __Pyx_XDECREF(__pyx_v_lastname);
+  __Pyx_XDECREF(__pyx_v_nestedgroups);
+  __Pyx_XDECREF(__pyx_v_group);
+  __Pyx_XDECREF(__pyx_v_g);
+  __Pyx_XDECREF(__pyx_v_elem);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "utils.pyx":571
- *     def __len__(self):
- *         return self.dimtotlen
- *     def isunlimited(self):             # <<<<<<<<<<<<<<
- *         return True
- *     def __repr__(self):
+/* "netCDF4/_netCDF4.pyx":1600
+ *             raise IndexError('%s not found in %s' % (lastname,group.path))
+ * 
+ *     def filepath(self):             # <<<<<<<<<<<<<<
+ *         """
+ * filepath(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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_9filepath(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_8filepath[] = "\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_8_netCDF4_7Dataset_9filepath(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
   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));
+  __Pyx_RefNannySetupContext("filepath (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_8filepath(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_8filepath(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_v_msg = NULL;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("isunlimited", 0);
+  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);
 
-  /* "utils.pyx":572
- *         return self.dimtotlen
- *     def isunlimited(self):
- *         return True             # <<<<<<<<<<<<<<
- *     def __repr__(self):
- *         if self.isunlimited():
+  /* "netCDF4/_netCDF4.pyx":1614
+ *             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_XDECREF(__pyx_r);
-  __Pyx_INCREF(Py_True);
-  __pyx_r = Py_True;
-  goto __pyx_L0;
+  __Pyx_INCREF(__pyx_kp_s_filepath_method_not_enabled_To);
+  __pyx_v_msg = __pyx_kp_s_filepath_method_not_enabled_To;
 
-  /* "utils.pyx":571
- *     def __len__(self):
- *         return self.dimtotlen
- *     def isunlimited(self):             # <<<<<<<<<<<<<<
- *         return True
+  /* "netCDF4/_netCDF4.pyx":1617
+ * 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 = 1617; __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 = 1617; __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 = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4/_netCDF4.pyx":1600
+ *             raise IndexError('%s not found in %s' % (lastname,group.path))
+ * 
+ *     def filepath(self):             # <<<<<<<<<<<<<<
+ *         """
+ * filepath(self)
+ */
 
   /* function exit code */
-  __pyx_L0:;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4._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;
 }
 
-/* "utils.pyx":573
- *     def isunlimited(self):
- *         return True
+/* "netCDF4/_netCDF4.pyx":1619
+ *             raise ValueError(msg)
+ * 
  *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         if self.isunlimited():
- *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+ *         if python3:
+ *             return self.__unicode__()
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_11__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_11__repr__(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));
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  Py_ssize_t __pyx_t_5;
+  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);
 
-  /* "utils.pyx":574
- *         return True
+  /* "netCDF4/_netCDF4.pyx":1620
+ * 
  *     def __repr__(self):
- *         if self.isunlimited():             # <<<<<<<<<<<<<<
- *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+ *         if python3:             # <<<<<<<<<<<<<<
+ *             return self.__unicode__()
  *         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 = 574; __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 = 574; __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 = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __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 = 574; __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 = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_4) {
+  if (__pyx_t_2) {
 
-    /* "utils.pyx":575
+    /* "netCDF4/_netCDF4.pyx":1621
  *     def __repr__(self):
- *         if self.isunlimited():
- *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))             # <<<<<<<<<<<<<<
+ *         if python3:
+ *             return self.__unicode__()             # <<<<<<<<<<<<<<
  *         else:
- *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
+ *             return unicode(self).encode(default_encoding)
  */
     __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 = 575; __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 = 575; __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 = 575; __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 = 575; __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 = 575; __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 = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 1621; __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 = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __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 = 1621; __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 = 1621; __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_6;
-    __pyx_t_6 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
     goto __pyx_L0;
   }
   /*else*/ {
 
-    /* "utils.pyx":577
- *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+    /* "netCDF4/_netCDF4.pyx":1623
+ *             return self.__unicode__()
  *         else:
- *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))             # <<<<<<<<<<<<<<
+ *             return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
  * 
- * class _Variable(object):
+ *     def __unicode__(self):
  */
     __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 = 577; __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 = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyTuple_New(1); 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_5 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 577; __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 = 577; __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 = 577; __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_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 = 1623; __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 = 1623; __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 = 1623; __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 = 1623; __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 = 1623; __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 = 1623; __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;
-    __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 = 577; __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 = 577; __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":573
- *     def isunlimited(self):
- *         return True
+  /* "netCDF4/_netCDF4.pyx":1619
+ *             raise ValueError(msg)
+ * 
  *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         if self.isunlimited():
- *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
+ *         if python3:
+ *             return self.__unicode__()
  */
 
   /* 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_AddTraceback("netCDF4._Dimension.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -11075,1327 +10677,884 @@ static PyObject *__pyx_pf_7netCDF4_10_Dimension_6__repr__(CYTHON_UNUSED PyObject
   return __pyx_r;
 }
 
-/* "utils.pyx":580
+/* "netCDF4/_netCDF4.pyx":1625
+ *             return unicode(self).encode(default_encoding)
  * 
- * class _Variable(object):
- *     def __init__(self, dset, varname, var, recdimname):             # <<<<<<<<<<<<<<
- *         self.dimensions = var.dimensions
- *         self._dset = dset
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_13__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_13__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
   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 = 580; __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 = 580; __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 = 580; __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 = 580; __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 = 580; __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 = 580; __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);
+  __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
   /* 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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_12__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_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_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_4 = NULL;
+  Py_ssize_t __pyx_t_5;
+  PyObject *(*__pyx_t_6)(PyObject *);
   PyObject *__pyx_t_7 = NULL;
-  PyObject *(*__pyx_t_8)(PyObject *);
+  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("__init__", 0);
-
-  /* "utils.pyx":581
- * 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 = 581; __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 = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-  /* "utils.pyx":582
- *     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 = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "utils.pyx":583
- *         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 = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "utils.pyx":584
- *         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 = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_RefNannySetupContext("__unicode__", 0);
 
-  /* "utils.pyx":585
- *         self._grp = dset
- *         self._mastervar = var
- *         self._recVar = dset._cdfRecVar[varname]             # <<<<<<<<<<<<<<
- *         self._recdimname = recdimname
- *         self._recLen = dset._cdfVLen
+  /* "netCDF4/_netCDF4.pyx":1626
+ * 
+ *     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_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_cdfRecVar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r_3, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; __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 = 585; __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 = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "utils.pyx":586
- *         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 = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "utils.pyx":587
- *         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 = 587; __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 = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "utils.pyx":588
- *         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 = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; __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 = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  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":589
- *         self._recLen = dset._cdfVLen
- *         self.dtype = var.dtype
- *         self._name = var._name             # <<<<<<<<<<<<<<
- *         # copy attributes from master.
- *         for name, value in var.__dict__.items():
+  /* "netCDF4/_netCDF4.pyx":1627
+ *     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 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; __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 = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "utils.pyx":591
- *         self._name = var._name
- *         # copy attributes from master.
- *         for name, value in var.__dict__.items():             # <<<<<<<<<<<<<<
- *             self.__dict__[name] = value
- *     def typecode(self):
+  /* "netCDF4/_netCDF4.pyx":1628
+ *         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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 1628; __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;
+  __pyx_t_4 = 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)) {
+    __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_1);
+      __Pyx_INCREF(__pyx_t_4);
       __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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  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 = 1628; __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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_GOTREF(__pyx_t_1);
   __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;
+  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_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   for (;;) {
-    if (likely(!__pyx_t_5)) {
+    if (likely(!__pyx_t_6)) {
       if (likely(PyList_CheckExact(__pyx_t_3))) {
-        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+        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_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1628; __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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+        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_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1628; __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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       }
     } else {
-      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
-      if (unlikely(!__pyx_t_2)) {
+      __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[1]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(__pyx_t_1);
     }
-    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 = 591; __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_XDECREF_SET(__pyx_v_dimname, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":1627
+ *     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 = 1627; __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);
       }
-      __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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    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 = 1627; __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 = 591; __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 = 591; __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_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; __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 = 1627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __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 = 591; __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 = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_L6_unpacking_done:;
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
     }
-    __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":592
- *         # 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 = 592; __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 = 592; __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_t_4 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_dimname); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; __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 = 1627; __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 = 1627; __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 = 1627; __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 = 1627; __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 = 1627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-    /* "utils.pyx":591
- *         self._name = var._name
- *         # copy attributes from master.
- *         for name, value in var.__dict__.items():             # <<<<<<<<<<<<<<
- *             self.__dict__[name] = value
- *     def typecode(self):
+    /* "netCDF4/_netCDF4.pyx":1628
+ *         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;
 
-  /* "utils.pyx":580
- * 
- * 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":593
- *         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":594
- *             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 = 594; __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":593
- *         for name, value in var.__dict__.items():
- *             self.__dict__[name] = value
- *     def typecode(self):             # <<<<<<<<<<<<<<
- *         return self.dtype
- *     def ncattrs(self):
+  /* "netCDF4/_netCDF4.pyx":1627
+ *     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 = 1627; __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;
 
-  /* 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":595
- *     def typecode(self):
- *         return self.dtype
- *     def ncattrs(self):             # <<<<<<<<<<<<<<
- *         return self._mastervar.__dict__.keys()
- *     def __getattr__(self,name):
+  /* "netCDF4/_netCDF4.pyx":1630
+ *         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 = 1630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
 
-/* 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":596
- *         return self.dtype
- *     def ncattrs(self):
- *         return self._mastervar.__dict__.keys()             # <<<<<<<<<<<<<<
- *     def __getattr__(self,name):
- *         if name == 'shape': return self._shape()
+  /* "netCDF4/_netCDF4.pyx":1635
+ *         .replace("'",""))\
+ *         .replace(", ",","))\
+ *         .replace(",)",")") for varname in self.variables.keys()])             # <<<<<<<<<<<<<<
+ *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
+ *         if self.path == '/':
  */
-  __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 = 596; __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 = 596; __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 = 596; __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_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 = 1635; __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_2, function);
+      __Pyx_DECREF_SET(__pyx_t_4, 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 = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  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 = 1635; __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[1]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __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 = 1635; __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 = 1635; __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;
+  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 = 1635; __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 = 1635; __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 = 1635; __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 = 1635; __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 = 1635; __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;
 
-  /* "utils.pyx":595
- *     def typecode(self):
- *         return self.dtype
- *     def ncattrs(self):             # <<<<<<<<<<<<<<
- *         return self._mastervar.__dict__.keys()
- *     def __getattr__(self,name):
+    /* "netCDF4/_netCDF4.pyx":1630
+ *         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'",""))\
  */
-
-  /* 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":597
- *     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 = 597; __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 = 597; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; __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 = 1630; __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 = 1630; __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);
       }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-      goto __pyx_L5_argtuple_error;
+    }
+    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 = 1630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_GOTREF(__pyx_t_2);
     } else {
-      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+      __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; __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 = 1630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
     }
-    __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 = 597; __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":598
- *         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 = 598; __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 = 598; __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_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 = 1630; __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 = 1630; __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_3, function);
+        __Pyx_DECREF_SET(__pyx_t_10, 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 = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    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 = 1630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
     } else {
-      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; __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 = 1630; __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 = 1630; __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 = 1630; __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;
-  }
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
-  /* "utils.pyx":599
- *     def __getattr__(self,name):
- *         if name == 'shape': return self._shape()
- *         if name == 'ndim': return len(self._shape())             # <<<<<<<<<<<<<<
- *         try:
- *             return self.__dict__[name]
+    /* "netCDF4/_netCDF4.pyx":1631
+ *         varnames = tuple(\
+ *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
+ *         (((_tostr(self.variables[varname].dimensions)             # <<<<<<<<<<<<<<
+ *         .replace("u'",""))\
+ *         .replace("'",""))\
  */
-  __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 = 599; __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 = 599; __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_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __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 = 1631; __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 = 1631; __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_3, function);
+        __Pyx_DECREF_SET(__pyx_t_8, 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 = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    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 = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_GOTREF(__pyx_t_10);
     } else {
-      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 599; __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 = 599; __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 = 599; __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":600
- *         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":601
- *         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 = 601; __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 = 601; __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_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; __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 = 1631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_10);
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
     }
-    __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;
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-    /* "utils.pyx":602
- *         try:
- *             return self.__dict__[name]
- *         except:             # <<<<<<<<<<<<<<
- *             raise AttributeError(name)
- *     def __repr__(self):
+    /* "netCDF4/_netCDF4.pyx":1632
+ *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
+ *         (((_tostr(self.variables[varname].dimensions)
+ *         .replace("u'",""))\             # <<<<<<<<<<<<<<
+ *         .replace("'",""))\
+ *         .replace(", ",","))\
  */
-    /*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 = 602; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_GOTREF(__pyx_t_4);
+    __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 = 1632; __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__16, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-      /* "utils.pyx":603
- *             return self.__dict__[name]
- *         except:
- *             raise AttributeError(name)             # <<<<<<<<<<<<<<
- *     def __repr__(self):
- *         ncdump_var = ['%r\n' % type(self)]
+    /* "netCDF4/_netCDF4.pyx":1633
+ *         (((_tostr(self.variables[varname].dimensions)
+ *         .replace("u'",""))\
+ *         .replace("'",""))\             # <<<<<<<<<<<<<<
+ *         .replace(", ",","))\
+ *         .replace(",)",")") for varname in self.variables.keys()])
  */
-      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 603; __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 = 603; __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 = 603; __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;
-  }
+    __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 = 1633; __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__18, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-  /* "utils.pyx":597
- *     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())
+    /* "netCDF4/_netCDF4.pyx":1634
+ *         .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 = 1634; __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__21, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-  /* 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":604
- *         except:
- *             raise AttributeError(name)
- *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         ncdump_var = ['%r\n' % type(self)]
- *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
+    /* "netCDF4/_netCDF4.pyx":1635
+ *         .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 = 1635; __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__24, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-/* 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":605
- *             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\
+    /* "netCDF4/_netCDF4.pyx":1630
+ *         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_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 = 605; __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 = 605; __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;
+    __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; __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 = 1630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-  /* "utils.pyx":606
- *     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()]
+    /* "netCDF4/_netCDF4.pyx":1635
+ *         .replace("'",""))\
+ *         .replace(", ",","))\
+ *         .replace(",)",")") for varname in self.variables.keys()])             # <<<<<<<<<<<<<<
+ *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
+ *         if self.path == '/':
  */
-  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 606; __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 = 606; __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 = 606; __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 = 606; __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 = 606; __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 = 606; __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 = 606; __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 = 606; __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 = 606; __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 = 606; __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 = 606; __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 = 606; __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 = 606; __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;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "utils.pyx":607
- *         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' %\
+  /* "netCDF4/_netCDF4.pyx":1629
+ *         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_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __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;
 
-  /* "utils.pyx":608
- *         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))
+  /* "netCDF4/_netCDF4.pyx":1636
+ *         .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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __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_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __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 = 1636; __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_6, function);
+      __Pyx_DECREF_SET(__pyx_t_8, 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 = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  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 = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   } else {
-    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __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;
+  __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_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __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 = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __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 = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __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 (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_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 = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1636; __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 = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_8)) 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 = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1636; __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 = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       }
     } else {
-      __pyx_t_2 = __pyx_t_5(__pyx_t_6);
-      if (unlikely(!__pyx_t_2)) {
+      __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[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(__pyx_t_3);
     }
-    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
-    __pyx_t_2 = 0;
+    __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 = 1636; __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 = 1636; __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 = 1636; __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 = 1636; __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 = 1636; __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 = 1636; __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;
 
-    /* "utils.pyx":607
- *         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' %\
+  /* "netCDF4/_netCDF4.pyx":1637
+ *         .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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 607; __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 = 607; __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 = 607; __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 = 607; __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 = 607; __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;
+  __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_self->path, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_12) {
 
-  /* "utils.pyx":610
- *                 self.ncattrs()]
- *         ncdump_var.append('%s %s%s\n' %\
- *         (self.dtype,self._name,dimnames))             # <<<<<<<<<<<<<<
- *         ncdump_var = ncdump_var + attrs
- *         unlimdims = []
+    /* "netCDF4/_netCDF4.pyx":1639
+ *         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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 610; __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 = 610; __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 = 610; __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;
+    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __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);
 
-  /* "utils.pyx":609
- *         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
+    /* "netCDF4/_netCDF4.pyx":1638
+ *         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_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 = 609; __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 = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __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 = 1638; __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 = 1638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    goto __pyx_L9;
+  }
+  /*else*/ {
 
-  /* "utils.pyx":611
- *         ncdump_var.append('%s %s%s\n' %\
- *         (self.dtype,self._name,dimnames))
- *         ncdump_var = ncdump_var + attrs             # <<<<<<<<<<<<<<
- *         unlimdims = []
- *         for dimname in self.dimensions:
+    /* "netCDF4/_netCDF4.pyx":1641
+ *                     (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_6 = PyNumber_Add(__pyx_v_ncdump_var, __pyx_v_attrs); 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_SET(__pyx_v_ncdump_var, ((PyObject*)__pyx_t_6));
-  __pyx_t_6 = 0;
+    __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 = 1641; __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 = 1641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  }
+  __pyx_L9:;
 
-  /* "utils.pyx":612
- *         (self.dtype,self._name,dimnames))
- *         ncdump_var = ncdump_var + attrs
- *         unlimdims = []             # <<<<<<<<<<<<<<
- *         for dimname in self.dimensions:
- *             dim = _find_dim(self._grp, dimname)
+  /* "netCDF4/_netCDF4.pyx":1642
+ *         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_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-  __pyx_v_unlimdims = ((PyObject*)__pyx_t_6);
-  __pyx_t_6 = 0;
+  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
 
-  /* "utils.pyx":613
- *         ncdump_var = ncdump_var + attrs
- *         unlimdims = []
- *         for dimname in self.dimensions:             # <<<<<<<<<<<<<<
- *             dim = _find_dim(self._grp, dimname)
- *             if dim.isunlimited():
+  /* "netCDF4/_netCDF4.pyx":1643
+ *             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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); 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);
-  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;
+  __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 = 1643; __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 = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   } 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 = 613; __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 = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __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 = 1643; __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 = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 (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_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 = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1643; __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 = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) 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 = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1643; __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 = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       }
     } else {
-      __pyx_t_6 = __pyx_t_5(__pyx_t_1);
-      if (unlikely(!__pyx_t_6)) {
+      __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[1]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
-      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_GOTREF(__pyx_t_8);
     }
-    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_6);
-    __pyx_t_6 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_8);
+    __pyx_t_8 = 0;
 
-    /* "utils.pyx":614
- *         unlimdims = []
- *         for dimname in self.dimensions:
- *             dim = _find_dim(self._grp, dimname)             # <<<<<<<<<<<<<<
- *             if dim.isunlimited():
- *                 unlimdims.append(str(dimname))
+    /* "netCDF4/_netCDF4.pyx":1642
+ *         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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 614; __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 = 614; __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 = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 1642; __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 = 614; __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":615
- *         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 = 615; __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_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_3, function);
+        __Pyx_DECREF_SET(__pyx_t_10, 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 = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    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 = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
     } else {
-      __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __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 = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_8);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     }
-    __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 = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    if (__pyx_t_11) {
+    __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 = 1642; __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 = 1642; __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 = 1642; __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;
 
-      /* "utils.pyx":616
- *             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))
+  /* "netCDF4/_netCDF4.pyx":1644
+ *         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_6 = PyTuple_New(1); 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_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 = 616; __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 = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      goto __pyx_L9;
-    }
-    __pyx_L9:;
+  __pyx_t_4 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __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;
 
-    /* "utils.pyx":613
- *         ncdump_var = ncdump_var + attrs
- *         unlimdims = []
- *         for dimname in self.dimensions:             # <<<<<<<<<<<<<<
- *             dim = _find_dim(self._grp, dimname)
- *             if dim.isunlimited():
+  /* "netCDF4/_netCDF4.pyx":1645
+ *                 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__19, __pyx_v_dimnames); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __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 = 1645; __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 = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "utils.pyx":617
- *             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)
+  /* "netCDF4/_netCDF4.pyx":1646
+ *         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_1 = PyList_AsTuple(__pyx_v_unlimdims); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 617; __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 = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__19, __pyx_v_varnames); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __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 = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __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 = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
   __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 = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "utils.pyx":618
- *                 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):
+  /* "netCDF4/_netCDF4.pyx":1647
+ *         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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape); 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_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__19, __pyx_v_grpnames); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_groups_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __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 = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __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 = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __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 = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "utils.pyx":619
- *         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]
+  /* "netCDF4/_netCDF4.pyx":1648
+ *         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_1 = __Pyx_PyString_Join(__pyx_kp_s__15, __pyx_v_ncdump_var); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_r = __pyx_t_3;
+  __pyx_t_3 = 0;
   goto __pyx_L0;
 
-  /* "utils.pyx":604
- *         except:
- *             raise AttributeError(name)
- *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         ncdump_var = ['%r\n' % type(self)]
- *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
+  /* "netCDF4/_netCDF4.pyx":1625
+ *             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 */
@@ -12403,106 +11562,130 @@ static PyObject *__pyx_pf_7netCDF4_9_Variable_8__repr__(CYTHON_UNUSED PyObject *
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_7);
   __Pyx_XDECREF(__pyx_t_8);
   __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_AddTraceback("netCDF4._Variable.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_ncdump_var);
+  __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_unlimdims);
   __Pyx_XDECREF(__pyx_v_dimname);
-  __Pyx_XDECREF(__pyx_v_dim);
+  __Pyx_XDECREF(__pyx_v_varname);
+  __Pyx_XDECREF(__pyx_v_grpname);
   __Pyx_XDECREF(__pyx_v_name);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "utils.pyx":620
- *         ncdump_var.append('current size = %s\n' % repr(self.shape))
- *         return ''.join(ncdump_var)
- *     def __len__(self):             # <<<<<<<<<<<<<<
- *         return self._shape()[0]
- *     def _shape(self):
+/* "netCDF4/_netCDF4.pyx":1650
+ *         return ''.join(ncdump)
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         """
+ * close(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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_15close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_14close[] = "\nclose(self)\n\nClose the Dataset.";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_15close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
   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));
+  __Pyx_RefNannySetupContext("close (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_14close(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+  int __pyx_v_ierr;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
+  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);
+  __Pyx_RefNannySetupContext("close", 0);
 
-  /* "utils.pyx":621
- *         return ''.join(ncdump_var)
- *     def __len__(self):
- *         return self._shape()[0]             # <<<<<<<<<<<<<<
- *     def _shape(self):
- *         recdimlen = len(self._dset.dimensions[self._recdimname])
+  /* "netCDF4/_netCDF4.pyx":1656
+ * Close the Dataset."""
+ *         cdef int ierr
+ *         ierr = nc_close(self._grpid)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-  __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 = 621; __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 = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_ierr = nc_close(__pyx_v_self->_grpid);
+
+  /* "netCDF4/_netCDF4.pyx":1657
+ *         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/_netCDF4.pyx":1658
+ *         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 = 1658; __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 = 1658; __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;
-  } else {
-    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 1658; __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 = 1658; __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 = 621; __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":620
- *         ncdump_var.append('current size = %s\n' % repr(self.shape))
- *         return ''.join(ncdump_var)
- *     def __len__(self):             # <<<<<<<<<<<<<<
- *         return self._shape()[0]
- *     def _shape(self):
+  /* "netCDF4/_netCDF4.pyx":1659
+ *         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/_netCDF4.pyx":1650
+ *         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_1);
-  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("netCDF4._Variable.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -12510,108 +11693,361 @@ static PyObject *__pyx_pf_7netCDF4_9_Variable_10__len__(CYTHON_UNUSED PyObject *
   return __pyx_r;
 }
 
-/* "utils.pyx":622
- *     def __len__(self):
- *         return self._shape()[0]
- *     def _shape(self):             # <<<<<<<<<<<<<<
- *         recdimlen = len(self._dset.dimensions[self._recdimname])
- *         return (recdimlen,) + self._mastervar.shape[1:]
+/* "netCDF4/_netCDF4.pyx":1661
+ *         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 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;
+static void __pyx_pw_7netCDF4_8_netCDF4_7Dataset_17__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_7netCDF4_8_netCDF4_7Dataset_17__dealloc__(PyObject *__pyx_v_self) {
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_shape (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_9_Variable_12_shape(__pyx_self, ((PyObject *)__pyx_v_self));
+  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+  __pyx_pf_7netCDF4_8_netCDF4_7Dataset_16__dealloc__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__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;
+static void __pyx_pf_7netCDF4_8_netCDF4_7Dataset_16__dealloc__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+  CYTHON_UNUSED int __pyx_v_ierr;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+  /* "netCDF4/_netCDF4.pyx":1664
+ *         # 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/_netCDF4.pyx":1665
+ *         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/_netCDF4.pyx":1661
+ *         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/_netCDF4.pyx":1667
+ *             ierr = nc_close(self._grpid)
+ * 
+ *     def sync(self):             # <<<<<<<<<<<<<<
+ *         """
+ * sync(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_19sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_18sync[] = "\nsync(self)\n\nWrites all buffered data in the L{Dataset} to the disk file.";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_19sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_18sync(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_18sync(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  Py_ssize_t __pyx_t_4;
+  PyObject *__pyx_t_4 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("_shape", 0);
+  __Pyx_RefNannySetupContext("sync", 0);
 
-  /* "utils.pyx":623
- *         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):
+  /* "netCDF4/_netCDF4.pyx":1673
+ * 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_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 = 623; __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 = 623; __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 = 623; __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 = 623; __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 = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_v_recdimlen = __pyx_t_4;
+  __pyx_v_ierr = nc_sync(__pyx_v_self->_grpid);
 
-  /* "utils.pyx":624
- *     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:
+  /* "netCDF4/_netCDF4.pyx":1674
+ *         cdef int ierr
+ *         ierr = nc_sync(self._grpid)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
  */
-  __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 = 624; __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 = 624; __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 = 624; __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 = 624; __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__16, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 624; __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 = 624; __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;
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
+
+    /* "netCDF4/_netCDF4.pyx":1675
+ *         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 = 1675; __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 = 1675; __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 = 1675; __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 = 1675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4/_netCDF4.pyx":1667
+ *             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._netCDF4.Dataset.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "utils.pyx":622
- *     def __len__(self):
- *         return self._shape()[0]
- *     def _shape(self):             # <<<<<<<<<<<<<<
- *         recdimlen = len(self._dset.dimensions[self._recdimname])
- *         return (recdimlen,) + self._mastervar.shape[1:]
+/* "netCDF4/_netCDF4.pyx":1677
+ *             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_8_netCDF4_7Dataset_21_redef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_21_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_8_netCDF4_7Dataset_20_redef(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_20_redef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+  CYTHON_UNUSED int __pyx_v_ierr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_redef", 0);
+
+  /* "netCDF4/_netCDF4.pyx":1679
+ *     def _redef(self):
+ *         cdef int ierr
+ *         ierr = nc_redef(self._grpid)             # <<<<<<<<<<<<<<
+ * 
+ *     def _enddef(self):
+ */
+  __pyx_v_ierr = nc_redef(__pyx_v_self->_grpid);
+
+  /* "netCDF4/_netCDF4.pyx":1677
+ *             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/_netCDF4.pyx":1681
+ *         ierr = nc_redef(self._grpid)
+ * 
+ *     def _enddef(self):             # <<<<<<<<<<<<<<
+ *         cdef int ierr
+ *         ierr = nc_enddef(self._grpid)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23_enddef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23_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_8_netCDF4_7Dataset_22_enddef(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_22_enddef(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+  CYTHON_UNUSED int __pyx_v_ierr;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("_enddef", 0);
+
+  /* "netCDF4/_netCDF4.pyx":1683
+ *     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/_netCDF4.pyx":1681
+ *         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/_netCDF4.pyx":1685
+ *         ierr = nc_enddef(self._grpid)
+ * 
+ *     def set_fill_on(self):             # <<<<<<<<<<<<<<
+ *         """
+ * set_fill_on(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_25set_fill_on(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_24set_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 whic [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_25set_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_8_netCDF4_7Dataset_24set_fill_on(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_24set_fill_on(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":1699
+ * 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/_netCDF4.pyx":1700
+ *         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/_netCDF4.pyx":1701
+ *         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 = 1701; __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 = 1701; __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 = 1701; __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 = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4/_netCDF4.pyx":1685
+ *         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_1);
-  __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("netCDF4._Variable._shape", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.set_fill_on", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -12619,29 +12055,131 @@ static PyObject *__pyx_pf_7netCDF4_9_Variable_12_shape(CYTHON_UNUSED PyObject *_
   return __pyx_r;
 }
 
-/* "utils.pyx":625
- *         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)
+/* "netCDF4/_netCDF4.pyx":1703
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def set_fill_off(self):             # <<<<<<<<<<<<<<
+ *         """
+ * set_fill_off(self)
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_27set_fill_off(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_26set_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_8_netCDF4_7Dataset_27set_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_8_netCDF4_7Dataset_26set_fill_off(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_26set_fill_off(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":1713
+ * 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/_netCDF4.pyx":1714
+ *         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/_netCDF4.pyx":1715
+ *         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 = 1715; __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 = 1715; __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 = 1715; __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 = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4/_netCDF4.pyx":1703
+ *             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._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/_netCDF4.pyx":1717
+ *             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_8_netCDF4_7Dataset_29createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_28createDimension[] = "\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,  [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_29createDimension(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("set_auto_maskandscale (wrapper)", 0);
+  __Pyx_RefNannySetupContext("createDimension (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_val,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);
@@ -12654,202 +12192,136 @@ static PyObject *__pyx_pw_7netCDF4_9_Variable_15set_auto_maskandscale(PyObject *
       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--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimname)) != 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 = 625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        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, "set_auto_maskandscale") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createDimension") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __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);
+      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_self = values[0];
-    __pyx_v_val = values[1];
+    __pyx_v_dimname = values[0];
+    __pyx_v_size = 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 = 625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("createDimension", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("netCDF4._Variable.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.createDimension", __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);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_28createDimension(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_dimname, __pyx_v_size);
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_28createDimension(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  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;
+  PyObject *__pyx_t_3 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("set_auto_maskandscale", 0);
+  __Pyx_RefNannySetupContext("createDimension", 0);
 
-  /* "utils.pyx":626
- *         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):
+  /* "netCDF4/_netCDF4.pyx":1730
+ * 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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1730; __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 = 626; __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 = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  __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 = 1730; __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 = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_Dimension)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
   __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 = 626; __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 = 626; __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 = 626; __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 = 626; __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 = 626; __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_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 = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-    /* "utils.pyx":627
- *     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 = 627; __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 = 627; __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 = 627; __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 = 627; __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":626
- *         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):
+  /* "netCDF4/_netCDF4.pyx":1731
+ * 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __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 = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_r = __pyx_t_3;
+  __pyx_t_3 = 0;
+  goto __pyx_L0;
 
-  /* "utils.pyx":625
- *         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)
+  /* "netCDF4/_netCDF4.pyx":1717
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def createDimension(self, dimname, size=None):             # <<<<<<<<<<<<<<
+ *         """
+ * createDimension(self, dimname, size=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_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_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.createDimension", __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":628
- *         for v in self._recVar:
- *             v.set_auto_maskandscale(val)
- *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
- *         """Get records from a concatenated set of variables."""
+/* "netCDF4/_netCDF4.pyx":1733
+ *         return self.dimensions[dimname]
  * 
+ *     def renameDimension(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameDimension(self, oldname, newname)
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_30renameDimension[] = "\nrenameDimension(self, oldname, newname)\n\nrename a L{Dimension} named C{oldname} to C{newname}.";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31renameDimension(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("__getitem__ (wrapper)", 0);
+  __Pyx_RefNannySetupContext("renameDimension (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_elem,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;
@@ -12863,16 +12335,16 @@ static PyObject *__pyx_pw_7netCDF4_9_Variable_17__getitem__(PyObject *__pyx_self
       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--;
+        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_elem)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __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 = 628; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameDimension") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -12880,2336 +12352,1600 @@ static PyObject *__pyx_pw_7netCDF4_9_Variable_17__getitem__(PyObject *__pyx_self
       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];
+    __pyx_v_oldname = values[0];
+    __pyx_v_newname = 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 = 628; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("netCDF4._Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.renameDimension", __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);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_30renameDimension(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_30renameDimension(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
+  char *__pyx_t_2;
+  int __pyx_t_3;
   PyObject *__pyx_t_4 = NULL;
-  Py_ssize_t __pyx_t_5;
+  PyObject *__pyx_t_5 = NULL;
   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;
+  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("__getitem__", 0);
+  __Pyx_RefNannySetupContext("renameDimension", 0);
 
-  /* "utils.pyx":637
- *         # to use.
- *         start, count, stride, put_ind =\
- *         _StartCountStride(elem, self.shape)             # <<<<<<<<<<<<<<
- *         datashape = _out_array_shape(count)
- *         data = ma.empty(datashape, dtype=self.dtype)
+  /* "netCDF4/_netCDF4.pyx":1739
+ * 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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 637; __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 = 637; __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 = 637; __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 = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __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 = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":1740
+ *         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 = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_namstring = __pyx_t_2;
+
+  /* "netCDF4/_netCDF4.pyx":1741
+ *         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 = 1741; __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 = 1741; __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 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); 
+    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 = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     } 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 = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(item);
-        *(temps[i]) = item;
-      }
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    #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 = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __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 = 636; __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 = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_L4_unpacking_done:;
+    goto __pyx_L3;
   }
+  __pyx_L3:;
 
-  /* "utils.pyx":636
- *         # 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)
+  /* "netCDF4/_netCDF4.pyx":1742
+ *         namstring = bytestr
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         try:             # <<<<<<<<<<<<<<
+ *             dim = self.dimensions[oldname]
+ *         except KeyError:
  */
-  __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;
+  {
+    __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":638
- *         start, count, stride, put_ind =\
- *         _StartCountStride(elem, self.shape)
- *         datashape = _out_array_shape(count)             # <<<<<<<<<<<<<<
- *         data = ma.empty(datashape, dtype=self.dtype)
- * 
+      /* "netCDF4/_netCDF4.pyx":1743
+ *         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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 638; __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);
+      __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 = 1743; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_v_dim = __pyx_t_1;
+      __pyx_t_1 = 0;
     }
-  }
-  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 = 638; __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 = 638; __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 = 638; __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;
+    __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;
 
-  /* "utils.pyx":639
- *         _StartCountStride(elem, self.shape)
- *         datashape = _out_array_shape(count)
- *         data = ma.empty(datashape, dtype=self.dtype)             # <<<<<<<<<<<<<<
- * 
- *         # Determine which dimensions need to be squeezed
+    /* "netCDF4/_netCDF4.pyx":1744
+ *         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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 639; __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 = 639; __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 = 639; __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 = 639; __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 = 639; __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 = 639; __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 = 639; __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;
+    __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+    if (__pyx_t_9) {
+      __Pyx_AddTraceback("netCDF4._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 = 1744; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_GOTREF(__pyx_t_5);
 
-  /* "utils.pyx":645
- *         # 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:
+      /* "netCDF4/_netCDF4.pyx":1745
+ *             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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __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 = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-  __Pyx_INCREF(__pyx_slice__17);
-  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_slice__17);
-  __Pyx_GIVEREF(__pyx_slice__17);
-  __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __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;
+      __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 = 1745; __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 = 1745; __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 = 1745; __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 = 1745; __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:;
+  }
 
-  /* "utils.pyx":646
- *         # 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
+  /* "netCDF4/_netCDF4.pyx":1746
+ *         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_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 = 646; __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__18, 0, 1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 646; __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 = 646; __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 = 646; __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 = 646; __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 = 646; __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 = 646; __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 = 646; __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 = 646; __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 = 646; __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;
+  __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 = 1746; __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 = 1746; __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);
 
-    /* "utils.pyx":647
- *         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
- * 
+  /* "netCDF4/_netCDF4.pyx":1747
+ *             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 = 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 = 647; __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 = 647; __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 = 647; __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 = 647; __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 = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 1747; __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 = 1747; __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;
+    __pyx_t_1 = 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)) {
+      __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_2);
+        __Pyx_INCREF(__pyx_t_1);
         __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 = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    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 = 1747; __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_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; __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 = 647; __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 = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
     __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 = 647; __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) {
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L14;
+  }
+  __pyx_L14:;
 
-      /* "utils.pyx":648
- *         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.
+  /* "netCDF4/_netCDF4.pyx":1748
+ *         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.
  */
-      if (unlikely(PyObject_SetItem(__pyx_v_squeeze, __pyx_v_i, __pyx_int_0) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L7;
-    }
-    __pyx_L7:;
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
 
-    /* "utils.pyx":646
- *         # 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
+    /* "netCDF4/_netCDF4.pyx":1749
+ *         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 = 1749; __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 = 1749; __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 = 1749; __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 = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "utils.pyx":651
- * 
- *         # 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))
+  /* "netCDF4/_netCDF4.pyx":1751
+ *             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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); 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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 651; __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 = 651; __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 = 651; __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 = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 1751; __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_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_6, function);
+      __Pyx_DECREF_SET(__pyx_t_4, 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 = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __Pyx_GOTREF(__pyx_t_1);
+  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 = 1751; __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[1]; __pyx_lineno = 651; __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 = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __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 = 1751; __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_6); __pyx_t_6 = 0;
-  __pyx_v_strt = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* "utils.pyx":652
- *         # 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))
+  /* "netCDF4/_netCDF4.pyx":1753
+ *         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.
  */
-  __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 = 652; __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 = 652; __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 = 652; __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 = 652; __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 = 652; __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 = 652; __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 = 652; __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 = 652; __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;
+  if (unlikely(PyObject_SetItem(__pyx_v_self->dimensions, __pyx_v_newname, __pyx_v_dim) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":653
- *         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))
+  /* "netCDF4/_netCDF4.pyx":1733
+ *         return self.dimensions[dimname]
  * 
+ *     def renameDimension(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameDimension(self, oldname, newname)
  */
-  __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 = 653; __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 = 653; __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 = 653; __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 = 653; __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 = 653; __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 = 653; __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 = 653; __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 = 653; __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":654
- *         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))             # <<<<<<<<<<<<<<
+  /* 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._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/_netCDF4.pyx":1757
+ *         # looks in the file, so no need to manually update.
  * 
- *         # Fill output array with data chunks.
+ *     def createCompoundType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
+ *         """
+ * createCompoundType(self, datatype, datatype_name)
  */
-  __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 = 654; __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 = 654; __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 = 654; __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 = 654; __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 = 654; __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);
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33createCompoundType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_32createCompoundType[] = "\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 valu [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33createCompoundType(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 = 1757; __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 = 1757; __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];
   }
-  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 = 654; __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 = 654; __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 = 654; __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;
+  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 = 1757; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.createCompoundType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_32createCompoundType(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_datatype, __pyx_v_datatype_name);
 
-  /* "utils.pyx":658
- *         # 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
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_32createCompoundType(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":1771
+ * 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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __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 = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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_8_netCDF4_CompoundType)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v_nv = __pyx_t_5;
+  if (unlikely(PyObject_SetItem(__pyx_v_self->cmptypes, __pyx_v_datatype_name, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "utils.pyx":659
- *         # 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]
+  /* "netCDF4/_netCDF4.pyx":1773
+ *         self.cmptypes[datatype_name] = CompoundType(self, datatype,\
+ *                 datatype_name)
+ *         return self.cmptypes[datatype_name]             # <<<<<<<<<<<<<<
+ * 
+ *     def createVLType(self, datatype, datatype_name):
  */
-  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); 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_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 = 659; __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 = 659; __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 = 659; __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 = 659; __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 = 659; __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 = 659; __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 = 659; __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 = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
+  __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 = 1773; __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/_netCDF4.pyx":1757
+ *         # 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._netCDF4.Dataset.createCompoundType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":1775
+ *         return self.cmptypes[datatype_name]
+ * 
+ *     def createVLType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
+ *         """
+ * createVLType(self, datatype, datatype_name)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35createVLType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_34createVLType[] = "\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_8_netCDF4_7Dataset_35createVLType(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;
       }
-    } 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 = 659; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 1775; __pyx_clineno = __LINE__; goto __pyx_L3_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 = 659; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 1775; __pyx_clineno = __LINE__; goto __pyx_L3_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 = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(item);
-          *(temps[i]) = item;
-        }
-      }
-      #endif
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_error;
     } 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 = 659; __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 = 659; __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 = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_L21_unpacking_done:;
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
     }
-    __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;
+    __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 = 1775; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.createVLType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_34createVLType(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_datatype, __pyx_v_datatype_name);
 
-    /* "utils.pyx":661
- *         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 = 661; __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 = 661; __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 = 661; __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 = 661; __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 = 661; __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 = 661; __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 = 661; __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 = 661; __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 = 661; __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 = 661; __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;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "utils.pyx":662
- *             # 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 = 662; __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 = 662; __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 = 662; __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 = 662; __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 = 662; __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 = 662; __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 = 662; __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 = 662; __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 = 662; __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 = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (__pyx_t_10) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_34createVLType(struct __pyx_obj_7netCDF4_8_netCDF4_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);
 
-      /* "utils.pyx":663
- *             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.
+  /* "netCDF4/_netCDF4.pyx":1784
+ * 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 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__19, NULL); 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_Raise(__pyx_t_1, 0, 0, 0);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __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_8_netCDF4_VLType)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __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 = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "utils.pyx":666
- *             # Start, stop and step along 1st dimension, eg the unlimited
- *             # dimension.
- *             sta = start[0]             # <<<<<<<<<<<<<<
- *             step = stride[0]
- *             stop = sta + count[0] * step
+  /* "netCDF4/_netCDF4.pyx":1785
+ * datatype."""
+ *         self.vltypes[datatype_name] = VLType(self, datatype, datatype_name)
+ *         return self.vltypes[datatype_name]             # <<<<<<<<<<<<<<
+ * 
+ *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,
  */
-    __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 = 666; __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;
+  __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 = 1785; __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":667
- *             # dimension.
- *             sta = start[0]
- *             step = stride[0]             # <<<<<<<<<<<<<<
- *             stop = sta + count[0] * step
+  /* "netCDF4/_netCDF4.pyx":1775
+ *         return self.cmptypes[datatype_name]
  * 
+ *     def createVLType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
+ *         """
+ * createVLType(self, datatype, datatype_name)
  */
-    __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 = 667; __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":668
- *             sta = start[0]
- *             step = stride[0]
- *             stop = sta + count[0] * step             # <<<<<<<<<<<<<<
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.createVLType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":1787
+ *         return self.vltypes[datatype_name]
  * 
- *             # Build a list representing the concatenated list of all records in
+ *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,             # <<<<<<<<<<<<<<
+ *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
+ *             chunksizes=None, endian='native', least_significant_digit=None,
  */
-    __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 = 668; __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 = 668; __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 = 668; __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":675
- *             #  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):
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_36createVariable[] = "\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\nIf C{varname} is specified as a path, using forw [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37createVariable(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/_netCDF4.pyx":1788
+ * 
+ *     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):
  */
-    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 675; __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;
+    values[5] = ((PyObject *)Py_True);
+    values[6] = ((PyObject *)Py_False);
+    values[7] = ((PyObject *)Py_False);
 
-    /* "utils.pyx":676
- *             #  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
+    /* "netCDF4/_netCDF4.pyx":1789
+ *     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):
+ *         """
  */
-    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 676; __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;
+    values[8] = ((PyObject *)Py_None);
+    values[9] = ((PyObject *)__pyx_n_s_native);
+    values[10] = ((PyObject *)Py_None);
 
-    /* "utils.pyx":677
- *             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))
+    /* "netCDF4/_netCDF4.pyx":1790
+ *             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)
  */
-    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_nv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 677; __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 = 677; __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 = 677; __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 = 677; __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 = 677; __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 = 677; __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 = 677; __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 = 677; __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 = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          #endif
+    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 = 1787; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
-      } 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 = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          break;
+        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--; }
         }
-        __Pyx_GOTREF(__pyx_t_1);
       }
-      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_1);
-      __pyx_t_1 = 0;
-
-      /* "utils.pyx":678
- *             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 = 678; __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 = 678; __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;
+      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 = 1787; __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 = 1787; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.createVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createVariable(((struct __pyx_obj_7netCDF4_8_netCDF4_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);
 
-      /* "utils.pyx":679
- *             for n in range(nv):
- *                 k = self._recLen[n]     # number of records in this variable
- *                 idx.extend(range(k))             # <<<<<<<<<<<<<<
- *                 vid.extend([n] * k)
+  /* "netCDF4/_netCDF4.pyx":1787
+ *         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,
  */
-      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __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 = 679; __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 = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-      /* "utils.pyx":680
- *                 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 = 680; __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 = 680; __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 = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "utils.pyx":677
- *             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))
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_36createVariable(struct __pyx_obj_7netCDF4_8_netCDF4_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 [...]
+  PyObject *__pyx_v_dirname = 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;
+  PyObject *__pyx_t_4 = NULL;
+  PyObject *(*__pyx_t_5)(PyObject *);
+  int __pyx_t_6;
+  int __pyx_t_7;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("createVariable", 0);
+  __Pyx_INCREF(__pyx_v_varname);
+
+  /* "netCDF4/_netCDF4.pyx":1912
+ * is the number of variable dimensions."""
+ *         # if varname specified as a path, split out group names.
+ *         varname = posixpath.normpath(varname)             # <<<<<<<<<<<<<<
+ *         dirname, varname = posixpath.split(varname) # varname is last.
+ *         # create parent groups (like mkdir -p).
  */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_normpath); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1912; __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);
     }
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  }
+  if (!__pyx_t_2) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_varname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1912; __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 = 1912; __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_varname);
+    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_varname);
+    __Pyx_GIVEREF(__pyx_v_varname);
+    __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 = 1912; __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_DECREF_SET(__pyx_v_varname, __pyx_t_1);
+  __pyx_t_1 = 0;
 
-    /* "utils.pyx":684
- *             # 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.
+  /* "netCDF4/_netCDF4.pyx":1913
+ *         # if varname specified as a path, split out group names.
+ *         varname = posixpath.normpath(varname)
+ *         dirname, varname = posixpath.split(varname) # varname is last.             # <<<<<<<<<<<<<<
+ *         # create parent groups (like mkdir -p).
+ *         if not dirname:
  */
-    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); 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_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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __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[0]; __pyx_lineno = 1913; __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);
     }
-    __pyx_t_2 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  if (!__pyx_t_3) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_varname); 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);
+  } else {
+    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __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 = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+    __Pyx_INCREF(__pyx_v_varname);
+    PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_varname);
+    __Pyx_GIVEREF(__pyx_v_varname);
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); 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_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 = 684; __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 = 684; __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 = 684; __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);
-      }
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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 != 2)) {
+      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    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 = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_GOTREF(__pyx_t_7);
+    #if CYTHON_COMPILING_IN_CPYTHON
+    if (likely(PyTuple_CheckExact(sequence))) {
+      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
+      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
     } else {
-      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __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 = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
+      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
     }
+    __Pyx_INCREF(__pyx_t_4);
+    __Pyx_INCREF(__pyx_t_2);
+    #else
+    __pyx_t_4 = PySequence_ITEM(sequence, 0); 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_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    #endif
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_XDECREF_SET(__pyx_v_lst, __pyx_t_7);
-    __pyx_t_7 = 0;
+  } else {
+    Py_ssize_t index = -1;
+    __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
+    index = 0; __pyx_t_4 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_4);
+    index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+    __Pyx_GOTREF(__pyx_t_2);
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = NULL;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L4_unpacking_done;
+    __pyx_L3_unpacking_failed:;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_5 = NULL;
+    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L4_unpacking_done:;
+  }
+  __pyx_v_dirname = __pyx_t_4;
+  __pyx_t_4 = 0;
+  __Pyx_DECREF_SET(__pyx_v_varname, __pyx_t_2);
+  __pyx_t_2 = 0;
 
-    /* "utils.pyx":687
- * 
- *             # 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])
+  /* "netCDF4/_netCDF4.pyx":1915
+ *         dirname, varname = posixpath.split(varname) # varname is last.
+ *         # create parent groups (like mkdir -p).
+ *         if not dirname:             # <<<<<<<<<<<<<<
+ *             group = self
+ *         else:
  */
-    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_INCREF(__pyx_slice__20);
-    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_slice__20);
-    __Pyx_GIVEREF(__pyx_slice__20);
-    __Pyx_XDECREF_SET(__pyx_v_newSlice, ((PyObject*)__pyx_t_7));
-    __pyx_t_7 = 0;
+  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_dirname); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = ((!__pyx_t_6) != 0);
+  if (__pyx_t_7) {
 
-    /* "utils.pyx":688
- *             # 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)
+    /* "netCDF4/_netCDF4.pyx":1916
+ *         # create parent groups (like mkdir -p).
+ *         if not dirname:
+ *             group = self             # <<<<<<<<<<<<<<
+ *         else:
+ *             group = self.createGroup(dirname)
  */
-    __pyx_t_13 = PyObject_Length(__pyx_v_start); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __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 = 688; __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 = 688; __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 = 688; __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 = 688; __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 = 688; __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 = 688; __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 = 688; __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 = 688; __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 = 688; __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 = 688; __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;
+    __Pyx_INCREF(((PyObject *)__pyx_v_self));
+    __pyx_v_group = ((PyObject *)__pyx_v_self);
+    goto __pyx_L5;
+  }
+  /*else*/ {
 
-      /* "utils.pyx":689
- *             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)
- * 
+    /* "netCDF4/_netCDF4.pyx":1918
+ *             group = self
+ *         else:
+ *             group = self.createGroup(dirname)             # <<<<<<<<<<<<<<
+ *         # create variable.
+ *         group.variables[varname] = Variable(group, varname, datatype,
  */
-      __pyx_t_7 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __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 = 689; __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 = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_createGroup); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __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_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_dirname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 1918; __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 = 689; __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 = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_12);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
+      __Pyx_INCREF(__pyx_v_dirname);
+      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_dirname);
+      __Pyx_GIVEREF(__pyx_v_dirname);
+      __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 = 1918; __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_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 = 689; __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 = 689; __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 = 689; __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;
+    }
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_v_group = __pyx_t_1;
+    __pyx_t_1 = 0;
+  }
+  __pyx_L5:;
 
-      /* "utils.pyx":690
- *             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
+  /* "netCDF4/_netCDF4.pyx":1920
+ *             group = self.createGroup(dirname)
+ *         # create variable.
+ *         group.variables[varname] = Variable(group, varname, datatype,             # <<<<<<<<<<<<<<
+ *         dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,
+ *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
  */
-      __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 = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(3); 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_INCREF(__pyx_v_group);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_group);
+  __Pyx_GIVEREF(__pyx_v_group);
+  __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 = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
 
-      /* "utils.pyx":688
- *             # 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)
+  /* "netCDF4/_netCDF4.pyx":1921
+ *         # create variable.
+ *         group.variables[varname] = Variable(group, varname, datatype,
+ *         dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,             # <<<<<<<<<<<<<<
+ *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
+ *         endian=endian, least_significant_digit=least_significant_digit,
  */
-    }
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dimensions, __pyx_v_dimensions) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __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 = 1920; __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 = 1920; __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 = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-    /* "utils.pyx":694
- *             # Apply the slicing expression to each var in turn, extracting records
- *             # in a list of arrays.
- *             lstArr = []             # <<<<<<<<<<<<<<
- *             ismasked = False
- *             for n in range(nv):
+  /* "netCDF4/_netCDF4.pyx":1922
+ *         group.variables[varname] = Variable(group, 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)
  */
-    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 694; __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;
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fletcher32, __pyx_v_fletcher32) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __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 = 1920; __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 = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-    /* "utils.pyx":695
- *             # in a list of arrays.
- *             lstArr = []
- *             ismasked = False             # <<<<<<<<<<<<<<
- *             for n in range(nv):
- *                 # Get the list of indices for variable 'n'.
+  /* "netCDF4/_netCDF4.pyx":1923
+ *         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 group.variables[varname]
  */
-    __pyx_v_ismasked = 0;
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_endian, __pyx_v_endian) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __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 = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-    /* "utils.pyx":696
- *             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]
+  /* "netCDF4/_netCDF4.pyx":1924
+ *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
+ *         endian=endian, least_significant_digit=least_significant_digit,
+ *         fill_value=fill_value, chunk_cache=chunk_cache)             # <<<<<<<<<<<<<<
+ *         return group.variables[varname]
+ * 
  */
-    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_nv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 696; __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 = 696; __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 = 696; __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 = 696; __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 = 696; __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 = 696; __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 = 696; __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 = 696; __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 = 696; __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 = 696; __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;
+  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __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 = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-      /* "utils.pyx":698
- *             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.
+  /* "netCDF4/_netCDF4.pyx":1920
+ *             group = self.createGroup(dirname)
+ *         # create variable.
+ *         group.variables[varname] = Variable(group, varname, datatype,             # <<<<<<<<<<<<<<
+ *         dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,
+ *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
  */
-      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __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 = 698; __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 = 698; __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 = 698; __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 = 698; __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 = 698; __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 = 698; __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 = 698; __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 = 698; __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 = 698; __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 = 698; __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 = 698; __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 = 698; __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 = 698; __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 = 698; __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 = 698; __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 = 698; __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;
+  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_Variable)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __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;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_varname, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-      /* "utils.pyx":699
- *                 # 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)
+  /* "netCDF4/_netCDF4.pyx":1925
+ *         endian=endian, least_significant_digit=least_significant_digit,
+ *         fill_value=fill_value, chunk_cache=chunk_cache)
+ *         return group.variables[varname]             # <<<<<<<<<<<<<<
+ * 
+ *     def renameVariable(self, oldname, newname):
  */
-      __pyx_t_10 = (__pyx_v_idx != Py_None) && (PyList_GET_SIZE(__pyx_v_idx) != 0);
-      if (__pyx_t_10) {
+  __Pyx_XDECREF(__pyx_r);
+  __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 = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_varname); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __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":701
- *                 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.
+  /* "netCDF4/_netCDF4.pyx":1787
+ *         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,
  */
-        __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 = 701; __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 = 701; __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 = 701; __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 = 701; __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 = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-        /* "utils.pyx":704
- *                     # 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 = 704; __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 = 704; __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 = 704; __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 = 704; __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 = 704; __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 = 704; __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":705
- *                     # 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 = 705; __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 = 705; __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 = 705; __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 = 705; __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 = 705; __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 = 705; __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) {
+  /* 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._netCDF4.Dataset.createVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_dirname);
+  __Pyx_XDECREF(__pyx_v_group);
+  __Pyx_XDECREF(__pyx_v_varname);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "utils.pyx":706
- *                     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)
+/* "netCDF4/_netCDF4.pyx":1927
+ *         return group.variables[varname]
+ * 
+ *     def renameVariable(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameVariable(self, oldname, newname)
  */
-          __pyx_v_ismasked = 1;
 
-          /* "utils.pyx":707
- *                     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 = 707; __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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_38renameVariable[] = "\nrenameVariable(self, oldname, newname)\n\nrename a L{Variable} named C{oldname} to C{newname}";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39renameVariable(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 = 1927; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
-        __pyx_L37:;
-
-        /* "utils.pyx":708
- *                         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 = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        goto __pyx_L36;
       }
-      __pyx_L36:;
-
-      /* "utils.pyx":696
- *             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 (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 = 1927; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __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 = 1927; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.renameVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_38renameVariable(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
 
-    /* "utils.pyx":709
- *                         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) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "utils.pyx":710
- *                     lstArr.append(dat)
- *             if ismasked:
- *                 lstArr = ma.concatenate(lstArr)             # <<<<<<<<<<<<<<
- *             else:
- *                 lstArr = numpy.concatenate(lstArr)
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_38renameVariable(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":1933
+ * rename a L{Variable} named C{oldname} to C{newname}"""
+ *         cdef char *namstring
+ *         try:             # <<<<<<<<<<<<<<
+ *             var = self.variables[oldname]
+ *         except KeyError:
  */
-      __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); 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_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_concatenate); 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_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 = 710; __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 = 710; __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 = 710; __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*/ {
+  {
+    __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":712
- *                 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
+      /* "netCDF4/_netCDF4.pyx":1934
+ *         cdef char *namstring
+ *         try:
+ *             var = self.variables[oldname]             # <<<<<<<<<<<<<<
+ *         except KeyError:
+ *             raise KeyError('%s not a valid variable name' % oldname)
  */
-      __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 712; __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 = 712; __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 = 712; __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 = 712; __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 = 712; __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 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_oldname); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L3_error;};
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_v_var = __pyx_t_4;
       __pyx_t_4 = 0;
     }
-    __pyx_L40:;
+    __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;
 
-    /* "utils.pyx":713
- *             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
+    /* "netCDF4/_netCDF4.pyx":1935
+ *         try:
+ *             var = self.variables[oldname]
+ *         except KeyError:             # <<<<<<<<<<<<<<
+ *             raise KeyError('%s not a valid variable name' % oldname)
+ *         bytestr = _strencode(newname)
  */
-    __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 = 713; __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 = 713; __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 = 713; __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 = 713; __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 = 713; __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 = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+    if (__pyx_t_5) {
+      __Pyx_AddTraceback("netCDF4._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 = 1935; __pyx_clineno = __LINE__; goto __pyx_L5_except_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 = 713; __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 = 713; __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 = 713; __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:;
+      __Pyx_GOTREF(__pyx_t_6);
+      __Pyx_GOTREF(__pyx_t_7);
 
-    /* "utils.pyx":717
- *             # 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:
+      /* "netCDF4/_netCDF4.pyx":1936
+ *             var = self.variables[oldname]
+ *         except KeyError:
+ *             raise KeyError('%s not a valid variable name' % oldname)             # <<<<<<<<<<<<<<
+ *         bytestr = _strencode(newname)
+ *         namstring = bytestr
  */
-    {
-      __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:*/ {
+      __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 = 1936; __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 = 1936; __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 = 1936; __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 = 1936; __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":718
- *             # result, and no squeeze will be done.
- *             try:
- *                 data[tuple(ind)] = lstArr.squeeze()             # <<<<<<<<<<<<<<
- *             except ValueError:
- *                 data[tuple(ind)] = lstArr
+  /* "netCDF4/_netCDF4.pyx":1937
+ *         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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 718; __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 = 718; __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 = 718; __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 = 718; __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 = 718; __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;
+  __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_v_bytestr = __pyx_t_7;
+  __pyx_t_7 = 0;
 
-      /* "utils.pyx":719
- *             try:
- *                 data[tuple(ind)] = lstArr.squeeze()
- *             except ValueError:             # <<<<<<<<<<<<<<
- *                 data[tuple(ind)] = lstArr
- * 
+  /* "netCDF4/_netCDF4.pyx":1938
+ *             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_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 = 719; __pyx_clineno = __LINE__; goto __pyx_L44_except_error;}
-        __Pyx_GOTREF(__pyx_t_12);
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_namstring = __pyx_t_10;
 
-        /* "utils.pyx":720
- *                 data[tuple(ind)] = lstArr.squeeze()
- *             except ValueError:
- *                 data[tuple(ind)] = lstArr             # <<<<<<<<<<<<<<
- * 
- *         # Remove extra singleton dimensions.
+  /* "netCDF4/_netCDF4.pyx":1939
+ *         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_4 = PySequence_Tuple(__pyx_v_ind); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 720; __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 = 720; __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;
+  __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 = 1939; __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 = 1939; __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);
       }
-      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:;
     }
+    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 = 1939; __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 = 1939; __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:;
 
-    /* "utils.pyx":659
- *         # 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]
+  /* "netCDF4/_netCDF4.pyx":1940
+ *         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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __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 = 1940; __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 = 1940; __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);
 
-  /* "utils.pyx":723
- * 
- *         # 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 = 723; __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 = 723; __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":726
- * 
- *         # if no masked elements, return numpy array.
- *         if ma.isMA(data) and not data.mask.any():             # <<<<<<<<<<<<<<
- *            data = data.filled()
- * 
+  /* "netCDF4/_netCDF4.pyx":1941
+ *         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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __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 = 726; __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);
+  __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 = 1941; __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 = 1941; __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 = 1941; __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 = 1941; __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;
   }
-  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 = 726; __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 = 726; __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 = 726; __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 = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_L14:;
+
+  /* "netCDF4/_netCDF4.pyx":1942
+ *         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) {
-  } else {
-    __pyx_t_10 = __pyx_t_11;
-    goto __pyx_L53_bool_binop_done;
+
+    /* "netCDF4/_netCDF4.pyx":1943
+ *         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 = 1943; __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 = 1943; __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 = 1943; __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 = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __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 = 726; __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 = 726; __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);
+
+  /* "netCDF4/_netCDF4.pyx":1945
+ *             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 = 1945; __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_12, function);
+      __Pyx_DECREF_SET(__pyx_t_6, 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 = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  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 = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
   } else {
-    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 726; __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 = 726; __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":727
- *         # 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 = 727; __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 = 727; __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 = 727; __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_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __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 = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   }
-  __pyx_L52:;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "utils.pyx":729
- *            data = data.filled()
- * 
- *         return data             # <<<<<<<<<<<<<<
- * 
+  /* "netCDF4/_netCDF4.pyx":1947
+ *         self.variables.pop(oldname)
+ *         # add new key.
+ *         self.variables[newname] = var             # <<<<<<<<<<<<<<
  * 
+ *     def createGroup(self, groupname):
  */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_data);
-  __pyx_r = __pyx_v_data;
-  goto __pyx_L0;
+  if (unlikely(PyObject_SetItem(__pyx_v_self->variables, __pyx_v_newname, __pyx_v_var) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":628
- *         for v in self._recVar:
- *             v.set_auto_maskandscale(val)
- *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
- *         """Get records from a concatenated set of variables."""
+  /* "netCDF4/_netCDF4.pyx":1927
+ *         return group.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_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_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.renameVariable", __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_XDECREF(__pyx_v_var);
+  __Pyx_XDECREF(__pyx_v_bytestr);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "utils.pyx":768
- *     """
+/* "netCDF4/_netCDF4.pyx":1949
+ *         self.variables[newname] = var
  * 
- *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
+ *     def createGroup(self, groupname):             # <<<<<<<<<<<<<<
  *         """
- * Create a time Variable with units consistent across a multifile
+ * createGroup(self, groupname)
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_40createGroup[] = "\ncreateGroup(self, groupname)\n\nCreates a new L{Group} with the given C{groupname}.\n\nIf C{groupname} is specified as a path, using forward slashes as in unix to\nseparate components, then intermediate groups will be created as necessary \n(analagous to C{mkdir -p} in unix).  For example,\nC{createGroup('/GroupA/GroupB/GroupC')} will create C{GroupA},\nC{GroupA/GroupB}, and C{GroupA/GroupB/GroupC}, if they don't alre [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname) {
   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 = 768; __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 = 768; __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 = 768; __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);
+  __Pyx_RefNannySetupContext("createGroup (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createGroup(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_groupname));
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_40createGroup(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_groupname) {
+  PyObject *__pyx_v_nestedgroups = NULL;
+  PyObject *__pyx_v_group = NULL;
+  PyObject *__pyx_v_g = 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;
+  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("__init__", 0);
-
-  /* "utils.pyx":778
- * 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 = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_datetime = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "utils.pyx":779
- *         """
- *         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 = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_RefNannySetupContext("createGroup", 0);
+  __Pyx_INCREF(__pyx_v_groupname);
 
-  /* "utils.pyx":782
- * 
- *         # copy attributes from master time variable.
- *         for name, value in time.__dict__.items():             # <<<<<<<<<<<<<<
- *             self.__dict__[name] = value
- * 
+  /* "netCDF4/_netCDF4.pyx":1965
+ * The return value is a L{Group} class instance."""
+ *         # if group specified as a path, split out group names
+ *         groupname = posixpath.normpath(groupname)             # <<<<<<<<<<<<<<
+ *         nestedgroups = groupname.split('/')
+ *         group = self
  */
-  __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 = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __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 = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_normpath); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __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))) {
+  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);
@@ -15218,667 +13954,300 @@ static PyObject *__pyx_pf_7netCDF4_6MFTime___init__(CYTHON_UNUSED PyObject *__py
       __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 = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (!__pyx_t_2) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_groupname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
   } else {
-    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; __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_groupname);
+    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_groupname);
+    __Pyx_GIVEREF(__pyx_v_groupname);
+    __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 = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   }
-  __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;
+  __Pyx_DECREF_SET(__pyx_v_groupname, __pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":1966
+ *         # if group specified as a path, split out group names
+ *         groupname = posixpath.normpath(groupname)
+ *         nestedgroups = groupname.split('/')             # <<<<<<<<<<<<<<
+ *         group = self
+ *         # loop over group names, create parent groups if they do not already
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_groupname, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_nestedgroups = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":1967
+ *         groupname = posixpath.normpath(groupname)
+ *         nestedgroups = groupname.split('/')
+ *         group = self             # <<<<<<<<<<<<<<
+ *         # loop over group names, create parent groups if they do not already
+ *         # exist.
+ */
+  __Pyx_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_v_group = ((PyObject *)__pyx_v_self);
+
+  /* "netCDF4/_netCDF4.pyx":1970
+ *         # loop over group names, create parent groups if they do not already
+ *         # exist.
+ *         for g in nestedgroups:             # <<<<<<<<<<<<<<
+ *             if not g: continue
+ *             if g not in group.groups:
+ */
+  if (likely(PyList_CheckExact(__pyx_v_nestedgroups)) || PyTuple_CheckExact(__pyx_v_nestedgroups)) {
+    __pyx_t_3 = __pyx_v_nestedgroups; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
+    __pyx_t_6 = 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 = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_nestedgroups); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1970; __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 = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   for (;;) {
-    if (likely(!__pyx_t_5)) {
+    if (likely(!__pyx_t_6)) {
       if (likely(PyList_CheckExact(__pyx_t_3))) {
-        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+        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_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1970; __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 = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+        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_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1970; __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 = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       }
     } else {
-      __pyx_t_1 = __pyx_t_5(__pyx_t_3);
+      __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[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1970; __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 = 782; __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 = 782; __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 = 782; __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 = 782; __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 = 782; __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 = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_L6_unpacking_done:;
+    __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":1971
+ *         # exist.
+ *         for g in nestedgroups:
+ *             if not g: continue             # <<<<<<<<<<<<<<
+ *             if g not in group.groups:
+ *                 group.groups[g] = Group(group, g)
+ */
+    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_g); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = ((!__pyx_t_7) != 0);
+    if (__pyx_t_8) {
+      goto __pyx_L3_continue;
     }
-    __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":783
- *         # 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.
+    /* "netCDF4/_netCDF4.pyx":1972
+ *         for g in nestedgroups:
+ *             if not g: continue
+ *             if g not in group.groups:             # <<<<<<<<<<<<<<
+ *                 group.groups[g] = Group(group, g)
+ *             group = group.groups[g]
  */
-    __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 = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; __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 = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = (__Pyx_PySequence_Contains(__pyx_v_g, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_7 = (__pyx_t_8 != 0);
+    if (__pyx_t_7) {
 
-    /* "utils.pyx":782
- * 
- *         # copy attributes from master time variable.
- *         for name, value in time.__dict__.items():             # <<<<<<<<<<<<<<
- *             self.__dict__[name] = value
- * 
+      /* "netCDF4/_netCDF4.pyx":1973
+ *             if not g: continue
+ *             if g not in group.groups:
+ *                 group.groups[g] = Group(group, g)             # <<<<<<<<<<<<<<
+ *             group = group.groups[g]
+ *         # if group already exists, just return the group
  */
-  }
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __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_g);
+      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_g);
+      __Pyx_GIVEREF(__pyx_v_g);
+      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_Group)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __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_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_g, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __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;
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
 
-  /* "utils.pyx":786
- * 
- *         # 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')
+    /* "netCDF4/_netCDF4.pyx":1974
+ *             if g not in group.groups:
+ *                 group.groups[g] = Group(group, g)
+ *             group = group.groups[g]             # <<<<<<<<<<<<<<
+ *         # if group already exists, just return the group
+ *         # (prior to 1.1.8, this would have raised an error)
  */
-  __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 = 786; __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 = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_groups); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_1 = PyObject_GetItem(__pyx_t_4, __pyx_v_g); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; __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 = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF_SET(__pyx_v_group, __pyx_t_1);
+    __pyx_t_1 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":1970
+ *         # loop over group names, create parent groups if they do not already
+ *         # exist.
+ *         for g in nestedgroups:             # <<<<<<<<<<<<<<
+ *             if not g: continue
+ *             if g not in group.groups:
+ */
+    __pyx_L3_continue:;
   }
   __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 = 786; __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 = 786; __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 = 786; __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 = 786; __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 = 786; __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":787
- *         # 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')
+  /* "netCDF4/_netCDF4.pyx":1977
+ *         # if group already exists, just return the group
+ *         # (prior to 1.1.8, this would have raised an error)
+ *         return group             # <<<<<<<<<<<<<<
  * 
+ *     def ncattrs(self):
  */
-    __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 = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_10 = ((!(__pyx_t_9 != 0)) != 0);
-    if (__pyx_t_10) {
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_group);
+  __pyx_r = __pyx_v_group;
+  goto __pyx_L0;
 
-      /* "utils.pyx":788
- *         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')             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":1949
+ *         self.variables[newname] = var
  * 
- *         # Check that calendar is the same in all files.
+ *     def createGroup(self, groupname):             # <<<<<<<<<<<<<<
+ *         """
+ * createGroup(self, groupname)
  */
-      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 788; __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 = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
 
-    /* "utils.pyx":786
- * 
- *         # 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;
+  /* 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._netCDF4.Dataset.createGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_nestedgroups);
+  __Pyx_XDECREF(__pyx_v_group);
+  __Pyx_XDECREF(__pyx_v_g);
+  __Pyx_XDECREF(__pyx_v_groupname);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "utils.pyx":791
- * 
- *         # 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.')
+/* "netCDF4/_netCDF4.pyx":1979
+ *         return group
  * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         """
+ * ncattrs(self)
  */
-  __pyx_t_1 = PyList_New(0); 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_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_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 = 791; __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 = 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_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 = 791; __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 = 791; __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 = 791; __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 = 791; __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 = 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;
-    __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 = 791; __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 = 791; __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 = 791; __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 = 791; __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":792
- *         # 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__22, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 792; __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 = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_42ncattrs[] = "\nncattrs(self)\n\nreturn netCDF global attribute names for this L{Dataset} or L{Group} in a list.";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("ncattrs (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_42ncattrs(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-  /* "utils.pyx":795
- * 
- *         # 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 = 795; __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 = 795; __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 = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "utils.pyx":798
- * 
- *         # 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 = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42ncattrs(struct __pyx_obj_7netCDF4_8_netCDF4_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);
 
-  /* "utils.pyx":799
- *         # 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)             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":1984
  * 
- *         # 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 = 799; __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 = 799; __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 = 799; __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 = 799; __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 = 799; __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":803
- *         # 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)             # <<<<<<<<<<<<<<
+ * return netCDF global attribute names for this L{Dataset} or L{Group} in a list."""
+ *         return _get_att_names(self._grpid, NC_GLOBAL)             # <<<<<<<<<<<<<<
  * 
- *         i0 = 0; i1 = 0
+ *     def setncattr(self,name,value):
  */
-  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __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 = 803; __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 = 803; __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 = 803; __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 = 803; __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 = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_att_names(__pyx_v_self->_grpid, NC_GLOBAL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1984; __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 = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-  /* "utils.pyx":805
- *         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":806
- * 
- *         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 = 806; __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 = 806; __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 = 806; __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 = 806; __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 = 806; __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 = 806; __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 = 806; __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 = 806; __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 = 806; __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":807
- *         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 = 807; __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 = 807; __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":808
- *         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 = 808; __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 = 808; __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 = 808; __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 = 808; __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 = 808; __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":809
- *             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 = 809; __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":810
- *             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 = 810; __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 = 810; __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 = 810; __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":811
- *             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 = 811; __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":806
- * 
- *         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;
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
 
-  /* "utils.pyx":768
- *     """
+  /* "netCDF4/_netCDF4.pyx":1979
+ *         return group
  * 
- *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
  *         """
- * Create a time Variable with units consistent across a multifile
+ * ncattrs(self)
  */
 
   /* 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_AddTraceback("netCDF4._netCDF4.Dataset.ncattrs", __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":814
- * 
+/* "netCDF4/_netCDF4.pyx":1986
+ *         return _get_att_names(self._grpid, NC_GLOBAL)
  * 
- *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
- *         return self.__time[elem] + self.__delta[elem]
+ *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
+ *         """
+ * setncattr(self,name,value)
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_44setncattr[] = "\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_8_netCDF4_7Dataset_45setncattr(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("__getitem__ (wrapper)", 0);
+  __Pyx_RefNannySetupContext("setncattr (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_elem,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;
@@ -15892,16 +14261,16 @@ static PyObject *__pyx_pw_7netCDF4_6MFTime_3__getitem__(PyObject *__pyx_self, Py
       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--;
+        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_elem)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __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 = 814; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setncattr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
@@ -15909,72 +14278,131 @@ static PyObject *__pyx_pw_7netCDF4_6MFTime_3__getitem__(PyObject *__pyx_self, Py
       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];
+    __pyx_v_name = values[0];
+    __pyx_v_value = 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 = 814; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("netCDF4.MFTime.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.setncattr", __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);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_44setncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_name, __pyx_v_value);
 
   /* 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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_44setncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__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_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("__getitem__", 0);
+  __Pyx_RefNannySetupContext("setncattr", 0);
+
+  /* "netCDF4/_netCDF4.pyx":1993
+ * 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 = 1993; __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 = 1993; __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 = 1993; __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 = 1993; __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:;
 
-  /* "utils.pyx":815
+  /* "netCDF4/_netCDF4.pyx":1994
+ * attributes."""
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         _set_att(self, NC_GLOBAL, name, value)             # <<<<<<<<<<<<<<
+ *         if self.data_model !=  'NETCDF4': self._enddef()
  * 
- *     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 = 815; __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 = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__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 = 1994; __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 = 815; __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 = 815; __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 = 815; __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":814
+  /* "netCDF4/_netCDF4.pyx":1995
+ *         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 = 1995; __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 = 1995; __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 = 1995; __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 = 1995; __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/_netCDF4.pyx":1986
+ *         return _get_att_names(self._grpid, NC_GLOBAL)
  * 
- *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
- *         return self.__time[elem] + self.__delta[elem]
+ *     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_2);
   __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("netCDF4.MFTime.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.setncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -15982,1547 +14410,1305 @@ static PyObject *__pyx_pf_7netCDF4_6MFTime_2__getitem__(CYTHON_UNUSED PyObject *
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":812
- * # check for required version of netcdf-4 and hdf5.
+/* "netCDF4/_netCDF4.pyx":1997
+ *         if self.data_model !=  'NETCDF4': self._enddef()
  * 
- * def _gethdf5libversion():             # <<<<<<<<<<<<<<
- *     majorvers = H5_VERS_MAJOR
- *     minorvers = H5_VERS_MINOR
+ *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
+ *         """
+ * setncatts(self,attdict)
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_47setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_46setncatts[] = "\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_8_netCDF4_7Dataset_47setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_gethdf5libversion (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_16_gethdf5libversion(__pyx_self);
+  __Pyx_RefNannySetupContext("setncatts (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_46setncatts(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_attdict));
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_46setncatts(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__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;
-  int __pyx_t_3;
+  int __pyx_t_1;
+  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;
+  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("_gethdf5libversion", 0);
+  __Pyx_RefNannySetupContext("setncatts", 0);
+
+  /* "netCDF4/_netCDF4.pyx":2005
+ * 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 = 2005; __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 = 2005; __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 = 2005; __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 = 2005; __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/_netCDF4.pyx":2006
+ * 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 = 2006; __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 = 2006; __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 = 2006; __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 = 2006; __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 = 2006; __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 = 2006; __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 = 2006; __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 = 2006; __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 = 2006; __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 = 2006; __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 = 2006; __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 = 2006; __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 = 2006; __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 = 2006; __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 = 2006; __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 = 2006; __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":813
+    /* "netCDF4/_netCDF4.pyx":2007
+ *         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 _gethdf5libversion():
- *     majorvers = H5_VERS_MAJOR             # <<<<<<<<<<<<<<
- *     minorvers = H5_VERS_MINOR
- *     releasevers = H5_VERS_RELEASE
  */
-  __pyx_v_majorvers = H5_VERS_MAJOR;
+    __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__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 = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":814
- * def _gethdf5libversion():
- *     majorvers = H5_VERS_MAJOR
- *     minorvers = H5_VERS_MINOR             # <<<<<<<<<<<<<<
- *     releasevers = H5_VERS_RELEASE
- *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
+    /* "netCDF4/_netCDF4.pyx":2006
+ * 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_v_minorvers = H5_VERS_MINOR;
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "netCDF4.pyx":815
- *     majorvers = H5_VERS_MAJOR
- *     minorvers = H5_VERS_MINOR
- *     releasevers = H5_VERS_RELEASE             # <<<<<<<<<<<<<<
- *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
- *     if not patchstring:
+  /* "netCDF4/_netCDF4.pyx":2008
+ *         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_v_releasevers = H5_VERS_RELEASE;
+  __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 = 2008; __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 = 2008; __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 = 2008; __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 = 2008; __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":816
- *     minorvers = H5_VERS_MINOR
- *     releasevers = H5_VERS_RELEASE
- *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')             # <<<<<<<<<<<<<<
- *     if not patchstring:
- *        return '%d.%d.%d' % (majorvers,minorvers,releasevers)
+  /* "netCDF4/_netCDF4.pyx":1997
+ *         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._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/_netCDF4.pyx":2010
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ * 
+ *     def getncattr(self,name):             # <<<<<<<<<<<<<<
+ *         """
+ * getncattr(self,name)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_49getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_48getncattr[] = "\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_8_netCDF4_7Dataset_49getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("getncattr (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_48getncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_48getncattr(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":2017
+ * 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_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 = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_patchstring = __pyx_t_1;
+  __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
+  goto __pyx_L0;
 
-  /* "netCDF4.pyx":817
- *     releasevers = H5_VERS_RELEASE
- *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
- *     if not patchstring:             # <<<<<<<<<<<<<<
- *        return '%d.%d.%d' % (majorvers,minorvers,releasevers)
- *     else:
+  /* "netCDF4/_netCDF4.pyx":2010
+ *         if self.data_model != 'NETCDF4': self._enddef()
+ * 
+ *     def getncattr(self,name):             # <<<<<<<<<<<<<<
+ *         """
+ * getncattr(self,name)
  */
-  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_patchstring); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = ((!__pyx_t_2) != 0);
+
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.getncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":2019
+ *         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_8_netCDF4_7Dataset_51__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_51__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__delattr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_50__delattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_50__delattr__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":2021
+ *     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 = 2021; __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 = 2021; __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":818
- *     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)
+    /* "netCDF4/_netCDF4.pyx":2022
+ *         # if it's a netCDF attribute, remove it
+ *         if name not in _private_atts:
+ *             self.delncattr(name)             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise AttributeError(
  */
-    __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 = 818; __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 = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 2022; __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 = 818; __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 = 818; __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 = 818; __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;
+    __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 = 2022; __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 = 2022; __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 = 2022; __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":820
- *        return '%d.%d.%d' % (majorvers,minorvers,releasevers)
- *     else:
- *        return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":2025
+ *         else:
+ *             raise AttributeError(
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))             # <<<<<<<<<<<<<<
  * 
- * __netcdf4libversion__ = getlibversion().split()[0]
+ *     def delncattr(self, name):
  */
-    __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 = 820; __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 = 820; __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 = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2025; __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 = 2025; __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 = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 2025; __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_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_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 = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 2025; __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;
+
+    /* "netCDF4/_netCDF4.pyx":2024
+ *             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 = 2024; __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;
-    goto __pyx_L0;
+    __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 = 2024; __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 = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
+  __pyx_L3:;
 
-  /* "netCDF4.pyx":812
- * # check for required version of netcdf-4 and hdf5.
+  /* "netCDF4/_netCDF4.pyx":2019
+ *         return _get_att(self, NC_GLOBAL, name)
  * 
- * def _gethdf5libversion():             # <<<<<<<<<<<<<<
- *     majorvers = H5_VERS_MAJOR
- *     minorvers = H5_VERS_MINOR
+ *     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._gethdf5libversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.__delattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_patchstring);
-  __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":882
- * # internal C functions.
+/* "netCDF4/_netCDF4.pyx":2027
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
  * 
- * cdef _get_att_names(int grpid, int varid):             # <<<<<<<<<<<<<<
- *     # Private function to get all the attribute names in a group
- *     cdef int ierr, numatts, n
+ *     def delncattr(self, name):             # <<<<<<<<<<<<<<
+ *         """
+ * delncattr(self,name,value)
  */
 
-static PyObject *__pyx_f_7netCDF4__get_att_names(int __pyx_v_grpid, int __pyx_v_varid) {
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_53delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_52delncattr[] = "\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_8_netCDF4_7Dataset_53delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("delncattr (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_52delncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_52delncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) {
+  char *__pyx_v_attname;
   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_v_bytestr = NULL;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
+  PyObject *__pyx_t_1 = NULL;
   char *__pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_3;
   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;
+  PyObject *__pyx_t_5 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("_get_att_names", 0);
+  __Pyx_RefNannySetupContext("delncattr", 0);
 
-  /* "netCDF4.pyx":886
- *     cdef int ierr, numatts, n
- *     cdef char namstring[NC_MAX_NAME+1]
- *     if varid == NC_GLOBAL:             # <<<<<<<<<<<<<<
- *         with nogil:
- *             ierr = nc_inq_natts(grpid, &numatts)
+  /* "netCDF4/_netCDF4.pyx":2036
+ *         cdef char *attname
+ *         cdef int ierr
+ *         bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *         attname = bytestr
+ *         if self.data_model != 'NETCDF4': self._redef()
  */
-  __pyx_t_1 = ((__pyx_v_varid == NC_GLOBAL) != 0);
-  if (__pyx_t_1) {
+  __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, 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_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":887
- *     cdef char namstring[NC_MAX_NAME+1]
- *     if varid == NC_GLOBAL:
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_natts(grpid, &numatts)
- *     else:
+  /* "netCDF4/_netCDF4.pyx":2037
+ *         cdef int ierr
+ *         bytestr = _strencode(name)
+ *         attname = bytestr             # <<<<<<<<<<<<<<
+ *         if self.data_model != 'NETCDF4': self._redef()
+ *         ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)
  */
-    {
-        #ifdef WITH_THREAD
-        PyThreadState *_save;
-        Py_UNBLOCK_THREADS
-        #endif
-        /*try:*/ {
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_attname = __pyx_t_2;
 
-          /* "netCDF4.pyx":888
- *     if varid == NC_GLOBAL:
- *         with nogil:
- *             ierr = nc_inq_natts(grpid, &numatts)             # <<<<<<<<<<<<<<
- *     else:
- *         with nogil:
- */
-          __pyx_v_ierr = nc_inq_natts(__pyx_v_grpid, (&__pyx_v_numatts));
-        }
-
-        /* "netCDF4.pyx":887
- *     cdef char namstring[NC_MAX_NAME+1]
- *     if varid == NC_GLOBAL:
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_natts(grpid, &numatts)
- *     else:
+  /* "netCDF4/_netCDF4.pyx":2038
+ *         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()
  */
-        /*finally:*/ {
-          /*normal exit:*/{
-            #ifdef WITH_THREAD
-            Py_BLOCK_THREADS
-            #endif
-            goto __pyx_L6;
-          }
-          __pyx_L6:;
-        }
+  __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 = 2038; __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 = 2038; __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);
+      }
     }
-    goto __pyx_L3;
-  }
-  /*else*/ {
-
-    /* "netCDF4.pyx":890
- *             ierr = nc_inq_natts(grpid, &numatts)
- *     else:
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_varnatts(grpid, varid, &numatts)
- *     if ierr != NC_NOERR:
- */
-    {
-        #ifdef WITH_THREAD
-        PyThreadState *_save;
-        Py_UNBLOCK_THREADS
-        #endif
-        /*try:*/ {
-
-          /* "netCDF4.pyx":891
- *     else:
- *         with nogil:
- *             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));
-        }
-
-        /* "netCDF4.pyx":890
- *             ierr = nc_inq_natts(grpid, &numatts)
- *     else:
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_varnatts(grpid, varid, &numatts)
- *     if ierr != NC_NOERR:
- */
-        /*finally:*/ {
-          /*normal exit:*/{
-            #ifdef WITH_THREAD
-            Py_BLOCK_THREADS
-            #endif
-            goto __pyx_L9;
-          }
-          __pyx_L9:;
-        }
+    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 = 2038; __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 = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-  }
-  __pyx_L3:;
-
-  /* "netCDF4.pyx":892
- *         with nogil:
- *             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":893
- *             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 = 893; __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 = 893; __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 = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_GOTREF(__pyx_t_1);
     __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 = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L3;
   }
+  __pyx_L3:;
 
-  /* "netCDF4.pyx":894
- *     if ierr != NC_NOERR:
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *     attslist = []             # <<<<<<<<<<<<<<
- *     for n from 0 <= n < numatts:
- *         with nogil:
- */
-  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __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":895
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *     attslist = []
- *     for n from 0 <= n < numatts:             # <<<<<<<<<<<<<<
- *         with nogil:
- *             ierr = nc_inq_attname(grpid, varid, n, namstring)
- */
-  __pyx_t_5 = __pyx_v_numatts;
-  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_5; __pyx_v_n++) {
-
-    /* "netCDF4.pyx":896
- *     attslist = []
- *     for n from 0 <= n < numatts:
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_attname(grpid, varid, n, namstring)
+  /* "netCDF4/_netCDF4.pyx":2039
+ *         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:
  */
-    {
-        #ifdef WITH_THREAD
-        PyThreadState *_save;
-        Py_UNBLOCK_THREADS
-        #endif
-        /*try:*/ {
+  __pyx_v_ierr = nc_del_att(__pyx_v_self->_grpid, NC_GLOBAL, __pyx_v_attname);
 
-          /* "netCDF4.pyx":897
- *     for n from 0 <= n < numatts:
- *         with nogil:
- *             ierr = nc_inq_attname(grpid, varid, n, namstring)             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":2040
+ *         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_v_ierr = nc_inq_attname(__pyx_v_grpid, __pyx_v_varid, __pyx_v_n, __pyx_v_namstring);
-        }
-
-        /* "netCDF4.pyx":896
- *     attslist = []
- *     for n from 0 <= n < numatts:
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_attname(grpid, varid, n, namstring)
- *         if ierr != NC_NOERR:
- */
-        /*finally:*/ {
-          /*normal exit:*/{
-            #ifdef WITH_THREAD
-            Py_BLOCK_THREADS
-            #endif
-            goto __pyx_L17;
-          }
-          __pyx_L17:;
-        }
+  __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 = 2040; __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 = 2040; __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 = 2040; __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 = 2040; __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":898
- *         with nogil:
- *             ierr = nc_inq_attname(grpid, varid, n, namstring)
+  /* "netCDF4/_netCDF4.pyx":2041
+ *         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'))
- *         attslist.append(namstring.decode(default_encoding,unicode_error))
+ * 
  */
-    __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
-    if (__pyx_t_1) {
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
 
-      /* "netCDF4.pyx":899
- *             ierr = nc_inq_attname(grpid, varid, n, namstring)
+    /* "netCDF4/_netCDF4.pyx":2042
+ *         if self.data_model != 'NETCDF4': self._enddef()
  *         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 = 899; __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 = 899; __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 = 899; __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 = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-
-    /* "netCDF4.pyx":900
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         attslist.append(namstring.decode(default_encoding,unicode_error))             # <<<<<<<<<<<<<<
- *     return attslist
  * 
+ *     def __setattr__(self,name,value):
  */
-    __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 2042; __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 = 2042; __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 = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __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 = 2042; __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_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __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 = 900; __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 = 900; __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 = 900; __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 = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
 
-  /* "netCDF4.pyx":901
- *             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":882
- * # internal C functions.
+  /* "netCDF4/_netCDF4.pyx":2027
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
  * 
- * cdef _get_att_names(int grpid, int varid):             # <<<<<<<<<<<<<<
- *     # Private function to get all the attribute names in a group
- *     cdef int ierr, numatts, n
+ *     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_3);
+  __Pyx_XDECREF(__pyx_t_1);
   __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_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.delncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_attslist);
+  __Pyx_XDECREF(__pyx_v_bytestr);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":903
- *     return attslist
+/* "netCDF4/_netCDF4.pyx":2044
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  * 
- * cdef _get_att(grp, int varid, name):             # <<<<<<<<<<<<<<
- *     # Private function to get an attribute value given its name
- *     cdef int ierr, n, _grpid
+ *     def __setattr__(self,name,value):             # <<<<<<<<<<<<<<
+ *         # if name in _private_atts, it is stored at the python
+ *         # level and not in the netCDF file.
  */
 
-static PyObject *__pyx_f_7netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_v_varid, PyObject *__pyx_v_name) {
-  int __pyx_v_ierr;
-  int __pyx_v__grpid;
-  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;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_55__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_55__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_8_netCDF4_7Dataset_54__setattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_54__setattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+  int __pyx_r;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
-  char *__pyx_t_2;
+  int __pyx_t_2;
   int __pyx_t_3;
-  int __pyx_t_4;
+  PyObject *__pyx_t_4 = NULL;
   PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
+  Py_ssize_t __pyx_t_6;
   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);
+  __Pyx_RefNannySetupContext("__setattr__", 0);
 
-  /* "netCDF4.pyx":911
- *     cdef nc_type att_type
- *     cdef ndarray value_arr
- *     bytestr = _strencode(name)             # <<<<<<<<<<<<<<
- *     attname = bytestr
- *     _grpid = grp._grpid
+  /* "netCDF4/_netCDF4.pyx":2047
+ *         # 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_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_bytestr = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __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 = 2047; __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":912
- *     cdef ndarray value_arr
- *     bytestr = _strencode(name)
- *     attname = bytestr             # <<<<<<<<<<<<<<
- *     _grpid = grp._grpid
- *     with nogil:
+    /* "netCDF4/_netCDF4.pyx":2048
+ *         # 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_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_attname = __pyx_t_2;
+    __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 = 2048; __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 = 2048; __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 = 2048; __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":913
- *     bytestr = _strencode(name)
- *     attname = bytestr
- *     _grpid = grp._grpid             # <<<<<<<<<<<<<<
- *     with nogil:
- *         ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len)
+  /* "netCDF4/_netCDF4.pyx":2049
+ *         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_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 2049; __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 = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v__grpid = __pyx_t_3;
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2049; __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":914
- *     attname = bytestr
- *     _grpid = grp._grpid
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len)
- *     if ierr != NC_NOERR:
+    /* "netCDF4/_netCDF4.pyx":2050
+ *             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)))
  */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
+    __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 = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = (__pyx_t_2 != 0);
+    if (__pyx_t_3) {
 
-        /* "netCDF4.pyx":915
- *     _grpid = grp._grpid
- *     with nogil:
- *         ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len)             # <<<<<<<<<<<<<<
- *     if ierr != NC_NOERR:
- *         raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+      /* "netCDF4/_netCDF4.pyx":2052
+ *             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_v_ierr = nc_inq_att(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, (&__pyx_v_att_type), (&__pyx_v_att_len));
-      }
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; __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 = 2052; __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 = 2052; __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 = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-      /* "netCDF4.pyx":914
- *     attname = bytestr
- *     _grpid = grp._grpid
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_att(_grpid, varid, attname, &att_type, &att_len)
- *     if ierr != NC_NOERR:
+      /* "netCDF4/_netCDF4.pyx":2051
+ *         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:
  */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L5;
-        }
-        __pyx_L5:;
-      }
-  }
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2051; __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 = 2051; __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 = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    /*else*/ {
 
-  /* "netCDF4.pyx":916
- *     with nogil:
- *         ierr = nc_inq_att(_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 ...
+      /* "netCDF4/_netCDF4.pyx":2054
+ *             "'%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_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_4) {
+      __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 = 2054; __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 = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    }
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
 
-    /* "netCDF4.pyx":917
- *         ierr = nc_inq_att(_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:
+  /* "netCDF4/_netCDF4.pyx":2044
+ *             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.
  */
-    __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 = 917; __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 = 917; __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 = 917; __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 = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
 
-  /* "netCDF4.pyx":933
- *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
- *         return pstring
- *     elif att_type == NC_STRING:             # <<<<<<<<<<<<<<
- *         if att_len == 1:
- *             with nogil:
- */
-  switch (__pyx_v_att_type) {
+  /* 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._netCDF4.Dataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":919
- *         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')
- *         with nogil:
+/* "netCDF4/_netCDF4.pyx":2056
+ *                 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.
  */
-    case NC_CHAR:
 
-    /* "netCDF4.pyx":920
- *     # attribute is a character or string ...
- *     if att_type == NC_CHAR:
- *         value_arr = numpy.empty(att_len,'S1')             # <<<<<<<<<<<<<<
- *         with nogil:
- *             ierr = nc_get_att_text(_grpid, varid, attname, <char *>value_arr.data)
- */
-    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __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 = 920; __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 = 920; __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 = 920; __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 = 920; __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 = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_1);
-    __pyx_t_1 = 0;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_57__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_57__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_8_netCDF4_7Dataset_56__getattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));
 
-    /* "netCDF4.pyx":921
- *     if att_type == NC_CHAR:
- *         value_arr = numpy.empty(att_len,'S1')
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_get_att_text(_grpid, varid, attname, <char *>value_arr.data)
- *         if ierr != NC_NOERR:
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_56__getattr__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":2059
+ *         # 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__':
  */
-    {
-        #ifdef WITH_THREAD
-        PyThreadState *_save;
-        Py_UNBLOCK_THREADS
-        #endif
-        /*try:*/ {
+  __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 = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; __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 = 2059; __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 = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; __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 = 2059; __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":922
- *         value_arr = numpy.empty(att_len,'S1')
- *         with nogil:
- *             ierr = nc_get_att_text(_grpid, varid, attname, <char *>value_arr.data)             # <<<<<<<<<<<<<<
- *         if ierr != NC_NOERR:
- *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    /* "netCDF4/_netCDF4.pyx":2061
+ *         if name.startswith('__') and name.endswith('__'):
+ *             # if __dict__ requested, return a dict with netCDF attributes.
+ *             if name == '__dict__':             # <<<<<<<<<<<<<<
+ *                 names = self.ncattrs()
+ *                 values = []
  */
-          __pyx_v_ierr = nc_get_att_text(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, ((char *)__pyx_v_value_arr->data));
-        }
+    __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 = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
 
-        /* "netCDF4.pyx":921
- *     if att_type == NC_CHAR:
- *         value_arr = numpy.empty(att_len,'S1')
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_get_att_text(_grpid, varid, attname, <char *>value_arr.data)
- *         if ierr != NC_NOERR:
+      /* "netCDF4/_netCDF4.pyx":2062
+ *             # if __dict__ requested, return a dict with netCDF attributes.
+ *             if name == '__dict__':
+ *                 names = self.ncattrs()             # <<<<<<<<<<<<<<
+ *                 values = []
+ *                 for name in names:
  */
-        /*finally:*/ {
-          /*normal exit:*/{
-            #ifdef WITH_THREAD
-            Py_BLOCK_THREADS
-            #endif
-            goto __pyx_L9;
-          }
-          __pyx_L9:;
+      __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 = 2062; __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 = 2062; __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 = 2062; __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":923
- *         with nogil:
- *             ierr = nc_get_att_text(_grpid, varid, attname, <char *>value_arr.data)
- *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         if name == '_FillValue' and python3:
+      /* "netCDF4/_netCDF4.pyx":2063
+ *             if name == '__dict__':
+ *                 names = self.ncattrs()
+ *                 values = []             # <<<<<<<<<<<<<<
+ *                 for name in names:
+ *                     values.append(_get_att(self, NC_GLOBAL, name))
  */
-    __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
-    if (__pyx_t_4) {
+      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2063; __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":924
- *             ierr = nc_get_att_text(_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
+      /* "netCDF4/_netCDF4.pyx":2064
+ *                 names = self.ncattrs()
+ *                 values = []
+ *                 for name in names:             # <<<<<<<<<<<<<<
+ *                     values.append(_get_att(self, NC_GLOBAL, name))
+ *                 return OrderedDict(zip(names,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 = 924; __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 = 924; __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 = 924; __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 = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+      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 = 2064; __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 = 2064; __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 = 2064; __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 = 2064; __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 = 2064; __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 = 2064; __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 = 2064; __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":925
- *         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).
+        /* "netCDF4/_netCDF4.pyx":2065
+ *                 values = []
+ *                 for name in names:
+ *                     values.append(_get_att(self, NC_GLOBAL, name))             # <<<<<<<<<<<<<<
+ *                 return OrderedDict(zip(names,values))
+ *             else:
  */
-    __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 = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_10) {
-    } else {
-      __pyx_t_4 = __pyx_t_10;
-      goto __pyx_L12_bool_binop_done;
-    }
-    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __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 = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_t_4 = __pyx_t_10;
-    __pyx_L12_bool_binop_done:;
-    if (__pyx_t_4) {
+        __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__get_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2065; __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 = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-      /* "netCDF4.pyx":928
- *             # make sure _FillValue for character arrays is a byte on python 3
- *             # (issue 271).
- *             pstring = bytes(value_arr)             # <<<<<<<<<<<<<<
- *         else:
- *             pstring =\
+        /* "netCDF4/_netCDF4.pyx":2064
+ *                 names = self.ncattrs()
+ *                 values = []
+ *                 for name in names:             # <<<<<<<<<<<<<<
+ *                     values.append(_get_att(self, NC_GLOBAL, name))
+ *                 return OrderedDict(zip(names,values))
  */
-      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __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 = 928; __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_L11;
-    }
-    /*else*/ {
+      }
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-      /* "netCDF4.pyx":931
- *         else:
- *             pstring =\
- *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')             # <<<<<<<<<<<<<<
- *         return pstring
- *     elif att_type == NC_STRING:
+      /* "netCDF4/_netCDF4.pyx":2066
+ *                 for name in names:
+ *                     values.append(_get_att(self, NC_GLOBAL, name))
+ *                 return OrderedDict(zip(names,values))             # <<<<<<<<<<<<<<
+ *             else:
+ *                 raise AttributeError
  */
-      __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 = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 2066; __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 = 2066; __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)) {
+      __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_5);
+          __Pyx_INCREF(__pyx_t_10);
           __Pyx_INCREF(function);
           __Pyx_DECREF_SET(__pyx_t_9, function);
+          __pyx_t_6 = 1;
         }
       }
-      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 = 931; __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 = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; __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_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 = 931; __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 = 931; __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 = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 2066; __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_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_9, function);
-          __pyx_t_8 = 1;
+          __Pyx_DECREF_SET(__pyx_t_3, function);
         }
       }
-      __pyx_t_11 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __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;
+      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 = 2066; __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 = 2066; __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 = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
       }
-      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 = 931; __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 = 931; __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__25, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_r = __pyx_t_2;
+      __pyx_t_2 = 0;
+      goto __pyx_L0;
     }
-    __pyx_L11:;
+    /*else*/ {
 
-    /* "netCDF4.pyx":932
- *             pstring =\
- *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
- *         return pstring             # <<<<<<<<<<<<<<
- *     elif att_type == NC_STRING:
- *         if att_len == 1:
+      /* "netCDF4/_netCDF4.pyx":2068
+ *                 return OrderedDict(zip(names,values))
+ *             else:
+ *                 raise AttributeError             # <<<<<<<<<<<<<<
+ *         elif name in _private_atts:
+ *             return self.__dict__[name]
  */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_v_pstring);
-    __pyx_r = __pyx_v_pstring;
-    goto __pyx_L0;
-    break;
+      __Pyx_Raise(__pyx_builtin_AttributeError, 0, 0, 0);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
 
-    /* "netCDF4.pyx":933
- *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
- *         return pstring
- *     elif att_type == NC_STRING:             # <<<<<<<<<<<<<<
- *         if att_len == 1:
- *             with nogil:
+  /* "netCDF4/_netCDF4.pyx":2069
+ *             else:
+ *                 raise AttributeError
+ *         elif name in _private_atts:             # <<<<<<<<<<<<<<
+ *             return self.__dict__[name]
+ *         else:
  */
-    case NC_STRING:
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2069; __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 = 2069; __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":934
- *         return pstring
- *     elif att_type == NC_STRING:
- *         if att_len == 1:             # <<<<<<<<<<<<<<
- *             with nogil:
- *                 ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
+    /* "netCDF4/_netCDF4.pyx":2070
+ *                 raise AttributeError
+ *         elif name in _private_atts:
+ *             return self.__dict__[name]             # <<<<<<<<<<<<<<
+ *         else:
+ *             return self.getncattr(name)
  */
-    __pyx_t_4 = ((__pyx_v_att_len == 1) != 0);
-    if (__pyx_t_4) {
+    __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 = 2070; __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 = 2070; __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":935
- *     elif att_type == NC_STRING:
- *         if att_len == 1:
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
- *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
+    /* "netCDF4/_netCDF4.pyx":2072
+ *             return self.__dict__[name]
+ *         else:
+ *             return self.getncattr(name)             # <<<<<<<<<<<<<<
+ * 
+ *     def renameAttribute(self, oldname, newname):
  */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
-          #endif
-          /*try:*/ {
+    __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 = 2072; __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 = 2072; __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 = 2072; __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 = 2072; __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":936
- *         if att_len == 1:
- *             with nogil:
- *                 ierr = nc_get_att_string(_grpid, varid, attname, &stratt)             # <<<<<<<<<<<<<<
- *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
- *             return pstring
- */
-            __pyx_v_ierr = nc_get_att_string(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, (&__pyx_v_stratt));
-          }
-
-          /* "netCDF4.pyx":935
- *     elif att_type == NC_STRING:
- *         if att_len == 1:
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
- *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
- */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L17;
-            }
-            __pyx_L17:;
-          }
-      }
-
-      /* "netCDF4.pyx":937
- *             with nogil:
- *                 ierr = nc_get_att_string(_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 = 937; __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 = 937; __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 = 937; __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 = 937; __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 = 937; __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 = 937; __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 = 937; __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__26, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __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":938
- *                 ierr = nc_get_att_string(_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":940
- *             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__27, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __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 = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    break;
-    default:
-
-    /* "netCDF4.pyx":943
- *     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":944
- *     # 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_L18;
-    }
-    __pyx_L18:;
-
-    /* "netCDF4.pyx":945
- *         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":946
- *             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 = 946; __pyx_clineno = __LINE__; goto __pyx_L19_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 = 946; __pyx_clineno = __LINE__; goto __pyx_L19_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_L26_try_end;
-      __pyx_L19_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":947
- *         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 = 947; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
-        __Pyx_GOTREF(__pyx_t_11);
-        __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_GOTREF(__pyx_t_7);
-
-        /* "netCDF4.pyx":949
- *         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":950
- *             # 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, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L29_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_L36_try_end;
-          __pyx_L29_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":951
- *             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 = 951; __pyx_clineno = __LINE__; goto __pyx_L31_except_error;}
-            __Pyx_GOTREF(__pyx_t_5);
-            __Pyx_GOTREF(__pyx_t_9);
-            __Pyx_GOTREF(__pyx_t_1);
-
-            /* "netCDF4.pyx":952
- *                 type_att = _read_compound(grp, att_type)
- *             except:
- *                 raise KeyError('attribute %s has unsupported datatype' % attname)             # <<<<<<<<<<<<<<
- *         value_arr = numpy.empty(att_len,type_att)
- *         with nogil:
- */
-            __pyx_t_18 = __Pyx_PyBytes_FromString(__pyx_v_attname); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L31_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 = 952; __pyx_clineno = __LINE__; goto __pyx_L31_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 = 952; __pyx_clineno = __LINE__; goto __pyx_L31_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 = 952; __pyx_clineno = __LINE__; goto __pyx_L31_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 = 952; __pyx_clineno = __LINE__; goto __pyx_L31_except_error;}
-          }
-          __pyx_L31_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_L21_except_error;
-          __pyx_L36_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_L20_exception_handled;
-      }
-      goto __pyx_L21_except_error;
-      __pyx_L21_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_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_L26_try_end:;
-    }
-
-    /* "netCDF4.pyx":953
- *             except:
- *                 raise KeyError('attribute %s has unsupported datatype' % attname)
- *         value_arr = numpy.empty(att_len,type_att)             # <<<<<<<<<<<<<<
- *         with nogil:
- *             ierr = nc_get_att(_grpid, varid, attname, value_arr.data)
- */
-    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __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 = 953; __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 = 953; __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 = 953; __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 = 953; __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 = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_7);
-    __pyx_t_7 = 0;
-
-    /* "netCDF4.pyx":954
- *                 raise KeyError('attribute %s has unsupported datatype' % attname)
- *         value_arr = numpy.empty(att_len,type_att)
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_get_att(_grpid, varid, attname, value_arr.data)
- *         if ierr != NC_NOERR:
- */
-    {
-        #ifdef WITH_THREAD
-        PyThreadState *_save;
-        Py_UNBLOCK_THREADS
-        #endif
-        /*try:*/ {
-
-          /* "netCDF4.pyx":955
- *         value_arr = numpy.empty(att_len,type_att)
- *         with nogil:
- *             ierr = nc_get_att(_grpid, varid, attname, value_arr.data)             # <<<<<<<<<<<<<<
- *         if ierr != NC_NOERR:
- *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-          __pyx_v_ierr = nc_get_att(__pyx_v__grpid, __pyx_v_varid, __pyx_v_attname, __pyx_v_value_arr->data);
-        }
-
-        /* "netCDF4.pyx":954
- *                 raise KeyError('attribute %s has unsupported datatype' % attname)
- *         value_arr = numpy.empty(att_len,type_att)
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_get_att(_grpid, varid, attname, value_arr.data)
- *         if ierr != NC_NOERR:
- */
-        /*finally:*/ {
-          /*normal exit:*/{
-            #ifdef WITH_THREAD
-            Py_BLOCK_THREADS
-            #endif
-            goto __pyx_L41;
-          }
-          __pyx_L41:;
-        }
-    }
-
-    /* "netCDF4.pyx":956
- *         with nogil:
- *             ierr = nc_get_att(_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":957
- *             ierr = nc_get_att(_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 = 957; __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 = 957; __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 = 957; __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 = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-
-    /* "netCDF4.pyx":958
- *         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 = 958; __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 = 958; __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 = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-    if (__pyx_t_4) {
-
-      /* "netCDF4.pyx":960
- *         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 = 960; __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 = 960; __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 = 960; __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":961
- *             # 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":963
- *         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 = 963; __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":965
- *             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":903
- *     return attslist
- * 
- * cdef _get_att(grp, int varid, name):             # <<<<<<<<<<<<<<
- *     # Private function to get an attribute value given its name
- *     cdef int ierr, n, _grpid
+  /* "netCDF4/_netCDF4.pyx":2056
+ *                 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_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_6);
-  __Pyx_XDECREF(__pyx_t_7);
   __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
   __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_AddTraceback("netCDF4._netCDF4.Dataset.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __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_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":967
- *             return value_arr
+/* "netCDF4/_netCDF4.pyx":2074
+ *             return self.getncattr(name)
  * 
- * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
- *     # Private function to set the netCDF file format
- *     if format == 'NETCDF4':
+ *     def renameAttribute(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameAttribute(self, oldname, newname)
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_59renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_58renameAttribute[] = "\nrenameAttribute(self, oldname, newname)\n\nrename a L{Dataset} or L{Group} attribute named C{oldname} to C{newname}.";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_59renameAttribute(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("_set_default_format (wrapper)", 0);
+  __Pyx_RefNannySetupContext("renameAttribute (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_format,0};
-    PyObject* values[1] = {0};
-    values[0] = ((PyObject *)__pyx_n_s_NETCDF4);
+    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;
@@ -17530,1065 +15716,722 @@ static PyObject *__pyx_pw_7netCDF4_19_set_default_format(PyObject *__pyx_self, P
       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 (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 = 2074; __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_default_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_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;
-      }
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
     }
-    __pyx_v_format = values[0];
+    __pyx_v_oldname = values[0];
+    __pyx_v_newname = values[1];
   }
   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 = 967; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("netCDF4._set_default_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.renameAttribute", __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);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_58renameAttribute(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
 
   /* 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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_58renameAttribute(struct __pyx_obj_7netCDF4_8_netCDF4_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
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
+  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("_set_default_format", 0);
+  __Pyx_RefNannySetupContext("renameAttribute", 0);
 
-  /* "netCDF4.pyx":969
- * 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':
+  /* "netCDF4/_netCDF4.pyx":2082
+ *         cdef char *oldnamec
+ *         cdef char *newnamec
+ *         bytestr = _strencode(oldname)             # <<<<<<<<<<<<<<
+ *         oldnamec = bytestr
+ *         bytestr = _strencode(newname)
  */
-  __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 = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-
-    /* "netCDF4.pyx":970
- *     # 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":971
- *     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 = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
+  __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_oldname, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":972
- *         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)
+  /* "netCDF4/_netCDF4.pyx":2083
+ *         cdef char *newnamec
+ *         bytestr = _strencode(oldname)
+ *         oldnamec = bytestr             # <<<<<<<<<<<<<<
+ *         bytestr = _strencode(newname)
+ *         newnamec = bytestr
  */
-    nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL);
-    goto __pyx_L3;
-  }
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_oldnamec = __pyx_t_2;
 
-  /* "netCDF4.pyx":973
- *     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':
+  /* "netCDF4/_netCDF4.pyx":2084
+ *         bytestr = _strencode(oldname)
+ *         oldnamec = bytestr
+ *         bytestr = _strencode(newname)             # <<<<<<<<<<<<<<
+ *         newnamec = bytestr
+ *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
  */
-  __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 = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
+  __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __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":974
- *         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)
+  /* "netCDF4/_netCDF4.pyx":2085
+ *         oldnamec = bytestr
+ *         bytestr = _strencode(newname)
+ *         newnamec = bytestr             # <<<<<<<<<<<<<<
+ *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
+ *         if ierr != NC_NOERR:
  */
-    nc_set_default_format(NC_FORMAT_64BIT, NULL);
-    goto __pyx_L3;
-  }
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_newnamec = __pyx_t_2;
 
-  /* "netCDF4.pyx":975
- *     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:
+  /* "netCDF4/_netCDF4.pyx":2086
+ *         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_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 = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
+  __pyx_v_ierr = nc_rename_att(__pyx_v_self->_grpid, NC_GLOBAL, __pyx_v_oldnamec, __pyx_v_newnamec);
 
-    /* "netCDF4.pyx":976
- *         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)
+  /* "netCDF4/_netCDF4.pyx":2087
+ *         newnamec = bytestr
+ *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
+ *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
  */
-    nc_set_default_format(NC_FORMAT_CLASSIC, NULL);
-    goto __pyx_L3;
-  }
-  /*else*/ {
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
 
-    /* "netCDF4.pyx":978
- *         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)             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":2088
+ *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
  * 
- * cdef _get_format(int grpid):
+ *     def renameGroup(self, oldname, newname):
  */
-    __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 = 978; __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 = 978; __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 = 978; __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 = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 2088; __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 = 2088; __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 = 2088; __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 = 2088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
 
-  /* "netCDF4.pyx":967
- *             return value_arr
+  /* "netCDF4/_netCDF4.pyx":2074
+ *             return self.getncattr(name)
  * 
- * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
- *     # Private function to set the netCDF file format
- *     if format == 'NETCDF4':
+ *     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_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("netCDF4._set_default_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4._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":980
- *         raise ValueError("format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'" % format)
+/* "netCDF4/_netCDF4.pyx":2090
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  * 
- * cdef _get_format(int grpid):             # <<<<<<<<<<<<<<
- *     # Private function to get the netCDF file format
- *     cdef int ierr, formatp
+ *     def renameGroup(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameGroup(self, oldname, newname)
  */
 
-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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_61renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_60renameGroup[] = "\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_8_netCDF4_7Dataset_61renameGroup(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;
-  __Pyx_RefNannySetupContext("_get_format", 0);
-
-  /* "netCDF4.pyx":983
- *     # Private function to get the netCDF file format
- *     cdef int ierr, formatp
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_format(grpid, &formatp)
- *     if ierr != NC_NOERR:
- */
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("renameGroup (wrapper)", 0);
   {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
-
-        /* "netCDF4.pyx":984
- *     cdef int ierr, formatp
- *     with nogil:
- *         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));
+    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;
       }
-
-      /* "netCDF4.pyx":983
- *     # Private function to get the netCDF file format
- *     cdef int ierr, formatp
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_format(grpid, &formatp)
- *     if ierr != NC_NOERR:
- */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L5;
+      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 = 2090; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
-        __pyx_L5:;
       }
+      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 = 2090; __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 = 2090; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.renameGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_60renameGroup(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
 
-  /* "netCDF4.pyx":985
- *     with nogil:
- *         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":986
- *         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 = 986; __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 = 986; __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 = 986; __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 = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-
-  /* "netCDF4.pyx":993
- *     elif formatp == NC_FORMAT_64BIT:
- *         return 'NETCDF3_64BIT'
- *     elif formatp == NC_FORMAT_CLASSIC:             # <<<<<<<<<<<<<<
- *         return 'NETCDF3_CLASSIC'
- * 
- */
-  switch (__pyx_v_formatp) {
-
-    /* "netCDF4.pyx":987
- *     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":988
- *         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":989
- *     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":990
- *         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":991
- *     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:
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":992
- *         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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_60renameGroup(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_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":993
- *     elif formatp == NC_FORMAT_64BIT:
- *         return 'NETCDF3_64BIT'
- *     elif formatp == NC_FORMAT_CLASSIC:             # <<<<<<<<<<<<<<
- *         return 'NETCDF3_CLASSIC'
- * 
+  /* "netCDF4/_netCDF4.pyx":2112
+ *             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."""
  */
-    case NC_FORMAT_CLASSIC:
+  __Pyx_INCREF(__pyx_kp_s_renameGroup_method_not_enabled);
+  __pyx_v_msg = __pyx_kp_s_renameGroup_method_not_enabled;
 
-    /* "netCDF4.pyx":994
- *         return 'NETCDF3_64BIT'
- *     elif formatp == NC_FORMAT_CLASSIC:
- *         return 'NETCDF3_CLASSIC'             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":2115
+ * 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)             # <<<<<<<<<<<<<<
  * 
- * cdef _get_full_format(int grpid):
+ *     def set_auto_maskandscale(self, value):
  */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_n_s_NETCDF3_CLASSIC);
-    __pyx_r = __pyx_n_s_NETCDF3_CLASSIC;
-    goto __pyx_L0;
-    break;
-    default: break;
-  }
+  __pyx_t_1 = PyTuple_New(1); 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_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 = 2115; __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 = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "netCDF4.pyx":980
- *         raise ValueError("format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'" % format)
+  /* "netCDF4/_netCDF4.pyx":2090
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  * 
- * cdef _get_format(int grpid):             # <<<<<<<<<<<<<<
- *     # Private function to get the netCDF file format
- *     cdef int ierr, formatp
+ *     def renameGroup(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameGroup(self, oldname, newname)
  */
 
   /* 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_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4._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":996
- *         return 'NETCDF3_CLASSIC'
+/* "netCDF4/_netCDF4.pyx":2117
+ *             raise ValueError(msg)
  * 
- * cdef _get_full_format(int grpid):             # <<<<<<<<<<<<<<
- *     # Private function to get the underlying disk format
- *     cdef int ierr, formatp, modep
+ *     def set_auto_maskandscale(self, value):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_maskandscale(self, True_or_False)
  */
 
-static PyObject *__pyx_f_7netCDF4__get_full_format(CYTHON_UNUSED int __pyx_v_grpid) {
-  PyObject *__pyx_r = NULL;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_63set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_62set_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 v [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_63set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_get_full_format", 0);
-
-  /* "netCDF4.pyx":1019
- *             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":996
- *         return 'NETCDF3_CLASSIC'
- * 
- * cdef _get_full_format(int grpid):             # <<<<<<<<<<<<<<
- *     # Private function to get the underlying disk format
- *     cdef int ierr, formatp, modep
- */
+  __Pyx_RefNannySetupContext("set_auto_maskandscale (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_62set_auto_maskandscale(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
   /* function exit code */
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":1021
- *         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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_62set_auto_maskandscale(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  char *__pyx_t_2;
+  PyObject *__pyx_t_2 = NULL;
   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_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;
-  nc_type __pyx_t_11;
+  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_att", 0);
-
-  /* "netCDF4.pyx":1027
- *     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 = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_bytestr = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "netCDF4.pyx":1028
- *     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 = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_attname = __pyx_t_2;
+  __Pyx_RefNannySetupContext("set_auto_maskandscale", 0);
 
-  /* "netCDF4.pyx":1030
- *     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.
+  /* "netCDF4/_netCDF4.pyx":2135
+ *         """
+ * 
+ *         for var in self.variables.values():             # <<<<<<<<<<<<<<
+ *             var.set_auto_maskandscale(value)
+ * 
  */
-  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __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 = 1030; __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_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2135; __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_4))) {
-    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+  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_4);
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
       __Pyx_INCREF(__pyx_t_3);
       __Pyx_INCREF(function);
-      __Pyx_DECREF_SET(__pyx_t_4, function);
+      __Pyx_DECREF_SET(__pyx_t_2, 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 = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
+  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 = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   } else {
-    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __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 = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __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 = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "netCDF4.pyx":1033
- *     # 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 = 1033; __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 = 1033; __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 = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_fmt = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "netCDF4.pyx":1034
- *     # 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 = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __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 = 1034; __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 = 1034; __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":1035
- *     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 = 1035; __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 = 1035; __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__29, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __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 = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_8) {
+  __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_7 = __pyx_t_8;
-    goto __pyx_L6_bool_binop_done;
+    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2135; __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 = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __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 = 1035; __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;
-  }
+  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 = 2135; __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 = 2135; __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 = 2135; __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 = 2135; __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 = 2135; __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":1036
- *     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.
+    /* "netCDF4/_netCDF4.pyx":2136
+ * 
+ *         for var in self.variables.values():
+ *             var.set_auto_maskandscale(value)             # <<<<<<<<<<<<<<
+ * 
+ *         for groups in _walk_grps(self):
  */
-  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_7 = __pyx_t_9;
-  __pyx_L6_bool_binop_done:;
-  if (__pyx_t_7) {
+    __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 = 2136; __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 = 2136; __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 = 2136; __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 = 2136; __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":1037
- *     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']:
+    /* "netCDF4/_netCDF4.pyx":2135
+ *         """
+ * 
+ *         for var in self.variables.values():             # <<<<<<<<<<<<<<
+ *             var.set_auto_maskandscale(value)
+ * 
  */
-    __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 = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __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 = 1037; __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:;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":1039
- *         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())
+  /* "netCDF4/_netCDF4.pyx":2138
+ *             var.set_auto_maskandscale(value)
+ * 
+ *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
+ *             for group in groups:
+ *                 for var in group.variables.values():
  */
-  __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 = 1039; __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 = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); 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_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 = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (!__pyx_t_9) {
+  __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 = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
   } else {
-    __pyx_t_7 = __pyx_t_9;
-    goto __pyx_L10_bool_binop_done;
+    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2138; __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 = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   }
-  __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 = 1039; __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":1040
- *     # 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 = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  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 = 2138; __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 = 1040; __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":1041
- *     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 = 1041; __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 = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2138; __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 = 2138; __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 = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
       } else {
-        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        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 = 2138; __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 = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
       }
-      __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 = 1041; __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 {
+      __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 = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
+      __Pyx_GOTREF(__pyx_t_2);
     }
-    /*else*/ {
+    __Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_2);
+    __pyx_t_2 = 0;
 
-      /* "netCDF4.pyx":1043
- *             dats = _strencode(value_arr.item())
- *         else:
- *             value_arr1 = value_arr.ravel()             # <<<<<<<<<<<<<<
- *             dats = _strencode(''.join(value_arr1.tolist()))
- *         lenarr = len(dats)
+    /* "netCDF4/_netCDF4.pyx":2139
+ * 
+ *         for groups in _walk_grps(self):
+ *             for group in groups:             # <<<<<<<<<<<<<<
+ *                 for var in group.variables.values():
+ *                     var.set_auto_maskandscale(value)
  */
-      __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 = 1043; __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 (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 = 2139; __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 = 2139; __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 = 2139; __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 = 2139; __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 = 2139; __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 = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
         }
-      }
-      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 = 1043; __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 = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_7);
       }
-      __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;
+      __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_7);
+      __pyx_t_7 = 0;
 
-      /* "netCDF4.pyx":1044
- *         else:
- *             value_arr1 = value_arr.ravel()
- *             dats = _strencode(''.join(value_arr1.tolist()))             # <<<<<<<<<<<<<<
- *         lenarr = len(dats)
- *         datstring = dats
+      /* "netCDF4/_netCDF4.pyx":2140
+ *         for groups in _walk_grps(self):
+ *             for group in groups:
+ *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
+ *                     var.set_auto_maskandscale(value)
+ * 
  */
-      __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 = 1044; __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_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2140; __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 = 2140; __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_1, function);
+          __Pyx_DECREF_SET(__pyx_t_6, 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 = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      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 = 2140; __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_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2140; __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__15, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __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 = 1044; __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":1045
- *             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 = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_lenarr = __pyx_t_10;
+      __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 = 2140; __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 = 2140; __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 = 2140; __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 = 2140; __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 = 2140; __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 = 2140; __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 = 2140; __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":1046
- *             dats = _strencode(''.join(value_arr1.tolist()))
- *         lenarr = len(dats)
- *         datstring = dats             # <<<<<<<<<<<<<<
- *         if lenarr == 0:
- *             # write null byte
+        /* "netCDF4/_netCDF4.pyx":2141
+ *             for group in groups:
+ *                 for var in group.variables.values():
+ *                     var.set_auto_maskandscale(value)             # <<<<<<<<<<<<<<
+ * 
+ * 
  */
-    __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_dats); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_datstring = __pyx_t_2;
+        __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 = 2141; __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 = 2141; __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 = 2141; __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 = 2141; __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":1047
- *         lenarr = len(dats)
- *         datstring = dats
- *         if lenarr == 0:             # <<<<<<<<<<<<<<
- *             # write null byte
- *             lenarr=1; datstring = '\x00'
+        /* "netCDF4/_netCDF4.pyx":2140
+ *         for groups in _walk_grps(self):
+ *             for group in groups:
+ *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
+ *                     var.set_auto_maskandscale(value)
+ * 
  */
-    __pyx_t_7 = ((__pyx_v_lenarr == 0) != 0);
-    if (__pyx_t_7) {
+      }
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-      /* "netCDF4.pyx":1049
- *         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:
+      /* "netCDF4/_netCDF4.pyx":2139
+ * 
+ *         for groups in _walk_grps(self):
+ *             for group in groups:             # <<<<<<<<<<<<<<
+ *                 for var in group.variables.values():
+ *                     var.set_auto_maskandscale(value)
  */
-      __pyx_v_lenarr = 1;
-      __pyx_v_datstring = __pyx_k__24;
-      goto __pyx_L13;
     }
-    __pyx_L13:;
-
-    /* "netCDF4.pyx":1050
- *             # 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 = 1050; __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 = 1050; __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":1051
- *             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) {
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-      /* "netCDF4.pyx":1052
- *         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:
+    /* "netCDF4/_netCDF4.pyx":2138
+ *             var.set_auto_maskandscale(value)
+ * 
+ *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
+ *             for group in groups:
+ *                 for var in group.variables.values():
  */
-      __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 = 1052; __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 = 1052; __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 = 1052; __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 = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    goto __pyx_L9;
   }
-  /*else*/ {
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":1055
- *     # 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 = 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_kind); 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_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 = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (__pyx_t_7) {
-
-      /* "netCDF4.pyx":1056
- *     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 = 1056; __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 = 1056; __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":1057
- *         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 = 1057; __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 = 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_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__31, 1, 0, 1); 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_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); 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_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 = 1057; __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":1058
- *             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 = 1058; __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 = 1058; __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 = 1058; __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__32, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __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 = 1058; __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 = 1058; __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 = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    /*else*/ {
-
-      /* "netCDF4.pyx":1060
- *             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 = 1060; __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 = 1060; __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 = 1060; __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__33, 1, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __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 = 1060; __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":1061
- *         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":1062
- *             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 = 1062; __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 = 1062; __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 = 1062; __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":1063
- *         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":1064
- *         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 = 1064; __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 = 1064; __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 = 1064; __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 = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-  }
-  __pyx_L9:;
-
-  /* "netCDF4.pyx":1021
- *         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
+  /* "netCDF4/_netCDF4.pyx":2117
+ *             raise ValueError(msg)
+ * 
+ *     def set_auto_maskandscale(self, value):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_maskandscale(self, True_or_False)
  */
 
   /* function exit code */
@@ -18596,3291 +16439,2167 @@ static PyObject *__pyx_f_7netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_v_va
   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._set_att", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_XDECREF(__pyx_t_13);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __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_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":1066
- *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+/* "netCDF4/_netCDF4.pyx":2144
  * 
- * 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}.
+ * 
+ *     def set_auto_mask(self, value):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_mask(self, True_or_False)
  */
 
-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;
-  int __pyx_v__grpid;
-  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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_65set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_64set_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 th [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_65set_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_8_netCDF4_7Dataset_64set_auto_mask(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_64set_auto_mask(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  int __pyx_t_2;
-  int __pyx_t_3;
-  char *__pyx_t_4;
-  PyObject *__pyx_t_5 = 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 = NULL;
-  Py_ssize_t __pyx_t_9;
-  PyObject *__pyx_t_10 = NULL;
-  PyObject *__pyx_t_11 = 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_t_14;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("_get_types", 0);
+  __Pyx_RefNannySetupContext("set_auto_mask", 0);
 
-  /* "netCDF4.pyx":1073
- *     cdef nc_type typeids[NC_MAX_VARS]
- *     cdef char namstring[NC_MAX_NAME+1]
- *     _grpid = group._grpid             # <<<<<<<<<<<<<<
- *     # get the number of user defined types in this group.
- *     with nogil:
+  /* "netCDF4/_netCDF4.pyx":2162
+ *         """
+ * 
+ *         for var in self.variables.values():             # <<<<<<<<<<<<<<
+ *             var.set_auto_mask(value)
+ * 
  */
-  __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 = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 2162; __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 = 2162; __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 = 2162; __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 = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 2162; __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 = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v__grpid = __pyx_t_2;
-
-  /* "netCDF4.pyx":1075
- *     _grpid = group._grpid
- *     # get the number of user defined types in this group.
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_typeids(_grpid, &ntypes, typeids)
- *     if ierr != NC_NOERR:
- */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
-
-        /* "netCDF4.pyx":1076
- *     # get the number of user defined types in this group.
- *     with nogil:
- *         ierr = nc_inq_typeids(_grpid, &ntypes, typeids)             # <<<<<<<<<<<<<<
- *     if ierr != NC_NOERR:
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-        __pyx_v_ierr = nc_inq_typeids(__pyx_v__grpid, (&__pyx_v_ntypes), __pyx_v_typeids);
+  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 = 2162; __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 = 2162; __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 = 2162; __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 = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
       }
-
-      /* "netCDF4.pyx":1075
- *     _grpid = group._grpid
- *     # get the number of user defined types in this group.
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_typeids(_grpid, &ntypes, typeids)
- *     if ierr != NC_NOERR:
- */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L5;
+    } 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 = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
-        __pyx_L5:;
+        break;
       }
-  }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
+    __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":1077
- *     with nogil:
- *         ierr = nc_inq_typeids(_grpid, &ntypes, typeids)
- *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *     # create empty dictionary for CompoundType instances.
+    /* "netCDF4/_netCDF4.pyx":2163
+ * 
+ *         for var in self.variables.values():
+ *             var.set_auto_mask(value)             # <<<<<<<<<<<<<<
+ * 
+ *         for groups in _walk_grps(self):
  */
-  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_3) {
+    __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 = 2163; __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 = 2163; __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 = 2163; __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 = 2163; __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":1078
- *         ierr = nc_inq_typeids(_grpid, &ntypes, typeids)
- *     if ierr != NC_NOERR:
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *     # create empty dictionary for CompoundType instances.
- *     cmptypes = OrderedDict()
+    /* "netCDF4/_netCDF4.pyx":2162
+ *         """
+ * 
+ *         for var in self.variables.values():             # <<<<<<<<<<<<<<
+ *             var.set_auto_mask(value)
+ * 
  */
-    __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 = 1078; __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 = 1078; __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 = 1078; __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 = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":1080
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *     # create empty dictionary for CompoundType instances.
- *     cmptypes = OrderedDict()             # <<<<<<<<<<<<<<
- *     vltypes = OrderedDict()
- *     if ntypes > 0:
+  /* "netCDF4/_netCDF4.pyx":2165
+ *             var.set_auto_mask(value)
+ * 
+ *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
+ *             for group in groups:
+ *                 for var in group.variables.values():
  */
-  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __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_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2165; __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_5, function);
+      __Pyx_DECREF_SET(__pyx_t_1, 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 = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  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 = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
   } else {
-    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); 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_5); __pyx_t_5 = 0;
-  __pyx_v_cmptypes = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "netCDF4.pyx":1081
- *     # 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 = 1081; __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);
-    }
+    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2165; __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 = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   }
-  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 = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2165; __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 = 2165; __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":1082
- *     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":1083
- *     vltypes = OrderedDict()
- *     if ntypes > 0:
- *         for n from 0 <= n < ntypes:             # <<<<<<<<<<<<<<
- *             xtype = typeids[n]
- *             with nogil:
- */
-    __pyx_t_2 = __pyx_v_ntypes;
-    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
-
-      /* "netCDF4.pyx":1084
- *     if ntypes > 0:
- *         for n from 0 <= n < ntypes:
- *             xtype = typeids[n]             # <<<<<<<<<<<<<<
- *             with nogil:
- *                 ierr = nc_inq_user_type(_grpid, xtype, namstring,
- */
-      __pyx_v_xtype = (__pyx_v_typeids[__pyx_v_n]);
+  __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 = 2165; __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 = 2165; __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 = 2165; __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 = 2165; __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 = 2165; __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":1085
- *         for n from 0 <= n < ntypes:
- *             xtype = typeids[n]
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_user_type(_grpid, xtype, namstring,
- *                                         NULL,NULL,NULL,&classp)
+    /* "netCDF4/_netCDF4.pyx":2166
+ * 
+ *         for groups in _walk_grps(self):
+ *             for group in groups:             # <<<<<<<<<<<<<<
+ *                 for var in group.variables.values():
+ *                     var.set_auto_mask(value)
  */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
+    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 = 2166; __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 = 2166; __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 = 2166; __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 = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           #endif
-          /*try:*/ {
-
-            /* "netCDF4.pyx":1086
- *             xtype = typeids[n]
- *             with nogil:
- *                 ierr = nc_inq_user_type(_grpid, xtype, namstring,             # <<<<<<<<<<<<<<
- *                                         NULL,NULL,NULL,&classp)
- *             if ierr != NC_NOERR:
- */
-            __pyx_v_ierr = nc_inq_user_type(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_namstring, NULL, NULL, NULL, (&__pyx_v_classp));
-          }
-
-          /* "netCDF4.pyx":1085
- *         for n from 0 <= n < ntypes:
- *             xtype = typeids[n]
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_user_type(_grpid, xtype, namstring,
- *                                         NULL,NULL,NULL,&classp)
- */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L14;
-            }
-            __pyx_L14:;
+        } 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 = 2166; __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 = 2166; __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 = 2166; __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":1088
- *                 ierr = nc_inq_user_type(_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
+      /* "netCDF4/_netCDF4.pyx":2167
+ *         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_v_ierr != NC_NOERR) != 0);
+      __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 = 2167; __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 = 2167; __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) {
-
-        /* "netCDF4.pyx":1089
- *                                         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 = 1089; __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 = 1089; __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 = 1089; __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 = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2167; __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 = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-
-      /* "netCDF4.pyx":1100
- *                     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":1090
- *             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":1091
- *                 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 = 1091; __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 = 1091; __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 = 2167; __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 = 1091; __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 = 1091; __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 = 1091; __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 = 1091; __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":1094
- *                 # 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_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":1095
- *                 # 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, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
-            __Pyx_GOTREF(__pyx_t_1);
-            __Pyx_XDECREF_SET(__pyx_v_cmptype, __pyx_t_1);
-            __pyx_t_1 = 0;
+        __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2167; __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 = 2167; __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 = 2167; __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 = 2167; __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 = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            #endif
           }
-          __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_L23_try_end;
-          __pyx_L16_error:;
-          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
-          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-          /* "netCDF4.pyx":1096
- *                 try:
- *                     cmptype = _read_compound(group, xtype)
- *                 except KeyError:             # <<<<<<<<<<<<<<
- *                     #print 'WARNING: unsupported compound type, skipping...'
- *                     continue
- */
-          __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
-          if (__pyx_t_14) {
-            __Pyx_AddTraceback("netCDF4._get_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
-            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
-            __Pyx_GOTREF(__pyx_t_1);
-            __Pyx_GOTREF(__pyx_t_6);
-            __Pyx_GOTREF(__pyx_t_10);
-
-            /* "netCDF4.pyx":1098
- *                 except KeyError:
- *                     #print 'WARNING: unsupported compound type, skipping...'
- *                     continue             # <<<<<<<<<<<<<<
- *                 cmptypes[name] = cmptype
- *             elif classp == NC_VLEN: # a vlen
- */
-            goto __pyx_L25_except_continue;
-            __pyx_L25_except_continue:;
-            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-            goto __pyx_L22_try_continue;
+        } 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 = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            }
+            break;
           }
-          goto __pyx_L18_except_error;
-          __pyx_L18_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_L22_try_continue:;
-          __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_L8_continue;
-          __pyx_L23_try_end:;
+          __Pyx_GOTREF(__pyx_t_7);
         }
+        __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_7);
+        __pyx_t_7 = 0;
 
-        /* "netCDF4.pyx":1099
- *                     #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 = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        break;
-
-        /* "netCDF4.pyx":1100
- *                     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":1101
- *                 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.
+        /* "netCDF4/_netCDF4.pyx":2168
+ *             for group in groups:
+ *                 for var in group.variables.values():
+ *                     var.set_auto_mask(value)             # <<<<<<<<<<<<<<
+ * 
+ *     def set_auto_scale(self, value):
  */
-        __pyx_t_6 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __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 = 1101; __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 = 1101; __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 = 1101; __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_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_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 = 2168; __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_1, function);
-            __pyx_t_9 = 1;
+            __Pyx_DECREF_SET(__pyx_t_3, function);
           }
         }
-        __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __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;
+        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 = 2168; __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 = 2168; __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 = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
         }
-        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_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __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_XDECREF_SET(__pyx_v_name, __pyx_t_10);
-        __pyx_t_10 = 0;
-
-        /* "netCDF4.pyx":1104
- *                 # 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_13, &__pyx_t_12, &__pyx_t_11);
-          __Pyx_XGOTREF(__pyx_t_13);
-          __Pyx_XGOTREF(__pyx_t_12);
-          __Pyx_XGOTREF(__pyx_t_11);
-          /*try:*/ {
-
-            /* "netCDF4.pyx":1105
- *                 # create a VLType instance from it.
- *                 try:
- *                     vltype = _read_vlen(group, xtype)             # <<<<<<<<<<<<<<
- *                 except KeyError:
- *                     #print 'WARNING: unsupported VLEN type, skipping...'
- */
-            __pyx_t_10 = __pyx_f_7netCDF4__read_vlen(__pyx_v_group, __pyx_v_xtype, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L26_error;}
-            __Pyx_GOTREF(__pyx_t_10);
-            __Pyx_XDECREF_SET(__pyx_v_vltype, __pyx_t_10);
-            __pyx_t_10 = 0;
-          }
-          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
-          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
-          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-          goto __pyx_L33_try_end;
-          __pyx_L26_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":1106
- *                 try:
- *                     vltype = _read_vlen(group, xtype)
- *                 except KeyError:             # <<<<<<<<<<<<<<
- *                     #print 'WARNING: unsupported VLEN type, skipping...'
- *                     continue
- */
-          __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
-          if (__pyx_t_14) {
-            __Pyx_AddTraceback("netCDF4._get_types", __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 = 1106; __pyx_clineno = __LINE__; goto __pyx_L28_except_error;}
-            __Pyx_GOTREF(__pyx_t_10);
-            __Pyx_GOTREF(__pyx_t_1);
-            __Pyx_GOTREF(__pyx_t_8);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-            /* "netCDF4.pyx":1108
- *                 except KeyError:
- *                     #print 'WARNING: unsupported VLEN type, skipping...'
- *                     continue             # <<<<<<<<<<<<<<
- *                 vltypes[name] = vltype
- *                 pass
+        /* "netCDF4/_netCDF4.pyx":2167
+ *         for groups in _walk_grps(self):
+ *             for group in groups:
+ *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
+ *                     var.set_auto_mask(value)
+ * 
  */
-            goto __pyx_L35_except_continue;
-            __pyx_L35_except_continue:;
-            __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_L32_try_continue;
-          }
-          goto __pyx_L28_except_error;
-          __pyx_L28_except_error:;
-          __Pyx_XGIVEREF(__pyx_t_13);
-          __Pyx_XGIVEREF(__pyx_t_12);
-          __Pyx_XGIVEREF(__pyx_t_11);
-          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
-          goto __pyx_L1_error;
-          __pyx_L32_try_continue:;
-          __Pyx_XGIVEREF(__pyx_t_13);
-          __Pyx_XGIVEREF(__pyx_t_12);
-          __Pyx_XGIVEREF(__pyx_t_11);
-          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
-          goto __pyx_L8_continue;
-          __pyx_L33_try_end:;
-        }
+      }
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-        /* "netCDF4.pyx":1109
- *                     #print 'WARNING: unsupported VLEN type, skipping...'
- *                     continue
- *                 vltypes[name] = vltype             # <<<<<<<<<<<<<<
- *                 pass
- *     return cmptypes, vltypes
+      /* "netCDF4/_netCDF4.pyx":2166
+ * 
+ *         for groups in _walk_grps(self):
+ *             for group in groups:             # <<<<<<<<<<<<<<
+ *                 for var in group.variables.values():
+ *                     var.set_auto_mask(value)
  */
-        if (unlikely(PyObject_SetItem(__pyx_v_vltypes, __pyx_v_name, __pyx_v_vltype) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        break;
-        default: break;
-      }
-      __pyx_L8_continue:;
     }
-    goto __pyx_L7;
-  }
-  __pyx_L7:;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":1111
- *                 vltypes[name] = vltype
- *                 pass
- *     return cmptypes, vltypes             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":2165
+ *             var.set_auto_mask(value)
  * 
- * cdef _get_dims(group):
+ *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
+ *             for group in groups:
+ *                 for var in group.variables.values():
  */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_8);
-  __Pyx_INCREF(__pyx_v_cmptypes);
-  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_cmptypes);
-  __Pyx_GIVEREF(__pyx_v_cmptypes);
-  __Pyx_INCREF(__pyx_v_vltypes);
-  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_vltypes);
-  __Pyx_GIVEREF(__pyx_v_vltypes);
-  __pyx_r = __pyx_t_8;
-  __pyx_t_8 = 0;
-  goto __pyx_L0;
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":1066
- *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
+  /* "netCDF4/_netCDF4.pyx":2144
  * 
- * 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}.
+ * 
+ *     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_5);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_6);
   __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_AddTraceback("netCDF4._get_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_XDECREF(__pyx_t_13);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset.set_auto_mask", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __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_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":1113
- *     return cmptypes, vltypes
+/* "netCDF4/_netCDF4.pyx":2170
+ *                     var.set_auto_mask(value)
  * 
- * cdef _get_dims(group):             # <<<<<<<<<<<<<<
- *     # Private function to create L{Dimension} instances for all the
- *     # dimensions in a L{Group} or Dataset
+ *     def set_auto_scale(self, value):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_scale(self, True_or_False)
  */
 
-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__grpid;
-  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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_66set_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 funct [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67set_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_8_netCDF4_7Dataset_66set_auto_scale(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_66set_auto_scale(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  int __pyx_t_2;
-  int __pyx_t_3;
-  char *__pyx_t_4;
-  PyObject *__pyx_t_5 = 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 = NULL;
-  Py_ssize_t __pyx_t_9;
-  PyObject *__pyx_t_10 = 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("_get_dims", 0);
-
-  /* "netCDF4.pyx":1120
- *     cdef char namstring[NC_MAX_NAME+1]
- *     # get number of dimensions in this Group.
- *     _grpid = group._grpid             # <<<<<<<<<<<<<<
- *     with nogil:
- *         ierr = nc_inq_ndims(_grpid, &numdims)
- */
-  __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 = 1120; __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 = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v__grpid = __pyx_t_2;
+  __Pyx_RefNannySetupContext("set_auto_scale", 0);
 
-  /* "netCDF4.pyx":1121
- *     # get number of dimensions in this Group.
- *     _grpid = group._grpid
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_ndims(_grpid, &numdims)
- *     if ierr != NC_NOERR:
+  /* "netCDF4/_netCDF4.pyx":2188
+ *         """
+ * 
+ *         for var in self.variables.values():             # <<<<<<<<<<<<<<
+ *             var.set_auto_scale(value)
+ * 
  */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
-
-        /* "netCDF4.pyx":1122
- *     _grpid = group._grpid
- *     with nogil:
- *         ierr = nc_inq_ndims(_grpid, &numdims)             # <<<<<<<<<<<<<<
- *     if ierr != NC_NOERR:
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-        __pyx_v_ierr = nc_inq_ndims(__pyx_v__grpid, (&__pyx_v_numdims));
+  __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 = 2188; __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 = 2188; __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 = 2188; __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 = 2188; __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 = 2188; __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 = 2188; __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 = 2188; __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 = 2188; __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 = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
       }
-
-      /* "netCDF4.pyx":1121
- *     # get number of dimensions in this Group.
- *     _grpid = group._grpid
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_ndims(_grpid, &numdims)
- *     if ierr != NC_NOERR:
- */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L5;
+    } 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 = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
-        __pyx_L5:;
+        break;
       }
-  }
+      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
+    __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":1123
- *     with nogil:
- *         ierr = nc_inq_ndims(_grpid, &numdims)
- *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *     # create empty dictionary for dimensions.
+    /* "netCDF4/_netCDF4.pyx":2189
+ * 
+ *         for var in self.variables.values():
+ *             var.set_auto_scale(value)             # <<<<<<<<<<<<<<
+ * 
+ *         for groups in _walk_grps(self):
  */
-  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_3) {
+    __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 = 2189; __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 = 2189; __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 = 2189; __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 = 2189; __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":1124
- *         ierr = nc_inq_ndims(_grpid, &numdims)
- *     if ierr != NC_NOERR:
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *     # create empty dictionary for dimensions.
- *     dimensions = OrderedDict()
+    /* "netCDF4/_netCDF4.pyx":2188
+ *         """
+ * 
+ *         for var in self.variables.values():             # <<<<<<<<<<<<<<
+ *             var.set_auto_scale(value)
+ * 
  */
-    __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 = 1124; __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 = 1124; __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 = 1124; __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 = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":1126
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *     # create empty dictionary for dimensions.
- *     dimensions = OrderedDict()             # <<<<<<<<<<<<<<
- *     if numdims > 0:
- *         if group.data_model == 'NETCDF4':
+  /* "netCDF4/_netCDF4.pyx":2191
+ *             var.set_auto_scale(value)
+ * 
+ *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
+ *             for group in groups:
+ *                 for var in group.variables.values():
  */
-  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __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_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2191; __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_5, function);
+      __Pyx_DECREF_SET(__pyx_t_1, 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 = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  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 = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
   } else {
-    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2191; __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 = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   }
-  __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":1127
- *     # create empty dictionary for dimensions.
- *     dimensions = OrderedDict()
- *     if numdims > 0:             # <<<<<<<<<<<<<<
- *         if group.data_model == 'NETCDF4':
- *             with nogil:
- */
-  __pyx_t_3 = ((__pyx_v_numdims > 0) != 0);
-  if (__pyx_t_3) {
-
-    /* "netCDF4.pyx":1128
- *     dimensions = OrderedDict()
- *     if numdims > 0:
- *         if group.data_model == 'NETCDF4':             # <<<<<<<<<<<<<<
- *             with nogil:
- *                 ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0)
- */
-    __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 = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 2191; __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 = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (__pyx_t_3) {
+    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2191; __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 = 2191; __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 = 2191; __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 = 2191; __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 = 2191; __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 = 2191; __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":1129
- *     if numdims > 0:
- *         if group.data_model == 'NETCDF4':
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0)
- *             if ierr != NC_NOERR:
+    /* "netCDF4/_netCDF4.pyx":2192
+ * 
+ *         for groups in _walk_grps(self):
+ *             for group in groups:             # <<<<<<<<<<<<<<
+ *                 for var in group.variables.values():
+ *                     var.set_auto_scale(value)
  */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
+    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 = 2192; __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 = 2192; __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 = 2192; __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 = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           #endif
-          /*try:*/ {
-
-            /* "netCDF4.pyx":1130
- *         if group.data_model == 'NETCDF4':
- *             with nogil:
- *                 ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0)             # <<<<<<<<<<<<<<
- *             if ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-            __pyx_v_ierr = nc_inq_dimids(__pyx_v__grpid, (&__pyx_v_numdims), __pyx_v_dimids, 0);
+        } 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 = 2192; __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 = 2192; __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 = 2192; __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":1129
- *     if numdims > 0:
- *         if group.data_model == 'NETCDF4':
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0)
- *             if ierr != NC_NOERR:
+      /* "netCDF4/_netCDF4.pyx":2193
+ *         for groups in _walk_grps(self):
+ *             for group in groups:
+ *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
+ *                     var.set_auto_scale(value)
+ * 
  */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L11;
+      __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 = 2193; __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 = 2193; __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 = 2193; __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 = 2193; __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 = 2193; __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 = 2193; __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 = 2193; __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 = 2193; __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 = 2193; __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 = 2193; __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 = 2193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
             }
-            __pyx_L11:;
+            break;
           }
-      }
+          __Pyx_GOTREF(__pyx_t_7);
+        }
+        __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_7);
+        __pyx_t_7 = 0;
 
-      /* "netCDF4.pyx":1131
- *             with nogil:
- *                 ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0)
- *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         else:
+        /* "netCDF4/_netCDF4.pyx":2194
+ *             for group in groups:
+ *                 for var in group.variables.values():
+ *                     var.set_auto_scale(value)             # <<<<<<<<<<<<<<
+ * 
+ * 
  */
-      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-      if (__pyx_t_3) {
+        __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 = 2194; __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 = 2194; __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 = 2194; __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 = 2194; __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":1132
- *                 ierr = nc_inq_dimids(_grpid, &numdims, dimids, 0)
- *             if ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *         else:
- *             for n from 0 <= n < numdims:
+        /* "netCDF4/_netCDF4.pyx":2193
+ *         for groups in _walk_grps(self):
+ *             for group in groups:
+ *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
+ *                     var.set_auto_scale(value)
+ * 
  */
-        __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 = 1132; __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 = 1132; __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 = 1132; __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 = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-      goto __pyx_L8;
-    }
-    /*else*/ {
-
-      /* "netCDF4.pyx":1134
- *                 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++) {
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-        /* "netCDF4.pyx":1135
- *         else:
- *             for n from 0 <= n < numdims:
- *                 dimids[n] = n             # <<<<<<<<<<<<<<
- *         for n from 0 <= n < numdims:
- *             with nogil:
+      /* "netCDF4/_netCDF4.pyx":2192
+ * 
+ *         for groups in _walk_grps(self):
+ *             for group in groups:             # <<<<<<<<<<<<<<
+ *                 for var in group.variables.values():
+ *                     var.set_auto_scale(value)
  */
-        (__pyx_v_dimids[__pyx_v_n]) = __pyx_v_n;
-      }
     }
-    __pyx_L8:;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "netCDF4.pyx":1136
- *             for n from 0 <= n < numdims:
- *                 dimids[n] = n
- *         for n from 0 <= n < numdims:             # <<<<<<<<<<<<<<
- *             with nogil:
- *                 ierr = nc_inq_dimname(_grpid, dimids[n], namstring)
+    /* "netCDF4/_netCDF4.pyx":2191
+ *             var.set_auto_scale(value)
+ * 
+ *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
+ *             for group in groups:
+ *                 for var in group.variables.values():
  */
-    __pyx_t_2 = __pyx_v_numdims;
-    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-      /* "netCDF4.pyx":1137
- *                 dimids[n] = n
- *         for n from 0 <= n < numdims:
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_dimname(_grpid, dimids[n], namstring)
- *             if ierr != NC_NOERR:
+  /* "netCDF4/_netCDF4.pyx":2170
+ *                     var.set_auto_mask(value)
+ * 
+ *     def set_auto_scale(self, value):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_scale(self, True_or_False)
  */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
-          #endif
-          /*try:*/ {
 
-            /* "netCDF4.pyx":1138
- *         for n from 0 <= n < numdims:
- *             with nogil:
- *                 ierr = nc_inq_dimname(_grpid, dimids[n], namstring)             # <<<<<<<<<<<<<<
- *             if ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-            __pyx_v_ierr = nc_inq_dimname(__pyx_v__grpid, (__pyx_v_dimids[__pyx_v_n]), __pyx_v_namstring);
-          }
+  /* 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._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":1137
- *                 dimids[n] = n
- *         for n from 0 <= n < numdims:
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_dimname(_grpid, dimids[n], namstring)
- *             if ierr != NC_NOERR:
+/* "netCDF4/_netCDF4.pyx":1471
+ * 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,\
  */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L21;
-            }
-            __pyx_L21:;
-          }
-      }
 
-      /* "netCDF4.pyx":1139
- *             with nogil:
- *                 ierr = nc_inq_dimname(_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":1140
- *                 ierr = nc_inq_dimname(_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 = 1140; __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 = 1140; __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 = 1140; __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 = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-
-      /* "netCDF4.pyx":1141
- *             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 = 1141; __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 = 1141; __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 = 1141; __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 = 1141; __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 = 1141; __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 = 1141; __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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_6_grpid_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_6_grpid___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-      /* "netCDF4.pyx":1142
- *                 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 = 1142; __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 = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __pyx_t_10 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_n])); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __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 = 1142; __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_Dimension)), __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __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_dimensions, __pyx_v_name, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    }
-    goto __pyx_L7;
-  }
-  __pyx_L7:;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":1143
- *             name = namstring.decode(default_encoding,unicode_error)
- *             dimensions[name] = Dimension(group, name, id=dimids[n])
- *     return dimensions             # <<<<<<<<<<<<<<
- * 
- * cdef _get_grps(group):
- */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6_grpid___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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_INCREF(__pyx_v_dimensions);
-  __pyx_r = __pyx_v_dimensions;
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __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":1113
- *     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_7);
-  __Pyx_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_AddTraceback("netCDF4._get_dims", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset._grpid.__get__", __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":1145
- *     return dimensions
- * 
- * cdef _get_grps(group):             # <<<<<<<<<<<<<<
- *     # Private function to create L{Group} instances for all the
- *     # groups in a L{Group} or Dataset
- */
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_6_grpid_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-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__grpid;
-  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;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6_grpid_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
   __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_t_1;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("_get_grps", 0);
-
-  /* "netCDF4.pyx":1152
- *     cdef char namstring[NC_MAX_NAME+1]
- *     # get number of groups in this Group.
- *     _grpid = group._grpid             # <<<<<<<<<<<<<<
- *     with nogil:
- *         ierr = nc_inq_grps(_grpid, &numgrps, NULL)
- */
-  __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 = 1152; __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 = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v__grpid = __pyx_t_2;
-
-  /* "netCDF4.pyx":1153
- *     # get number of groups in this Group.
- *     _grpid = group._grpid
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_grps(_grpid, &numgrps, NULL)
- *     if ierr != NC_NOERR:
- */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
+  __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 = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_grpid = __pyx_t_1;
 
-        /* "netCDF4.pyx":1154
- *     _grpid = group._grpid
- *     with nogil:
- *         ierr = nc_inq_grps(_grpid, &numgrps, NULL)             # <<<<<<<<<<<<<<
- *     if ierr != NC_NOERR:
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-        __pyx_v_ierr = nc_inq_grps(__pyx_v__grpid, (&__pyx_v_numgrps), NULL);
-      }
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset._grpid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1153
- *     # get number of groups in this Group.
- *     _grpid = group._grpid
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_grps(_grpid, &numgrps, NULL)
- *     if ierr != NC_NOERR:
+/* "netCDF4/_netCDF4.pyx":1472
+ *     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, \
  */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L5;
-        }
-        __pyx_L5:;
-      }
-  }
 
-  /* "netCDF4.pyx":1155
- *     with nogil:
- *         ierr = nc_inq_grps(_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) {
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_7_isopen_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_7_isopen___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-    /* "netCDF4.pyx":1156
- *         ierr = nc_inq_grps(_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 = 1156; __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 = 1156; __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 = 1156; __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 = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":1158
- *         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 = 1158; __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 = 1158; __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 = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_7_isopen___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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 = 1472; __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_r = __pyx_t_1;
   __pyx_t_1 = 0;
+  goto __pyx_L0;
 
-  /* "netCDF4.pyx":1159
- *     # create dictionary containing L{Group} instances for groups in this group
- *     groups = OrderedDict()
- *     if numgrps > 0:             # <<<<<<<<<<<<<<
- *         grpids = <int *>malloc(sizeof(int) * numgrps)
- *         with nogil:
- */
-  __pyx_t_3 = ((__pyx_v_numgrps > 0) != 0);
-  if (__pyx_t_3) {
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset._isopen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":1160
- *     groups = OrderedDict()
- *     if numgrps > 0:
- *         grpids = <int *>malloc(sizeof(int) * numgrps)             # <<<<<<<<<<<<<<
- *         with nogil:
- *             ierr = nc_inq_grps(_grpid, NULL, grpids)
- */
-    __pyx_v_grpids = ((int *)malloc(((sizeof(int)) * __pyx_v_numgrps)));
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_7_isopen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_7_isopen_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-    /* "netCDF4.pyx":1161
- *     if numgrps > 0:
- *         grpids = <int *>malloc(sizeof(int) * numgrps)
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_grps(_grpid, NULL, grpids)
- *         if ierr != NC_NOERR:
- */
-    {
-        #ifdef WITH_THREAD
-        PyThreadState *_save;
-        Py_UNBLOCK_THREADS
-        #endif
-        /*try:*/ {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":1162
- *         grpids = <int *>malloc(sizeof(int) * numgrps)
- *         with nogil:
- *             ierr = nc_inq_grps(_grpid, NULL, grpids)             # <<<<<<<<<<<<<<
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-          __pyx_v_ierr = nc_inq_grps(__pyx_v__grpid, NULL, __pyx_v_grpids);
-        }
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_7_isopen_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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 = 1472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_isopen = __pyx_t_1;
 
-        /* "netCDF4.pyx":1161
- *     if numgrps > 0:
- *         grpids = <int *>malloc(sizeof(int) * numgrps)
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_grps(_grpid, NULL, grpids)
- *         if ierr != NC_NOERR:
- */
-        /*finally:*/ {
-          /*normal exit:*/{
-            #ifdef WITH_THREAD
-            Py_BLOCK_THREADS
-            #endif
-            goto __pyx_L10;
-          }
-          __pyx_L10:;
-        }
-    }
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dataset._isopen.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":1163
- *         with nogil:
- *             ierr = nc_inq_grps(_grpid, NULL, grpids)
- *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         for n from 0 <= n < numgrps:
+/* "netCDF4/_netCDF4.pyx":1473
+ *     cdef public int _grpid
+ *     cdef public int _isopen
+ *     cdef public groups, dimensions, variables, disk_format, path, parent,\             # <<<<<<<<<<<<<<
+ *     file_format, data_model, cmptypes, vltypes, keepweakref, \
+ *     __orthogonal_indexing__
  */
-    __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-    if (__pyx_t_3) {
 
-      /* "netCDF4.pyx":1164
- *             ierr = nc_inq_grps(_grpid, NULL, grpids)
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *         for n from 0 <= n < numgrps:
- *             with nogil:
- */
-      __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 = 1164; __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 = 1164; __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 = 1164; __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 = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_6groups_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_6groups_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6groups___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-    /* "netCDF4.pyx":1165
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         for n from 0 <= n < numgrps:             # <<<<<<<<<<<<<<
- *             with nogil:
- *                 ierr = nc_inq_grpname(grpids[n], namstring)
- */
-    __pyx_t_2 = __pyx_v_numgrps;
-    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1166
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         for n from 0 <= n < numgrps:
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_grpname(grpids[n], namstring)
- *             if ierr != NC_NOERR:
- */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
-          #endif
-          /*try:*/ {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6groups___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-            /* "netCDF4.pyx":1167
- *         for n from 0 <= n < numgrps:
- *             with nogil:
- *                 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);
-          }
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":1166
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         for n from 0 <= n < numgrps:
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_grpname(grpids[n], namstring)
- *             if ierr != NC_NOERR:
- */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L18;
-            }
-            __pyx_L18:;
-          }
-      }
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6groups_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_6groups_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-      /* "netCDF4.pyx":1168
- *             with nogil:
- *                 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) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-        /* "netCDF4.pyx":1169
- *                 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 = 1169; __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 = 1169; __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 = 1169; __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 = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6groups_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-      /* "netCDF4.pyx":1170
- *             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 = 1170; __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 = 1170; __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 = 1170; __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 = 1170; __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 = 1170; __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 = 1170; __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":1171
- *                 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 = 1171; __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 = 1171; __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 = 1171; __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 = 1171; __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 = 1171; __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 = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    }
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":1172
- *             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_L7;
-  }
-  __pyx_L7:;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6groups_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6groups_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6groups_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-  /* "netCDF4.pyx":1173
- *             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;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":1145
- *     return dimensions
- * 
- * cdef _get_grps(group):             # <<<<<<<<<<<<<<
- *     # Private function to create L{Group} instances for all the
- *     # groups in a L{Group} or Dataset
- */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6groups_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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_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":1175
- *     return groups
- * 
- * cdef _get_vars(group):             # <<<<<<<<<<<<<<
- *     # Private function to create L{Variable} instances for all the
- *     # variables in a L{Group} or Dataset
- */
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_10dimensions_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_10dimensions_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_10dimensions___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-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_iendian;
-  int __pyx_v__grpid;
-  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_endianness = 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;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10dimensions___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
   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;
-  PyObject *__pyx_t_11 = NULL;
-  PyObject *__pyx_t_12 = NULL;
-  PyObject *__pyx_t_13 = NULL;
-  int __pyx_t_14;
-  int __pyx_t_15;
-  PyObject *__pyx_t_16 = NULL;
-  PyObject *__pyx_t_17 = NULL;
-  PyObject *__pyx_t_18 = NULL;
-  struct __pyx_opt_args_7netCDF4__read_compound __pyx_t_19;
-  struct __pyx_opt_args_7netCDF4__read_vlen __pyx_t_20;
-  PyObject *(*__pyx_t_21)(PyObject *);
-  PyObject *(*__pyx_t_22)(PyObject *);
-  int __pyx_t_23;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("_get_vars", 0);
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->dimensions);
+  __pyx_r = __pyx_v_self->dimensions;
+  goto __pyx_L0;
 
-  /* "netCDF4.pyx":1186
- *     cdef char namstring_cmp[NC_MAX_NAME+1]
- *     # get number of variables in this Group.
- *     _grpid = group._grpid             # <<<<<<<<<<<<<<
- *     with nogil:
- *         ierr = nc_inq_nvars(_grpid, &numvars)
- */
-  __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 = 1186; __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 = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v__grpid = __pyx_t_2;
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":1187
- *     # get number of variables in this Group.
- *     _grpid = group._grpid
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_nvars(_grpid, &numvars)
- *     if ierr != NC_NOERR:
- */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_10dimensions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_10dimensions_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-        /* "netCDF4.pyx":1188
- *     _grpid = group._grpid
- *     with nogil:
- *         ierr = nc_inq_nvars(_grpid, &numvars)             # <<<<<<<<<<<<<<
- *     if ierr != NC_NOERR:
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-        __pyx_v_ierr = nc_inq_nvars(__pyx_v__grpid, (&__pyx_v_numvars));
-      }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1187
- *     # get number of variables in this Group.
- *     _grpid = group._grpid
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_nvars(_grpid, &numvars)
- *     if ierr != NC_NOERR:
- */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L5;
-        }
-        __pyx_L5:;
-      }
-  }
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_10dimensions_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-  /* "netCDF4.pyx":1189
- *     with nogil:
- *         ierr = nc_inq_nvars(_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) {
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":1190
- *         ierr = nc_inq_nvars(_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 = 1190; __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 = 1190; __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 = 1190; __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 = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_10dimensions_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_10dimensions_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_10dimensions_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-  /* "netCDF4.pyx":1192
- *         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 = 1192; __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 = 1192; __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 = 1192; __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;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":1193
- *     # 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) {
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_10dimensions_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-    /* "netCDF4.pyx":1195
- *     if numvars > 0:
- *         # get variable ids.
- *         varids = <int *>malloc(sizeof(int) * numvars)             # <<<<<<<<<<<<<<
- *         if group.data_model == 'NETCDF4':
- *             with nogil:
- */
-    __pyx_v_varids = ((int *)malloc(((sizeof(int)) * __pyx_v_numvars)));
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":1196
- *         # get variable ids.
- *         varids = <int *>malloc(sizeof(int) * numvars)
- *         if group.data_model == 'NETCDF4':             # <<<<<<<<<<<<<<
- *             with nogil:
- *                 ierr = nc_inq_varids(_grpid, &numvars, varids)
- */
-    __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 = 1196; __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 = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (__pyx_t_3) {
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_9variables_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_9variables_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_9variables___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-      /* "netCDF4.pyx":1197
- *         varids = <int *>malloc(sizeof(int) * numvars)
- *         if group.data_model == 'NETCDF4':
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_varids(_grpid, &numvars, varids)
- *             if ierr != NC_NOERR:
- */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
-          #endif
-          /*try:*/ {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-            /* "netCDF4.pyx":1198
- *         if group.data_model == 'NETCDF4':
- *             with nogil:
- *                 ierr = nc_inq_varids(_grpid, &numvars, varids)             # <<<<<<<<<<<<<<
- *             if ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-            __pyx_v_ierr = nc_inq_varids(__pyx_v__grpid, (&__pyx_v_numvars), __pyx_v_varids);
-          }
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_9variables___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-          /* "netCDF4.pyx":1197
- *         varids = <int *>malloc(sizeof(int) * numvars)
- *         if group.data_model == 'NETCDF4':
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_varids(_grpid, &numvars, varids)
- *             if ierr != NC_NOERR:
- */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L11;
-            }
-            __pyx_L11:;
-          }
-      }
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1199
- *             with nogil:
- *                 ierr = nc_inq_varids(_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) {
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_9variables_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_9variables_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-        /* "netCDF4.pyx":1200
- *                 ierr = nc_inq_varids(_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 = 1200; __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 = 1200; __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 = 1200; __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 = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      goto __pyx_L8;
-    }
-    /*else*/ {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1202
- *                 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++) {
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_9variables_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-        /* "netCDF4.pyx":1203
- *         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_L8:;
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":1205
- *                 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++) {
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_9variables_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_9variables_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_9variables_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-      /* "netCDF4.pyx":1206
- *         # loop over variables.
- *         for n from 0 <= n < numvars:
- *              varid = varids[n]             # <<<<<<<<<<<<<<
- *              # get variable name.
- *              with nogil:
- */
-      __pyx_v_varid = (__pyx_v_varids[__pyx_v_n]);
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1208
- *              varid = varids[n]
- *              # get variable name.
- *              with nogil:             # <<<<<<<<<<<<<<
- *                  ierr = nc_inq_varname(_grpid, varid, namstring)
- *              if ierr != NC_NOERR:
- */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
-          #endif
-          /*try:*/ {
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_9variables_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-            /* "netCDF4.pyx":1209
- *              # get variable name.
- *              with nogil:
- *                  ierr = nc_inq_varname(_grpid, varid, namstring)             # <<<<<<<<<<<<<<
- *              if ierr != NC_NOERR:
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-            __pyx_v_ierr = nc_inq_varname(__pyx_v__grpid, __pyx_v_varid, __pyx_v_namstring);
-          }
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":1208
- *              varid = varids[n]
- *              # get variable name.
- *              with nogil:             # <<<<<<<<<<<<<<
- *                  ierr = nc_inq_varname(_grpid, varid, namstring)
- *              if ierr != NC_NOERR:
- */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L21;
-            }
-            __pyx_L21:;
-          }
-      }
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_11disk_format_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_11disk_format___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-      /* "netCDF4.pyx":1210
- *              with nogil:
- *                  ierr = nc_inq_varname(_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) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-        /* "netCDF4.pyx":1211
- *                  ierr = nc_inq_varname(_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 = 1211; __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 = 1211; __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 = 1211; __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 = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_11disk_format___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-      /* "netCDF4.pyx":1212
- *              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 = 1212; __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 = 1212; __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 = 1212; __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 = 1212; __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 = 1212; __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 = 1212; __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;
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1213
- *                  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) {
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11disk_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_11disk_format_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-        /* "netCDF4.pyx":1214
- *              name = namstring.decode(default_encoding,unicode_error)
- *              if ierr != NC_NOERR:
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *              # get variable type.
- *              with nogil:
- */
-        __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 = 1214; __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 = 1214; __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 = 1214; __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 = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1216
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *              # get variable type.
- *              with nogil:             # <<<<<<<<<<<<<<
- *                  ierr = nc_inq_vartype(_grpid, varid, &xtype)
- *              if ierr != NC_NOERR:
- */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
-          #endif
-          /*try:*/ {
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11disk_format_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-            /* "netCDF4.pyx":1217
- *              # get variable type.
- *              with nogil:
- *                  ierr = nc_inq_vartype(_grpid, varid, &xtype)             # <<<<<<<<<<<<<<
- *              if ierr != NC_NOERR:
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-            __pyx_v_ierr = nc_inq_vartype(__pyx_v__grpid, __pyx_v_varid, (&__pyx_v_xtype));
-          }
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":1216
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *              # get variable type.
- *              with nogil:             # <<<<<<<<<<<<<<
- *                  ierr = nc_inq_vartype(_grpid, varid, &xtype)
- *              if ierr != NC_NOERR:
- */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L28;
-            }
-            __pyx_L28:;
-          }
-      }
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11disk_format_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11disk_format_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11disk_format_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-      /* "netCDF4.pyx":1218
- *              with nogil:
- *                  ierr = nc_inq_vartype(_grpid, varid, &xtype)
- *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *              # get endian-ness of variable.
- */
-      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-      if (__pyx_t_3) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-        /* "netCDF4.pyx":1219
- *                  ierr = nc_inq_vartype(_grpid, varid, &xtype)
- *              if ierr != NC_NOERR:
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *              # get endian-ness of variable.
- *              endianness = None
- */
-        __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;}
-      }
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11disk_format_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-      /* "netCDF4.pyx":1221
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *              # get endian-ness of variable.
- *              endianness = None             # <<<<<<<<<<<<<<
- *              with nogil:
- *                  ierr = nc_inq_var_endian(_grpid, varid, &iendian)
- */
-      __Pyx_INCREF(Py_None);
-      __Pyx_XDECREF_SET(__pyx_v_endianness, Py_None);
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1222
- *              # get endian-ness of variable.
- *              endianness = None
- *              with nogil:             # <<<<<<<<<<<<<<
- *                  ierr = nc_inq_var_endian(_grpid, varid, &iendian)
- *              if ierr == NC_NOERR:
- */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
-          #endif
-          /*try:*/ {
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_4path_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_4path_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_4path___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-            /* "netCDF4.pyx":1223
- *              endianness = None
- *              with nogil:
- *                  ierr = nc_inq_var_endian(_grpid, varid, &iendian)             # <<<<<<<<<<<<<<
- *              if ierr == NC_NOERR:
- *                  if iendian == NC_ENDIAN_LITTLE:
- */
-            __pyx_v_ierr = nc_inq_var_endian(__pyx_v__grpid, __pyx_v_varid, (&__pyx_v_iendian));
-          }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":1222
- *              # get endian-ness of variable.
- *              endianness = None
- *              with nogil:             # <<<<<<<<<<<<<<
- *                  ierr = nc_inq_var_endian(_grpid, varid, &iendian)
- *              if ierr == NC_NOERR:
- */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L34;
-            }
-            __pyx_L34:;
-          }
-      }
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_4path___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-      /* "netCDF4.pyx":1224
- *              with nogil:
- *                  ierr = nc_inq_var_endian(_grpid, varid, &iendian)
- *              if ierr == NC_NOERR:             # <<<<<<<<<<<<<<
- *                  if iendian == NC_ENDIAN_LITTLE:
- *                      endianness = '<'
- */
-      __pyx_t_3 = ((__pyx_v_ierr == NC_NOERR) != 0);
-      if (__pyx_t_3) {
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-        /* "netCDF4.pyx":1227
- *                  if iendian == NC_ENDIAN_LITTLE:
- *                      endianness = '<'
- *                  elif iendian == NC_ENDIAN_BIG:             # <<<<<<<<<<<<<<
- *                      endianness = '>'
- *              # check to see if it is a supported user-defined type.
- */
-        switch (__pyx_v_iendian) {
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_4path_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_4path_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-          /* "netCDF4.pyx":1225
- *                  ierr = nc_inq_var_endian(_grpid, varid, &iendian)
- *              if ierr == NC_NOERR:
- *                  if iendian == NC_ENDIAN_LITTLE:             # <<<<<<<<<<<<<<
- *                      endianness = '<'
- *                  elif iendian == NC_ENDIAN_BIG:
- */
-          case NC_ENDIAN_LITTLE:
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":1226
- *              if ierr == NC_NOERR:
- *                  if iendian == NC_ENDIAN_LITTLE:
- *                      endianness = '<'             # <<<<<<<<<<<<<<
- *                  elif iendian == NC_ENDIAN_BIG:
- *                      endianness = '>'
- */
-          __Pyx_INCREF(__pyx_kp_s__34);
-          __Pyx_DECREF_SET(__pyx_v_endianness, __pyx_kp_s__34);
-          break;
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_4path_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-          /* "netCDF4.pyx":1227
- *                  if iendian == NC_ENDIAN_LITTLE:
- *                      endianness = '<'
- *                  elif iendian == NC_ENDIAN_BIG:             # <<<<<<<<<<<<<<
- *                      endianness = '>'
- *              # check to see if it is a supported user-defined type.
- */
-          case NC_ENDIAN_BIG:
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":1228
- *                      endianness = '<'
- *                  elif iendian == NC_ENDIAN_BIG:
- *                      endianness = '>'             # <<<<<<<<<<<<<<
- *              # check to see if it is a supported user-defined type.
- *              try:
- */
-          __Pyx_INCREF(__pyx_kp_s__35);
-          __Pyx_DECREF_SET(__pyx_v_endianness, __pyx_kp_s__35);
-          break;
-          default: break;
-        }
-        goto __pyx_L35;
-      }
-      __pyx_L35:;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_4path_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_4path_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_4path_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-      /* "netCDF4.pyx":1230
- *                      endianness = '>'
- *              # check to see if it is a supported user-defined type.
- *              try:             # <<<<<<<<<<<<<<
- *                  datatype = _nctonptype[xtype]
- *                  if endianness is not None:
- */
-      {
-        __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:*/ {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":1231
- *              # check to see if it is a supported user-defined type.
- *              try:
- *                  datatype = _nctonptype[xtype]             # <<<<<<<<<<<<<<
- *                  if endianness is not None:
- *                      datatype = endianness + datatype
- */
-          __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L36_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 = 1231; __pyx_clineno = __LINE__; goto __pyx_L36_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;
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_4path_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-          /* "netCDF4.pyx":1232
- *              try:
- *                  datatype = _nctonptype[xtype]
- *                  if endianness is not None:             # <<<<<<<<<<<<<<
- *                      datatype = endianness + datatype
- *              except KeyError:
- */
-          __pyx_t_3 = (__pyx_v_endianness != Py_None);
-          __pyx_t_14 = (__pyx_t_3 != 0);
-          if (__pyx_t_14) {
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-            /* "netCDF4.pyx":1233
- *                  datatype = _nctonptype[xtype]
- *                  if endianness is not None:
- *                      datatype = endianness + datatype             # <<<<<<<<<<<<<<
- *              except KeyError:
- *                  if xtype == NC_STRING:
- */
-            __pyx_t_6 = PyNumber_Add(__pyx_v_endianness, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L36_error;}
-            __Pyx_GOTREF(__pyx_t_6);
-            __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_6);
-            __pyx_t_6 = 0;
-            goto __pyx_L44;
-          }
-          __pyx_L44:;
-        }
-        __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_L43_try_end;
-        __pyx_L36_error:;
-        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_6parent_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_6parent_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6parent___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-        /* "netCDF4.pyx":1234
- *                  if endianness is not None:
- *                      datatype = endianness + datatype
- *              except KeyError:             # <<<<<<<<<<<<<<
- *                  if xtype == NC_STRING:
- *                      datatype = str
- */
-        __pyx_t_15 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
-        if (__pyx_t_15) {
-          __Pyx_AddTraceback("netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
-          if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-          __Pyx_GOTREF(__pyx_t_1);
-          __Pyx_GOTREF(__pyx_t_10);
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":1235
- *                      datatype = endianness + datatype
- *              except KeyError:
- *                  if xtype == NC_STRING:             # <<<<<<<<<<<<<<
- *                      datatype = str
- *                  else:
- */
-          __pyx_t_14 = ((__pyx_v_xtype == NC_STRING) != 0);
-          if (__pyx_t_14) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_6parent___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-            /* "netCDF4.pyx":1236
- *              except KeyError:
- *                  if xtype == NC_STRING:
- *                      datatype = str             # <<<<<<<<<<<<<<
- *                  else:
- *                      with nogil:
- */
-            __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
-            __Pyx_XDECREF_SET(__pyx_v_datatype, ((PyObject *)((PyObject*)(&PyString_Type))));
-            goto __pyx_L47;
-          }
-          /*else*/ {
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-            /* "netCDF4.pyx":1238
- *                      datatype = str
- *                  else:
- *                      with nogil:             # <<<<<<<<<<<<<<
- *                          ierr = nc_inq_user_type(_grpid, xtype, namstring_cmp,
- *                                                  NULL, NULL, NULL, &classp)
- */
-            {
-                #ifdef WITH_THREAD
-                PyThreadState *_save;
-                Py_UNBLOCK_THREADS
-                #endif
-                /*try:*/ {
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_6parent_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-                  /* "netCDF4.pyx":1239
- *                  else:
- *                      with nogil:
- *                          ierr = nc_inq_user_type(_grpid, xtype, namstring_cmp,             # <<<<<<<<<<<<<<
- *                                                  NULL, NULL, NULL, &classp)
- *                      if classp == NC_COMPOUND: # a compound type
- */
-                  __pyx_v_ierr = nc_inq_user_type(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_namstring_cmp, NULL, NULL, NULL, (&__pyx_v_classp));
-                }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-                /* "netCDF4.pyx":1238
- *                      datatype = str
- *                  else:
- *                      with nogil:             # <<<<<<<<<<<<<<
- *                          ierr = nc_inq_user_type(_grpid, xtype, namstring_cmp,
- *                                                  NULL, NULL, NULL, &classp)
- */
-                /*finally:*/ {
-                  /*normal exit:*/{
-                    #ifdef WITH_THREAD
-                    Py_BLOCK_THREADS
-                    #endif
-                    goto __pyx_L52;
-                  }
-                  __pyx_L52:;
-                }
-            }
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6parent_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-            /* "netCDF4.pyx":1248
- *                              #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) {
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-              /* "netCDF4.pyx":1241
- *                          ierr = nc_inq_user_type(_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:
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6parent_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6parent_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6parent_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-              /* "netCDF4.pyx":1243
- *                      if classp == NC_COMPOUND: # a compound type
- *                          # create CompoundType instance describing this compound type.
- *                          try:             # <<<<<<<<<<<<<<
- *                              datatype = _read_compound(group, xtype, endian=endianness)
- *                          except KeyError:
- */
-              {
-                __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
-                __Pyx_XGOTREF(__pyx_t_16);
-                __Pyx_XGOTREF(__pyx_t_17);
-                __Pyx_XGOTREF(__pyx_t_18);
-                /*try:*/ {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-                  /* "netCDF4.pyx":1244
- *                          # create CompoundType instance describing this compound type.
- *                          try:
- *                              datatype = _read_compound(group, xtype, endian=endianness)             # <<<<<<<<<<<<<<
- *                          except KeyError:
- *                              #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
- */
-                  __pyx_t_19.__pyx_n = 1;
-                  __pyx_t_19.endian = __pyx_v_endianness;
-                  __pyx_t_7 = __pyx_f_7netCDF4__read_compound(__pyx_v_group, __pyx_v_xtype, &__pyx_t_19); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L53_error;}
-                  __Pyx_GOTREF(__pyx_t_7);
-                  __Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_7);
-                  __pyx_t_7 = 0;
-                }
-                __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-                __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
-                goto __pyx_L60_try_end;
-                __pyx_L53_error:;
-                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_6parent_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-                /* "netCDF4.pyx":1245
- *                          try:
- *                              datatype = _read_compound(group, xtype, endian=endianness)
- *                          except KeyError:             # <<<<<<<<<<<<<<
- *                              #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
- *                              continue
- */
-                __pyx_t_15 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
-                if (__pyx_t_15) {
-                  __Pyx_AddTraceback("netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
-                  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L55_except_error;}
-                  __Pyx_GOTREF(__pyx_t_7);
-                  __Pyx_GOTREF(__pyx_t_5);
-                  __Pyx_GOTREF(__pyx_t_8);
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-                  /* "netCDF4.pyx":1247
- *                          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.
+/* "netCDF4/_netCDF4.pyx":1474
+ *     cdef public int _isopen
+ *     cdef public groups, dimensions, variables, disk_format, path, parent,\
+ *     file_format, data_model, cmptypes, vltypes, keepweakref, \             # <<<<<<<<<<<<<<
+ *     __orthogonal_indexing__
+ * 
  */
-                  goto __pyx_L62_except_continue;
-                  __pyx_L62_except_continue:;
-                  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-                  goto __pyx_L59_try_continue;
-                }
-                goto __pyx_L55_except_error;
-                __pyx_L55_except_error:;
-                __Pyx_XGIVEREF(__pyx_t_16);
-                __Pyx_XGIVEREF(__pyx_t_17);
-                __Pyx_XGIVEREF(__pyx_t_18);
-                __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
-                goto __pyx_L38_except_error;
-                __pyx_L59_try_continue:;
-                __Pyx_XGIVEREF(__pyx_t_16);
-                __Pyx_XGIVEREF(__pyx_t_17);
-                __Pyx_XGIVEREF(__pyx_t_18);
-                __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
-                goto __pyx_L46_except_continue;
-                __pyx_L60_try_end:;
-              }
-              break;
 
-              /* "netCDF4.pyx":1248
- *                              #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:
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_11file_format_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_11file_format___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-              /* "netCDF4.pyx":1250
- *                      elif classp == NC_VLEN: # a compound type
- *                          # create VLType instance describing this compound type.
- *                          try:             # <<<<<<<<<<<<<<
- *                              datatype = _read_vlen(group, xtype, endian=endianness)
- *                          except KeyError:
- */
-              {
-                __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
-                __Pyx_XGOTREF(__pyx_t_18);
-                __Pyx_XGOTREF(__pyx_t_17);
-                __Pyx_XGOTREF(__pyx_t_16);
-                /*try:*/ {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-                  /* "netCDF4.pyx":1251
- *                          # create VLType instance describing this compound type.
- *                          try:
- *                              datatype = _read_vlen(group, xtype, endian=endianness)             # <<<<<<<<<<<<<<
- *                          except KeyError:
- *                              #print "WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
- */
-                  __pyx_t_20.__pyx_n = 1;
-                  __pyx_t_20.endian = __pyx_v_endianness;
-                  __pyx_t_8 = __pyx_f_7netCDF4__read_vlen(__pyx_v_group, __pyx_v_xtype, &__pyx_t_20); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L63_error;}
-                  __Pyx_GOTREF(__pyx_t_8);
-                  __Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_8);
-                  __pyx_t_8 = 0;
-                }
-                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
-                __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-                __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-                goto __pyx_L70_try_end;
-                __pyx_L63_error:;
-                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_11file_format___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-                /* "netCDF4.pyx":1252
- *                          try:
- *                              datatype = _read_vlen(group, xtype, endian=endianness)
- *                          except KeyError:             # <<<<<<<<<<<<<<
- *                              #print "WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
- *                              continue
- */
-                __pyx_t_15 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
-                if (__pyx_t_15) {
-                  __Pyx_AddTraceback("netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
-                  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L65_except_error;}
-                  __Pyx_GOTREF(__pyx_t_8);
-                  __Pyx_GOTREF(__pyx_t_5);
-                  __Pyx_GOTREF(__pyx_t_7);
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-                  /* "netCDF4.pyx":1254
- *                          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_L72_except_continue;
-                  __pyx_L72_except_continue:;
-                  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-                  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-                  goto __pyx_L69_try_continue;
-                }
-                goto __pyx_L65_except_error;
-                __pyx_L65_except_error:;
-                __Pyx_XGIVEREF(__pyx_t_18);
-                __Pyx_XGIVEREF(__pyx_t_17);
-                __Pyx_XGIVEREF(__pyx_t_16);
-                __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
-                goto __pyx_L38_except_error;
-                __pyx_L69_try_continue:;
-                __Pyx_XGIVEREF(__pyx_t_18);
-                __Pyx_XGIVEREF(__pyx_t_17);
-                __Pyx_XGIVEREF(__pyx_t_16);
-                __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
-                goto __pyx_L46_except_continue;
-                __pyx_L70_try_end:;
-              }
-              break;
-              default:
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11file_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_11file_format_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-              /* "netCDF4.pyx":1257
- *                      else:
- *                          #print "WARNING: variable '%s' has unsupported datatype, skipping .." % name
- *                          continue             # <<<<<<<<<<<<<<
- *              # get number of dimensions.
- *              with nogil:
- */
-              goto __pyx_L46_except_continue;
-              break;
-            }
-          }
-          __pyx_L47:;
-          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-          goto __pyx_L37_exception_handled;
-          __pyx_L46_except_continue:;
-          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-          goto __pyx_L42_try_continue;
-        }
-        goto __pyx_L38_except_error;
-        __pyx_L38_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_L42_try_continue:;
-        __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_L15_continue;
-        __pyx_L37_exception_handled:;
-        __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);
-        __pyx_L43_try_end:;
-      }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1259
- *                          continue
- *              # get number of dimensions.
- *              with nogil:             # <<<<<<<<<<<<<<
- *                  ierr = nc_inq_varndims(_grpid, varid, &numdims)
- *              if ierr != NC_NOERR:
- */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
-          #endif
-          /*try:*/ {
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11file_format_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-            /* "netCDF4.pyx":1260
- *              # get number of dimensions.
- *              with nogil:
- *                  ierr = nc_inq_varndims(_grpid, varid, &numdims)             # <<<<<<<<<<<<<<
- *              if ierr != NC_NOERR:
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-            __pyx_v_ierr = nc_inq_varndims(__pyx_v__grpid, __pyx_v_varid, (&__pyx_v_numdims));
-          }
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":1259
- *                          continue
- *              # get number of dimensions.
- *              with nogil:             # <<<<<<<<<<<<<<
- *                  ierr = nc_inq_varndims(_grpid, varid, &numdims)
- *              if ierr != NC_NOERR:
- */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L77;
-            }
-            __pyx_L77:;
-          }
-      }
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11file_format_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11file_format_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11file_format_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-      /* "netCDF4.pyx":1261
- *              with nogil:
- *                  ierr = nc_inq_varndims(_grpid, varid, &numdims)
- *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *              # get dimension ids.
- */
-      __pyx_t_14 = ((__pyx_v_ierr != NC_NOERR) != 0);
-      if (__pyx_t_14) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-        /* "netCDF4.pyx":1262
- *                  ierr = nc_inq_varndims(_grpid, varid, &numdims)
- *              if ierr != NC_NOERR:
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *              # get dimension ids.
- *              with nogil:
- */
-        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
-        __pyx_t_10 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_INCREF(__pyx_t_10);
-        PyTuple_SET_ITEM(__pyx_t_1, 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_1, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11file_format_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-      /* "netCDF4.pyx":1264
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *              # get dimension ids.
- *              with nogil:             # <<<<<<<<<<<<<<
- *                  ierr = nc_inq_vardimid(_grpid, varid, dimids)
- *              if ierr != NC_NOERR:
- */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
-          #endif
-          /*try:*/ {
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-            /* "netCDF4.pyx":1265
- *              # get dimension ids.
- *              with nogil:
- *                  ierr = nc_inq_vardimid(_grpid, varid, dimids)             # <<<<<<<<<<<<<<
- *              if ierr != NC_NOERR:
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-            __pyx_v_ierr = nc_inq_vardimid(__pyx_v__grpid, __pyx_v_varid, __pyx_v_dimids);
-          }
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_10data_model_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_10data_model___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-          /* "netCDF4.pyx":1264
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *              # get dimension ids.
- *              with nogil:             # <<<<<<<<<<<<<<
- *                  ierr = nc_inq_vardimid(_grpid, varid, dimids)
- *              if ierr != NC_NOERR:
- */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L83;
-            }
-            __pyx_L83:;
-          }
-      }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1266
- *              with nogil:
- *                  ierr = nc_inq_vardimid(_grpid, varid, dimids)
- *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *              # loop over dimensions, retrieve names.
- */
-      __pyx_t_14 = ((__pyx_v_ierr != NC_NOERR) != 0);
-      if (__pyx_t_14) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_10data_model___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-        /* "netCDF4.pyx":1267
- *                  ierr = nc_inq_vardimid(_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_10 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_INCREF(__pyx_t_10);
-        PyTuple_SET_ITEM(__pyx_t_1, 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_1, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1273
- *              # 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_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_10);
-      __Pyx_XDECREF_SET(__pyx_v_dimensions, ((PyObject*)__pyx_t_10));
-      __pyx_t_10 = 0;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_10data_model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_10data_model_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-      /* "netCDF4.pyx":1274
- *              # use the 'foo' dimension from the parent?
- *              dimensions = []
- *              for nn from 0 <= nn < numdims:             # <<<<<<<<<<<<<<
- *                  grp = group
- *                  found = False
- */
-      __pyx_t_15 = __pyx_v_numdims;
-      for (__pyx_v_nn = 0; __pyx_v_nn < __pyx_t_15; __pyx_v_nn++) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-        /* "netCDF4.pyx":1275
- *              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);
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_10data_model_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-        /* "netCDF4.pyx":1276
- *              for nn from 0 <= nn < numdims:
- *                  grp = group
- *                  found = False             # <<<<<<<<<<<<<<
- *                  while not found:
- *                      for key, value in grp.dimensions.items():
- */
-        __pyx_v_found = 0;
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-        /* "netCDF4.pyx":1277
- *                  grp = group
- *                  found = False
- *                  while not found:             # <<<<<<<<<<<<<<
- *                      for key, value in grp.dimensions.items():
- *                          if value._dimid == dimids[nn]:
- */
-        while (1) {
-          __pyx_t_14 = ((!(__pyx_v_found != 0)) != 0);
-          if (!__pyx_t_14) break;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_10data_model_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_10data_model_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_10data_model_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-          /* "netCDF4.pyx":1278
- *                  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 = 1278; __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 = 1278; __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_10 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-          } else {
-            __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          __Pyx_GOTREF(__pyx_t_10);
-          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-          if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) {
-            __pyx_t_6 = __pyx_t_10; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
-            __pyx_t_21 = NULL;
-          } else {
-            __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_GOTREF(__pyx_t_6);
-            __pyx_t_21 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-          for (;;) {
-            if (likely(!__pyx_t_21)) {
-              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_10 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_10); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-                #else
-                __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __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_10 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_10); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-                #else
-                __pyx_t_10 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-                #endif
-              }
-            } else {
-              __pyx_t_10 = __pyx_t_21(__pyx_t_6);
-              if (unlikely(!__pyx_t_10)) {
-                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 = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-                }
-                break;
-              }
-              __Pyx_GOTREF(__pyx_t_10);
-            }
-            if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
-              PyObject* sequence = __pyx_t_10;
-              #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 = 1278; __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_7 = PyTuple_GET_ITEM(sequence, 1); 
-              } else {
-                __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
-                __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
-              }
-              __Pyx_INCREF(__pyx_t_1);
-              __Pyx_INCREF(__pyx_t_7);
-              #else
-              __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              __Pyx_GOTREF(__pyx_t_1);
-              __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              __Pyx_GOTREF(__pyx_t_7);
-              #endif
-              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-            } else {
-              Py_ssize_t index = -1;
-              __pyx_t_5 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              __Pyx_GOTREF(__pyx_t_5);
-              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-              __pyx_t_22 = Py_TYPE(__pyx_t_5)->tp_iternext;
-              index = 0; __pyx_t_1 = __pyx_t_22(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L91_unpacking_failed;
-              __Pyx_GOTREF(__pyx_t_1);
-              index = 1; __pyx_t_7 = __pyx_t_22(__pyx_t_5); if (unlikely(!__pyx_t_7)) goto __pyx_L91_unpacking_failed;
-              __Pyx_GOTREF(__pyx_t_7);
-              if (__Pyx_IternextUnpackEndCheck(__pyx_t_22(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              __pyx_t_22 = NULL;
-              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-              goto __pyx_L92_unpacking_done;
-              __pyx_L91_unpacking_failed:;
-              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-              __pyx_t_22 = NULL;
-              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-              __pyx_L92_unpacking_done:;
-            }
-            __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
-            __pyx_t_1 = 0;
-            __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
-            __pyx_t_7 = 0;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-            /* "netCDF4.pyx":1279
- *                  while not found:
- *                      for key, value in grp.dimensions.items():
- *                          if value._dimid == dimids[nn]:             # <<<<<<<<<<<<<<
- *                              dimensions.append(key)
- *                              found = True
- */
-            __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_dimid); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_GOTREF(__pyx_t_10);
-            __pyx_t_7 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_nn])); 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_t_1 = PyObject_RichCompare(__pyx_t_10, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-            __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-            if (__pyx_t_14) {
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_10data_model_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-              /* "netCDF4.pyx":1280
- *                      for key, value in grp.dimensions.items():
- *                          if value._dimid == dimids[nn]:
- *                              dimensions.append(key)             # <<<<<<<<<<<<<<
- *                              found = True
- *                              break
- */
-              __pyx_t_23 = __Pyx_PyList_Append(__pyx_v_dimensions, __pyx_v_key); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-              /* "netCDF4.pyx":1281
- *                          if value._dimid == dimids[nn]:
- *                              dimensions.append(key)
- *                              found = True             # <<<<<<<<<<<<<<
- *                              break
- *                      grp = grp.parent
- */
-              __pyx_v_found = 1;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_8cmptypes_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_8cmptypes_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_8cmptypes___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-              /* "netCDF4.pyx":1282
- *                              dimensions.append(key)
- *                              found = True
- *                              break             # <<<<<<<<<<<<<<
- *                      grp = grp.parent
- *              # create new variable instance.
- */
-              goto __pyx_L90_break;
-            }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-            /* "netCDF4.pyx":1278
- *                  found = False
- *                  while not found:
- *                      for key, value in grp.dimensions.items():             # <<<<<<<<<<<<<<
- *                          if value._dimid == dimids[nn]:
- *                              dimensions.append(key)
- */
-          }
-          __pyx_L90_break:;
-          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_8cmptypes___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-          /* "netCDF4.pyx":1283
- *                              found = True
- *                              break
- *                      grp = grp.parent             # <<<<<<<<<<<<<<
- *              # create new variable instance.
- *              if endianness == '>':
- */
-          __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 = 1283; __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;
-        }
-      }
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1285
- *                      grp = grp.parent
- *              # create new variable instance.
- *              if endianness == '>':             # <<<<<<<<<<<<<<
- *                  variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big')
- *              elif endianness == '<':
- */
-      __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_endianness, __pyx_kp_s__35, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_14) {
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_8cmptypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_8cmptypes_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-        /* "netCDF4.pyx":1286
- *              # create new variable instance.
- *              if endianness == '>':
- *                  variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big')             # <<<<<<<<<<<<<<
- *              elif endianness == '<':
- *                  variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little')
- */
-        __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __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 = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_endian, __pyx_n_s_big) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Variable)), __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __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_1); __pyx_t_1 = 0;
-        if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        goto __pyx_L94;
-      }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":1287
- *              if endianness == '>':
- *                  variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big')
- *              elif endianness == '<':             # <<<<<<<<<<<<<<
- *                  variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little')
- *              else:
- */
-      __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_v_endianness, __pyx_kp_s__34, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_14) {
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_8cmptypes_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-        /* "netCDF4.pyx":1288
- *                  variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big')
- *              elif endianness == '<':
- *                  variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little')             # <<<<<<<<<<<<<<
- *              else:
- *                  variables[name] = Variable(group, name, datatype, dimensions, id=varid)
- */
-        __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        __Pyx_INCREF(__pyx_v_group);
-        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_group);
-        __Pyx_GIVEREF(__pyx_v_group);
-        __Pyx_INCREF(__pyx_v_name);
-        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_name);
-        __Pyx_GIVEREF(__pyx_v_name);
-        __Pyx_INCREF(__pyx_v_datatype);
-        PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_datatype);
-        __Pyx_GIVEREF(__pyx_v_datatype);
-        __Pyx_INCREF(__pyx_v_dimensions);
-        PyTuple_SET_ITEM(__pyx_t_7, 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 = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_endian, __pyx_n_s_little) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Variable)), __pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __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_1); __pyx_t_1 = 0;
-        if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_6) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-        goto __pyx_L94;
-      }
-      /*else*/ {
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-        /* "netCDF4.pyx":1290
- *                  variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little')
- *              else:
- *                  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 = 1290; __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 = 1290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_7);
-        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_id, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Variable)), __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; __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_1); __pyx_t_1 = 0;
-        if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      }
-      __pyx_L94:;
-      __pyx_L15_continue:;
-    }
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_8cmptypes_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_8cmptypes_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_8cmptypes_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
 
-    /* "netCDF4.pyx":1291
- *              else:
- *                  variables[name] = Variable(group, name, datatype, dimensions, id=varid)
- *         free(varids) # free pointer holding variable ids.             # <<<<<<<<<<<<<<
- *     return variables
- * 
- */
-    free(__pyx_v_varids);
-    goto __pyx_L7;
-  }
-  __pyx_L7:;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":1292
- *                  variables[name] = Variable(group, name, datatype, dimensions, id=varid)
- *         free(varids) # free pointer holding variable ids.
- *     return variables             # <<<<<<<<<<<<<<
- * 
- * # these are class attributes that
- */
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_8cmptypes_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_7vltypes_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_7vltypes_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_7vltypes___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_7vltypes___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
   __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_variables);
-  __pyx_r = __pyx_v_variables;
+  __Pyx_INCREF(__pyx_v_self->vltypes);
+  __pyx_r = __pyx_v_self->vltypes;
   goto __pyx_L0;
 
-  /* "netCDF4.pyx":1175
- *     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_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_7vltypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_7vltypes_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_7vltypes_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_7vltypes_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_7vltypes_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_7vltypes_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_7vltypes_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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_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_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_11keepweakref_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_11keepweakref_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11keepweakref___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_11keepweakref___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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_XDECREF(__pyx_v_variables);
-  __Pyx_XDECREF(__pyx_v_name);
-  __Pyx_XDECREF(__pyx_v_endianness);
-  __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":1426
- *     file_format, data_model, cmptypes, vltypes, keepweakref
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11keepweakref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_11keepweakref_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11keepweakref_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_7Dataset_11keepweakref_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11keepweakref_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11keepweakref_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_11keepweakref_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":1475
+ *     cdef public groups, dimensions, variables, disk_format, path, parent,\
+ *     file_format, data_model, cmptypes, vltypes, keepweakref, \
+ *     __orthogonal_indexing__             # <<<<<<<<<<<<<<
  * 
- *     def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',             # <<<<<<<<<<<<<<
- *                  diskless=False, persist=False, keepweakref=False, **kwargs):
- *         cdef int grpid, ierr, numgrps, numdims, numvars
+ *     def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing_____get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing_____get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->__orthogonal_indexing__);
+  __pyx_r = __pyx_v_self->__orthogonal_indexing__;
+  goto __pyx_L0;
+
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___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_8_netCDF4_7Dataset_23__orthogonal_indexing___2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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->__orthogonal_indexing__);
+  __Pyx_DECREF(__pyx_v_self->__orthogonal_indexing__);
+  __pyx_v_self->__orthogonal_indexing__ = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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->__orthogonal_indexing__);
+  __Pyx_DECREF(__pyx_v_self->__orthogonal_indexing__);
+  __pyx_v_self->__orthogonal_indexing__ = Py_None;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":2225
+ * 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_8_netCDF4_5Group_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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;
@@ -21890,31 +18609,12 @@ static int __pyx_pw_7netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self, PyObject
   __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":1427
- * 
- *     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);
+    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  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;
@@ -21923,81 +18623,36 @@ static int __pyx_pw_7netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self, PyObject
       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--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parent)) != 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 (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 = 2225; __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 = 1426; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2225; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
+    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+      goto __pyx_L5_argtuple_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;
-      }
+      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
     }
-    __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];
+    __pyx_v_parent = values[0];
+    __pyx_v_name = values[1];
   }
   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 = 1426; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2225; __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_AddTraceback("netCDF4._netCDF4.Group.__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":1426
- *     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
- */
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(((struct __pyx_obj_7netCDF4_8_netCDF4_Group *)__pyx_v_self), __pyx_v_parent, __pyx_v_name, __pyx_v_kwargs);
 
   /* function exit code */
   __Pyx_XDECREF(__pyx_v_kwargs);
@@ -22005,1099 +18660,971 @@ static int __pyx_pw_7netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self, PyObject
   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;
+static int __pyx_pf_7netCDF4_8_netCDF4_5Group___init__(struct __pyx_obj_7netCDF4_8_netCDF4_Group *__pyx_v_self, PyObject *__pyx_v_parent, PyObject *__pyx_v_name, PyObject *__pyx_v_kwargs) {
   int __pyx_v_ierr;
-  char *__pyx_v_path;
+  char *__pyx_v_groupname;
   PyObject *__pyx_v_bytestr = NULL;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  int __pyx_t_2;
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
-  char *__pyx_t_5;
+  Py_ssize_t __pyx_t_5;
   PyObject *__pyx_t_6 = NULL;
   int __pyx_t_7;
-  PyObject *__pyx_t_8 = NULL;
-  PyObject *(*__pyx_t_9)(PyObject *);
+  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":1431
- *         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__)
+  /* "netCDF4/_netCDF4.pyx":2229
+ *         cdef char *groupname
+ *         # flag to indicate that Variables in this Group support orthogonal indexing.
+ *         self.__orthogonal_indexing__ = True             # <<<<<<<<<<<<<<
+ *         # set data_model and file_format attributes.
+ *         self.data_model = parent.data_model
  */
-  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __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 = 1431; __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 = 1431; __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 = 1431; __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) {
+  __Pyx_INCREF(Py_True);
+  __Pyx_GIVEREF(Py_True);
+  __Pyx_GOTREF(__pyx_v_self->__pyx_base.__orthogonal_indexing__);
+  __Pyx_DECREF(__pyx_v_self->__pyx_base.__orthogonal_indexing__);
+  __pyx_v_self->__pyx_base.__orthogonal_indexing__ = Py_True;
 
-    /* "netCDF4.pyx":1433
- *         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
+  /* "netCDF4/_netCDF4.pyx":2231
+ *         self.__orthogonal_indexing__ = True
+ *         # 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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __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 = 1433; __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 = 1433; __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 = 1433; __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 = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_data_model); 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_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":1434
- *             #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':
+  /* "netCDF4/_netCDF4.pyx":2232
+ *         # 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_3 = __pyx_f_7netCDF4__strencode(__pyx_v_filename, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_v_bytestr = __pyx_t_3;
-  __pyx_t_3 = 0;
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_file_format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2232; __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":1435
- *             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)
+  /* "netCDF4/_netCDF4.pyx":2234
+ *         self.file_format = parent.file_format
+ *         # full path to Group.
+ *         self.path = posixpath.join(parent.path, name)             # <<<<<<<<<<<<<<
+ *         # parent group.
+ *         self.parent = parent
  */
-  __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_path = __pyx_t_5;
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2234; __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 = 2234; __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); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2234; __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 = 2234; __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 = 2234; __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":1436
- *         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 = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-
-    /* "netCDF4.pyx":1437
- *         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 = 1437; __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 = 1437; __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 = 1437; __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 = 1437; __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":1438
- *         if mode == 'w':
- *             _set_default_format(format=format)
- *             if clobber:             # <<<<<<<<<<<<<<
- *                 if diskless:
- *                     if persist:
+  /* "netCDF4/_netCDF4.pyx":2236
+ *         self.path = posixpath.join(parent.path, name)
+ *         # parent group.
+ *         self.parent = parent             # <<<<<<<<<<<<<<
+ *         # propagate weak reference setting from parent.
+ *         self.keepweakref = parent.keepweakref
  */
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_clobber); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_1) {
+  __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":1439
- *             _set_default_format(format=format)
- *             if clobber:
- *                 if diskless:             # <<<<<<<<<<<<<<
- *                     if persist:
- *                         ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid)
+  /* "netCDF4/_netCDF4.pyx":2238
+ *         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_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_1) {
+  __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 = 2238; __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":1440
- *             if clobber:
- *                 if diskless:
- *                     if persist:             # <<<<<<<<<<<<<<
- *                         ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid)
- *                     else:
+  /* "netCDF4/_netCDF4.pyx":2239
+ *         # 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_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); 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) {
+  __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 = 2239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = (__pyx_t_7 != 0);
+  if (__pyx_t_8) {
 
-          /* "netCDF4.pyx":1441
- *                 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)
+    /* "netCDF4/_netCDF4.pyx":2240
+ *         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_6 = __Pyx_PyInt_From_int((NC_WRITE | NC_CLOBBER)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __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 = 1441; __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 = 1441; __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 = 1441; __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*/ {
+    __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 = 2240; __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 = 2240; __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":1443
- *                         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)
+    /* "netCDF4/_netCDF4.pyx":2242
+ *             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_3 = __Pyx_PyInt_From_int(NC_CLOBBER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; __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 = 1443; __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 = 1443; __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 = 1443; __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;
+    __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_types(((PyObject *)__pyx_v_self)); 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);
+    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 = 2242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-      /*else*/ {
-
-        /* "netCDF4.pyx":1445
- *                         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));
+      #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_L8:;
-      goto __pyx_L7;
+      __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 = 2242; __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 = 2242; __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 = 2242; __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 = 2242; __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 = 2242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L5_unpacking_done:;
     }
-    /*else*/ {
-
-      /* "netCDF4.pyx":1447
- *                     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 = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_1) {
+    __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":1448
- *             else:
- *                 if diskless:
- *                     if persist:             # <<<<<<<<<<<<<<
- *                         ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
- *                     else:
+    /* "netCDF4/_netCDF4.pyx":2244
+ *             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_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (__pyx_t_1) {
+    __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_dims(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2244; __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":1449
- *                 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)
+    /* "netCDF4/_netCDF4.pyx":2246
+ *             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_6 = __Pyx_PyInt_From_int((NC_WRITE | NC_NOCLOBBER)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __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 = 1449; __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 = 1449; __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 = 1449; __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*/ {
+    __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_vars(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2246; __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":1451
- *                         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)
+    /* "netCDF4/_netCDF4.pyx":2248
+ *             self.variables = _get_vars(self)
+ *             # get groups in this Group.
+ *             self.groups = _get_grps(self)             # <<<<<<<<<<<<<<
+ *         else:
+ *             bytestr = _strencode(name)
  */
-          __pyx_t_3 = __Pyx_PyInt_From_int(NC_NOCLOBBER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __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 = 1451; __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 = 1451; __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 = 1451; __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*/ {
+    __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_grps(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2248; __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":1453
- *                         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
+    /* "netCDF4/_netCDF4.pyx":2250
+ *             self.groups = _get_grps(self)
+ *         else:
+ *             bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *             groupname = bytestr
+ *             ierr = nc_def_grp(parent._grpid, groupname, &self._grpid)
  */
-        __pyx_v_ierr = nc_create(__pyx_v_path, NC_NOCLOBBER, (&__pyx_v_grpid));
-      }
-      __pyx_L10:;
-    }
-    __pyx_L7:;
+    __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_v_bytestr = __pyx_t_1;
+    __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":1458
- *             # 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:
+    /* "netCDF4/_netCDF4.pyx":2251
+ *         else:
+ *             bytestr = _strencode(name)
+ *             groupname = bytestr             # <<<<<<<<<<<<<<
+ *             ierr = nc_def_grp(parent._grpid, groupname, &self._grpid)
+ *             if ierr != NC_NOERR:
  */
-    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_default_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; __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 = 1458; __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 = 1458; __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 = 1458; __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;
-  }
+    __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_groupname = __pyx_t_11;
 
-  /* "netCDF4.pyx":1459
- *             # 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)
+    /* "netCDF4/_netCDF4.pyx":2252
+ *             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_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 = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
+    __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 = 2252; __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 = 2252; __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":1460
- *             _set_default_format(format='NETCDF3_64BIT')
- *         elif mode == 'r':
- *             if diskless:             # <<<<<<<<<<<<<<
- *                 ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid)
- *             else:
+    /* "netCDF4/_netCDF4.pyx":2253
+ *             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_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_1) {
+    __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_8) {
 
-      /* "netCDF4.pyx":1461
- *         elif mode == 'r':
- *             if diskless:
- *                 ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid)             # <<<<<<<<<<<<<<
- *             else:
- *                 ierr = nc_open(path, NC_NOWRITE, &grpid)
+      /* "netCDF4/_netCDF4.pyx":2254
+ *             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_3 = __Pyx_PyInt_From_int(NC_NOWRITE); 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_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 = 2254; __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 = 2254; __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_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 = 2254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
       __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;
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    /*else*/ {
 
-      /* "netCDF4.pyx":1463
- *                 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:
+    /* "netCDF4/_netCDF4.pyx":2255
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             self.cmptypes = OrderedDict()             # <<<<<<<<<<<<<<
+ *             self.vltypes = OrderedDict()
+ *             self.dimensions = OrderedDict()
  */
-      __pyx_v_ierr = nc_open(__pyx_v_path, NC_NOWRITE, (&__pyx_v_grpid));
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2255; __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);
+      }
     }
-    __pyx_L12:;
-    goto __pyx_L6;
-  }
-
-  /* "netCDF4.pyx":1464
- *             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 = 1464; __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 = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_1 = __pyx_t_2;
-  __pyx_L13_bool_binop_done:;
-  if (__pyx_t_1) {
+    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 = 2255; __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 = 2255; __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":1465
- *                 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:
+    /* "netCDF4/_netCDF4.pyx":2256
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             self.cmptypes = OrderedDict()
+ *             self.vltypes = OrderedDict()             # <<<<<<<<<<<<<<
+ *             self.dimensions = OrderedDict()
+ *             self.variables = OrderedDict()
  */
-    __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) {
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2256; __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 = 2256; __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 = 2256; __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":1466
- *         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)
+    /* "netCDF4/_netCDF4.pyx":2257
+ *             self.cmptypes = OrderedDict()
+ *             self.vltypes = OrderedDict()
+ *             self.dimensions = OrderedDict()             # <<<<<<<<<<<<<<
+ *             self.variables = OrderedDict()
+ *             self.groups = OrderedDict()
  */
-      __pyx_t_6 = __Pyx_PyInt_From_int(NC_WRITE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; __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 = 1466; __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 = 1466; __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 = 1466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2257; __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 = 2257; __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 {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    /*else*/ {
+    __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":1468
- *                 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:
+    /* "netCDF4/_netCDF4.pyx":2258
+ *             self.vltypes = OrderedDict()
+ *             self.dimensions = OrderedDict()
+ *             self.variables = OrderedDict()             # <<<<<<<<<<<<<<
+ *             self.groups = OrderedDict()
+ * 
  */
-      __pyx_v_ierr = nc_open(__pyx_v_path, NC_WRITE, (&__pyx_v_grpid));
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2258; __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);
+      }
     }
-    __pyx_L15:;
-    goto __pyx_L6;
-  }
+    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 = 2258; __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 = 2258; __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":1469
- *             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)
+    /* "netCDF4/_netCDF4.pyx":2259
+ *             self.dimensions = OrderedDict()
+ *             self.variables = OrderedDict()
+ *             self.groups = OrderedDict()             # <<<<<<<<<<<<<<
+ * 
+ *     def close(self):
  */
-  __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 = 1469; __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 = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_1 = __pyx_t_2;
-  __pyx_L16_bool_binop_done:;
-  if (__pyx_t_1) {
-
-    /* "netCDF4.pyx":1470
- *                 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 = 1470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_1) {
-
-      /* "netCDF4.pyx":1471
- *         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 = 1471; __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 = 1471; __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 = 1471; __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 = 1471; __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;
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2259; __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);
+      }
     }
-    /*else*/ {
-
-      /* "netCDF4.pyx":1473
- *                 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));
+    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 = 2259; __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 = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_L18:;
-    goto __pyx_L6;
+    __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":1474
- *             else:
- *                 ierr = nc_open(path, NC_SHARE, &grpid)
- *         elif mode == 'ws':             # <<<<<<<<<<<<<<
- *             if clobber:
- *                 if diskless:
+  /* "netCDF4/_netCDF4.pyx":2225
+ * 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
  */
-  __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 = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
 
-    /* "netCDF4.pyx":1475
- *                 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 = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_1) {
+  /* 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._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":1476
- *         elif mode == 'ws':
- *             if clobber:
- *                 if diskless:             # <<<<<<<<<<<<<<
- *                     if persist:
- *                         ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)
+/* "netCDF4/_netCDF4.pyx":2261
+ *             self.groups = OrderedDict()
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         """
+ * close(self)
  */
-      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_1) {
 
-        /* "netCDF4.pyx":1477
- *             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 = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (__pyx_t_1) {
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_5Group_3close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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_8_netCDF4_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_8_netCDF4_5Group_2close(((struct __pyx_obj_7netCDF4_8_netCDF4_Group *)__pyx_v_self));
 
-          /* "netCDF4.pyx":1478
- *                 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 = 1478; __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 = 1478; __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 = 1478; __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 = 1478; __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*/ {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":1480
- *                         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 = 1480; __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 = 1480; __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 = 1480; __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 = 1480; __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*/ {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_2close(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_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":1482
- *                         ierr = nc_create(path, NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)
- *                 else:
- *                     ierr = nc_create(path, NC_SHARE | NC_CLOBBER, &grpid)             # <<<<<<<<<<<<<<
- *             else:
- *                 if diskless:
+  /* "netCDF4/_netCDF4.pyx":2267
+ * 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_v_ierr = nc_create(__pyx_v_path, (NC_SHARE | NC_CLOBBER), (&__pyx_v_grpid));
-      }
-      __pyx_L20:;
-      goto __pyx_L19;
-    }
-    /*else*/ {
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2267; __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 = 2267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-      /* "netCDF4.pyx":1484
- *                     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)
+  /* "netCDF4/_netCDF4.pyx":2261
+ *             self.groups = OrderedDict()
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         """
+ * close(self)
  */
-      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_1) {
 
-        /* "netCDF4.pyx":1485
- *             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 = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (__pyx_t_1) {
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Group.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":1486
- *                 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)
+/* "netCDF4/_netCDF4.pyx":2269
+ *         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
  */
-          __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 = 1486; __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 = 1486; __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 = 1486; __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 = 1486; __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":1488
- *                         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)
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_5Group_5_getname(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_5Group_4_getname(((struct __pyx_obj_7netCDF4_8_netCDF4_Group *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4_getname(struct __pyx_obj_7netCDF4_8_netCDF4_Group *__pyx_v_self) {
+  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
+  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;
+  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_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("_getname", 0);
+
+  /* "netCDF4/_netCDF4.pyx":2273
+ *         cdef int err
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_grpname(self._grpid, namstring)
+ *         if ierr != NC_NOERR:
  */
-          __pyx_t_3 = __Pyx_PyInt_From_int((NC_SHARE | NC_NOCLOBBER)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __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 = 1488; __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 = 1488; __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 = 1488; __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*/ {
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
 
-        /* "netCDF4.pyx":1490
- *                         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)
+        /* "netCDF4/_netCDF4.pyx":2274
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         with nogil:
+ *             ierr = nc_inq_grpname(self._grpid, namstring)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-        __pyx_v_ierr = nc_create(__pyx_v_path, (NC_SHARE | NC_NOCLOBBER), (&__pyx_v_grpid));
+        __pyx_v_ierr = nc_inq_grpname(__pyx_v_self->__pyx_base._grpid, __pyx_v_namstring);
       }
-      __pyx_L22:;
-    }
-    __pyx_L19:;
-    goto __pyx_L6;
-  }
-  /*else*/ {
 
-    /* "netCDF4.pyx":1492
- *                     ierr = nc_create(path, NC_SHARE | NC_NOCLOBBER, &grpid)
- *         else:
- *             raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode)             # <<<<<<<<<<<<<<
+      /* "netCDF4/_netCDF4.pyx":2273
+ *         cdef int err
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_grpname(self._grpid, namstring)
  *         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 = 1492; __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 = 1492; __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 = 1492; __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 = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L5;
+        }
+        __pyx_L5:;
+      }
   }
-  __pyx_L6:;
 
-  /* "netCDF4.pyx":1493
- *         else:
- *             raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode)
+  /* "netCDF4/_netCDF4.pyx":2275
+ *         with nogil:
+ *             ierr = nc_inq_grpname(self._grpid, namstring)
  *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
  *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         # data model and file format attributes
+ *         return namstring.decode(default_encoding,unicode_error)
  */
   __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
   if (__pyx_t_1) {
 
-    /* "netCDF4.pyx":1494
- *             raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode)
+    /* "netCDF4/_netCDF4.pyx":2276
+ *             ierr = nc_inq_grpname(self._grpid, namstring)
  *         if ierr != NC_NOERR:
  *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *         # data model and file format attributes
- *         self.data_model = _get_format(grpid)
+ *         return namstring.decode(default_encoding,unicode_error)
+ * 
  */
-    __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 = 1494; __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 = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 2276; __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 = 2276; __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 = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_6);
+    __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 = 2276; __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_6, 0, 0, 0);
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
 
-  /* "netCDF4.pyx":1496
+  /* "netCDF4/_netCDF4.pyx":2277
+ *         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.
+ *         return namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ * 
+ *     property name:
  */
-  __pyx_t_6 = __pyx_f_7netCDF4__get_format(__pyx_v_grpid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2277; __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_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_7 = NULL;
+  __pyx_t_8 = 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_8 = 1;
+    }
+  }
+  __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2277; __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_4);
+  __Pyx_GIVEREF(__pyx_t_4);
+  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __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_4 = 0;
   __pyx_t_6 = 0;
+  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_r = __pyx_t_3;
+  __pyx_t_3 = 0;
+  goto __pyx_L0;
 
-  /* "netCDF4.pyx":1499
- *         # 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)
+  /* "netCDF4/_netCDF4.pyx":2269
+ *         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
  */
-  __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":1500
- *         # 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 = 1500; __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;
+  /* 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_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("netCDF4._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":1505
- *         #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 = '/'
+/* "netCDF4/_netCDF4.pyx":2281
+ *     property name:
+ *         """string name of Group instance"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getname()
+ *         def __set__(self,value):
  */
-  __pyx_v_self->_grpid = __pyx_v_grpid;
 
-  /* "netCDF4.pyx":1506
- *         #    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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_5Group_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_5Group_4name_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_5Group_4name___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Group *)__pyx_v_self));
 
-  /* "netCDF4.pyx":1507
- *         self._grpid = grpid
- *         self._isopen = 1
- *         self.path = '/'             # <<<<<<<<<<<<<<
- *         self.parent = None
- *         self.keepweakref = keepweakref
- */
-  __Pyx_INCREF(__pyx_kp_s__14);
-  __Pyx_GIVEREF(__pyx_kp_s__14);
-  __Pyx_GOTREF(__pyx_v_self->path);
-  __Pyx_DECREF(__pyx_v_self->path);
-  __pyx_v_self->path = __pyx_kp_s__14;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":1508
- *         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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_5Group_4name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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":1509
- *         self.path = '/'
- *         self.parent = None
- *         self.keepweakref = keepweakref             # <<<<<<<<<<<<<<
- *         # get compound and vlen types in the root Group.
- *         self.cmptypes, self.vltypes = _get_types(self)
+  /* "netCDF4/_netCDF4.pyx":2282
+ *         """string name of Group instance"""
+ *         def __get__(self):
+ *             return self._getname()             # <<<<<<<<<<<<<<
+ *         def __set__(self,value):
+ *             raise AttributeError("name cannot be altered")
  */
-  __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":1511
- *         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 = 1511; __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 = 1511; __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_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 = 2282; __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);
     }
-    __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 = 1511; __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 = 1511; __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 = 1511; __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 = 1511; __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 = 1511; __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":1513
- *         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 = 1513; __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":1515
- *         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 = 1515; __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":1517
- *         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 = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-
-    /* "netCDF4.pyx":1518
- *         # 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 = 1518; __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":1520
- *             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 = 1520; __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 = 1520; __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 = 1520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    __Pyx_GOTREF(__pyx_t_6);
+  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 = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __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;
+  } else {
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L27:;
+  __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":1426
- *     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
+  /* "netCDF4/_netCDF4.pyx":2281
+ *     property name:
+ *         """string name of Group instance"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getname()
+ *         def __set__(self,value):
  */
 
   /* 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_XDECREF(__pyx_t_8);
-  __Pyx_AddTraceback("netCDF4.Dataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Group.name.__get__", __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":1523
+/* "netCDF4/_netCDF4.pyx":2283
+ *         def __get__(self):
+ *             return self._getname()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("name cannot be altered")
  * 
- *     # 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;
+static int __pyx_pw_7netCDF4_8_netCDF4_5Group_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_5Group_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_7Dataset_2__enter__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_5Group_4name_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Group *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
   /* 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;
+static int __pyx_pf_7netCDF4_8_netCDF4_5Group_4name_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Group *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value) {
+  int __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__enter__", 0);
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("__set__", 0);
 
-  /* "netCDF4.pyx":1524
- *     # these allow Dataset objects to be used via a "with" statement.
- *     def __enter__(self):
- *         return self             # <<<<<<<<<<<<<<
- *     def __exit__(self,atype,value,traceback):
- *         self.close()
+  /* "netCDF4/_netCDF4.pyx":2284
+ *             return self._getname()
+ *         def __set__(self,value):
+ *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
+ * 
+ * 
  */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(((PyObject *)__pyx_v_self));
-  __pyx_r = ((PyObject *)__pyx_v_self);
-  goto __pyx_L0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __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 = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "netCDF4.pyx":1523
+  /* "netCDF4/_netCDF4.pyx":2283
+ *         def __get__(self):
+ *             return self._getname()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("name cannot be altered")
  * 
- *     # 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_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Group.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":1525
- *     def __enter__(self):
- *         return self
- *     def __exit__(self,atype,value,traceback):             # <<<<<<<<<<<<<<
- *         self.close()
+/* "netCDF4/_netCDF4.pyx":2319
+ *     cdef public _data_model, _name, _grp
  * 
+ *     def __init__(self, grp, name, size=None, **kwargs):             # <<<<<<<<<<<<<<
+ *         cdef int ierr
+ *         cdef char *dimname
  */
 
 /* 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;
+static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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;
-  PyObject *__pyx_r = 0;
+  int __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
+  __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_atype,&__pyx_n_s_value,&__pyx_n_s_traceback,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grp,&__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);
@@ -23111,1282 +19638,1129 @@ static PyObject *__pyx_pw_7netCDF4_7Dataset_5__exit__(PyObject *__pyx_v_self, Py
       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--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grp)) != 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--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2319; __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 = 1525; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        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, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2319; __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);
+      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_atype = values[0];
-    __pyx_v_value = values[1];
-    __pyx_v_traceback = values[2];
+    __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("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2319; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("netCDF4.Dataset.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
-  return NULL;
+  return -1;
   __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":1526
- *         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 = 1526; __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 = 1526; __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 = 1526; __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":1525
- *     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":1528
- *         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":1542
- *             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":1545
- * 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 = 1545; __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 = 1545; __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 = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "netCDF4.pyx":1528
- *         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":1547
- *             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));
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(((struct __pyx_obj_7netCDF4_8_netCDF4_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 PyObject *__pyx_pf_7netCDF4_7Dataset_8__repr__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
-  PyObject *__pyx_r = NULL;
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension___init__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  PyObject *__pyx_t_3 = NULL;
+  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("__repr__", 0);
+  __Pyx_RefNannySetupContext("__init__", 0);
 
-  /* "netCDF4.pyx":1548
- * 
- *     def __repr__(self):
- *         if python3:             # <<<<<<<<<<<<<<
- *            return self.__unicode__()
+  /* "netCDF4/_netCDF4.pyx":2323
+ *         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 = 2323; __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 = 2323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_self->_grpid = __pyx_t_2;
+
+  /* "netCDF4/_netCDF4.pyx":2326
+ *         # 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_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 2326; __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 = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
+  if (__pyx_t_3) {
 
-    /* "netCDF4.pyx":1549
- *     def __repr__(self):
- *         if python3:
- *            return self.__unicode__()             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":2327
+ *         # keep strong reference the default behaviour (issue 251)
+ *         if grp.keepweakref:
+ *             self._grp = weakref.proxy(grp)             # <<<<<<<<<<<<<<
  *         else:
- *            return unicode(self).encode(default_encoding)
+ *             self._grp = grp
  */
-    __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 = 1549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2327; __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 = 2327; __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_3))) {
-      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+    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_3);
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
         __Pyx_INCREF(__pyx_t_4);
         __Pyx_INCREF(function);
-        __Pyx_DECREF_SET(__pyx_t_3, function);
+        __Pyx_DECREF_SET(__pyx_t_5, 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 = 1549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    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 = 2327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
     } else {
-      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2327; __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 = 2327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     }
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_r = __pyx_t_1;
+    __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_L0;
+    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "netCDF4.pyx":1551
- *            return self.__unicode__()
+    /* "netCDF4/_netCDF4.pyx":2329
+ *             self._grp = weakref.proxy(grp)
  *         else:
- *            return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
- * 
- *     def __unicode__(self):
+ *             self._grp = grp             # <<<<<<<<<<<<<<
+ *         self._data_model = grp.data_model
+ *         self._name = name
  */
-    __Pyx_XDECREF(__pyx_r);
-    __pyx_t_3 = PyTuple_New(1); 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_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 = 1551; __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 = 1551; __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 = 1551; __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);
+    __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/_netCDF4.pyx":2330
+ *         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); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2330; __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/_netCDF4.pyx":2331
+ *             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/_netCDF4.pyx":2332
+ *         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 = 2332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = (__pyx_t_3 != 0);
+  if (__pyx_t_7) {
+
+    /* "netCDF4/_netCDF4.pyx":2333
+ *         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 = 2333; __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 = 2333; __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/_netCDF4.pyx":2335
+ *             self._dimid = kwargs['id']
+ *         else:
+ *             bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *             dimname = bytestr
+ *             if size is not None:
+ */
+    __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_v_bytestr = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":2336
+ *         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 = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_dimname = __pyx_t_8;
+
+    /* "netCDF4/_netCDF4.pyx":2337
+ *             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/_netCDF4.pyx":2338
+ *             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 = 2338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_lendim = __pyx_t_9;
+      goto __pyx_L5;
+    }
+    /*else*/ {
+
+      /* "netCDF4/_netCDF4.pyx":2340
+ *                 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/_netCDF4.pyx":2341
+ *             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); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2341; __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 = 2341; __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 = 2341; __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 = 2341; __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 = 2341; __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;
     }
-    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 = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_L6:;
+
+    /* "netCDF4/_netCDF4.pyx":2342
+ *                 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/_netCDF4.pyx":2343
+ *             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); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2343; __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 = 2343; __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 = 2343; __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 = 2343; __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 = 2343; __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 = 1551; __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 = 1551; __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;
+      goto __pyx_L7;
+    }
+    __pyx_L7:;
+
+    /* "netCDF4/_netCDF4.pyx":2344
+ *             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/_netCDF4.pyx":2345
+ *             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 = 2345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2345; __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 = 2345; __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 = 2345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
-    goto __pyx_L0;
   }
+  __pyx_L4:;
 
-  /* "netCDF4.pyx":1547
- *             raise ValueError(msg)
+  /* "netCDF4/_netCDF4.pyx":2319
+ *     cdef public _data_model, _name, _grp
  * 
- *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         if python3:
- *            return self.__unicode__()
+ *     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_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_AddTraceback("netCDF4._netCDF4.Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
   __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_XDECREF(__pyx_v_bytestr);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":1553
- *            return unicode(self).encode(default_encoding)
+/* "netCDF4/_netCDF4.pyx":2347
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  * 
- *     def __unicode__(self):             # <<<<<<<<<<<<<<
- *         ncdump = ['%r\n' % type(self)]
- *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
+ *     def _getname(self):             # <<<<<<<<<<<<<<
+ *         # private method to get name associated with instance.
+ *         cdef int err, _grpid
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_3_getname(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_3_getname(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));
+  __Pyx_RefNannySetupContext("_getname (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_2_getname(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self) {
+  int __pyx_v__grpid;
+  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;
-  PyObject *__pyx_t_3 = NULL;
-  PyObject *__pyx_t_4 = NULL;
-  Py_ssize_t __pyx_t_5;
-  PyObject *(*__pyx_t_6)(PyObject *);
+  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;
-  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);
+  __Pyx_RefNannySetupContext("_getname", 0);
 
-  /* "netCDF4.pyx":1554
- * 
- *     def __unicode__(self):
- *         ncdump = ['%r\n' % type(self)]             # <<<<<<<<<<<<<<
- *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
- *         for dimname in self.dimensions.keys()])
+  /* "netCDF4/_netCDF4.pyx":2351
+ *         cdef int err, _grpid
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         _grpid = self._grp._grpid             # <<<<<<<<<<<<<<
+ *         with nogil:
+ *             ierr = nc_inq_dimname(_grpid, self._dimid, namstring)
  */
-  __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 = 1554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 2351; __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 = 1554; __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;
+  __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 = 2351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v__grpid = __pyx_t_2;
 
-  /* "netCDF4.pyx":1555
- *     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(\
+  /* "netCDF4/_netCDF4.pyx":2352
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         _grpid = self._grp._grpid
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_dimname(_grpid, self._dimid, namstring)
+ *         if ierr != NC_NOERR:
  */
-  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
 
-  /* "netCDF4.pyx":1556
- *         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'+
+        /* "netCDF4/_netCDF4.pyx":2353
+ *         _grpid = self._grp._grpid
+ *         with nogil:
+ *             ierr = nc_inq_dimname(_grpid, self._dimid, namstring)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-  __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 = 1556; __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 = 1556; __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 = 1556; __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 = 1556; __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 = 1556; __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 = 1556; __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 = 1556; __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 = 1556; __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 = 1556; __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 = 1556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
+        __pyx_v_ierr = nc_inq_dimname(__pyx_v__grpid, __pyx_v_self->_dimid, __pyx_v_namstring);
       }
-      __Pyx_GOTREF(__pyx_t_1);
-    }
-    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_1);
-    __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":1555
- *     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(\
+      /* "netCDF4/_netCDF4.pyx":2352
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         _grpid = self._grp._grpid
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_dimname(_grpid, self._dimid, namstring)
+ *         if ierr != NC_NOERR:
  */
-    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); 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_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);
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L5;
+        }
+        __pyx_L5:;
       }
-    }
-    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 = 1555; __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 = 1555; __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 = 1555; __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 = 1555; __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 = 1555; __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 = 1555; __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 = 1555; __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 = 1555; __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 = 1555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-    /* "netCDF4.pyx":1556
- *         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":1555
- *     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(\
+  /* "netCDF4/_netCDF4.pyx":2354
+ *         with nogil:
+ *             ierr = nc_inq_dimname(_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 = PyList_AsTuple(((PyObject*)__pyx_t_2)); 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_2); __pyx_t_2 = 0;
-  __pyx_v_dimnames = ((PyObject*)__pyx_t_3);
-  __pyx_t_3 = 0;
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
 
-  /* "netCDF4.pyx":1558
- *         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'",""))\
+    /* "netCDF4/_netCDF4.pyx":2355
+ *             ierr = nc_inq_dimname(_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 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+    __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 = 2355; __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 = 2355; __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 = 2355; __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 = 2355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-  /* "netCDF4.pyx":1563
- *         .replace("'",""))\
- *         .replace(", ",","))\
- *         .replace(",)",")") for varname in self.variables.keys()])             # <<<<<<<<<<<<<<
- *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
- *         if self.path == '/':
+  /* "netCDF4/_netCDF4.pyx":2356
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         return namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ * 
+ *     property name:
  */
-  __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 = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
+  __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 = 2356; __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 = 2356; __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 = 2356; __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 = 2356; __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_4))) {
-    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
+  __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_4);
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
       __Pyx_INCREF(__pyx_t_8);
       __Pyx_INCREF(function);
-      __Pyx_DECREF_SET(__pyx_t_4, 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 = 2356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
   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 = 1563; __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 = 1563; __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 = 1563; __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 = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
   }
-  __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 = 1563; __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 = 1563; __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 = 1563; __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 = 1563; __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 = 1563; __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;
+  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 = 2356; __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":1558
- *         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'",""))\
+  /* "netCDF4/_netCDF4.pyx":2347
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def _getname(self):             # <<<<<<<<<<<<<<
+ *         # private method to get name associated with instance.
+ *         cdef int err, _grpid
  */
-    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __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 = 1558; __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 = 1558; __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 = 1558; __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 = 1558; __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 = 1558; __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 = 1558; __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 = 1558; __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 = 1558; __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 = 1558; __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 = 1558; __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 = 1558; __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 = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
-    /* "netCDF4.pyx":1559
- *         varnames = tuple(\
- *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
- *         (((_tostr(self.variables[varname].dimensions)             # <<<<<<<<<<<<<<
- *         .replace("u'",""))\
- *         .replace("'",""))\
+  /* 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._netCDF4.Dimension._getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":2360
+ *     property name:
+ *         """string name of Dimension instance"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getname()
+ *         def __set__(self,value):
  */
-    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1559; __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 = 1559; __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 = 1559; __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 = 1559; __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 = 1559; __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 = 1559; __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":1560
- *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
- *         (((_tostr(self.variables[varname].dimensions)
- *         .replace("u'",""))\             # <<<<<<<<<<<<<<
- *         .replace("'",""))\
- *         .replace(", ",","))\
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_4name_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":2361
+ *         """string name of Dimension instance"""
+ *         def __get__(self):
+ *             return self._getname()             # <<<<<<<<<<<<<<
+ *         def __set__(self,value):
+ *             raise AttributeError("name cannot be altered")
  */
-    __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 = 1560; __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__36, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __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 = 2361; __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 = 2361; __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 = 2361; __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":1561
- *         (((_tostr(self.variables[varname].dimensions)
- *         .replace("u'",""))\
- *         .replace("'",""))\             # <<<<<<<<<<<<<<
- *         .replace(", ",","))\
- *         .replace(",)",")") for varname in self.variables.keys()])
+  /* "netCDF4/_netCDF4.pyx":2360
+ *     property name:
+ *         """string name of Dimension instance"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getname()
+ *         def __set__(self,value):
  */
-    __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 = 1561; __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__38, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-    /* "netCDF4.pyx":1562
- *         .replace("u'",""))\
- *         .replace("'",""))\
- *         .replace(", ",","))\             # <<<<<<<<<<<<<<
- *         .replace(",)",")") for varname in self.variables.keys()])
- *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.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._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/_netCDF4.pyx":2362
+ *         def __get__(self):
+ *             return self._getname()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("name cannot be altered")
+ * 
  */
-    __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 = 1562; __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__41, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-    /* "netCDF4.pyx":1563
- *         .replace("'",""))\
- *         .replace(", ",","))\
- *         .replace(",)",")") for varname in self.variables.keys()])             # <<<<<<<<<<<<<<
- *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
- *         if self.path == '/':
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_4name_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4name_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":2363
+ *             return self._getname()
+ *         def __set__(self,value):
+ *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
+ * 
+ *     def __repr__(self):
  */
-    __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 = 1563; __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__44, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_10);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2363; __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 = 2363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-    /* "netCDF4.pyx":1558
- *         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'",""))\
+  /* "netCDF4/_netCDF4.pyx":2362
+ *         def __get__(self):
+ *             return self._getname()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("name cannot be altered")
+ * 
  */
-    __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __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 = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-    /* "netCDF4.pyx":1563
- *         .replace("'",""))\
- *         .replace(", ",","))\
- *         .replace(",)",")") for varname in self.variables.keys()])             # <<<<<<<<<<<<<<
- *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
- *         if self.path == '/':
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dimension.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":2365
+ *             raise AttributeError("name cannot be altered")
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *             return self.__unicode__()
  */
-  }
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "netCDF4.pyx":1557
- *         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)
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_5__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_5__repr__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":2366
+ * 
+ *     def __repr__(self):
+ *         if python3:             # <<<<<<<<<<<<<<
+ *             return self.__unicode__()
+ *         else:
  */
-  __pyx_t_4 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; __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;
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2366; __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 = 2366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
 
-  /* "netCDF4.pyx":1564
- *         .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' %
+    /* "netCDF4/_netCDF4.pyx":2367
+ *     def __repr__(self):
+ *         if python3:
+ *             return self.__unicode__()             # <<<<<<<<<<<<<<
+ *         else:
+ *             return unicode(self).encode(default_encoding)
  */
-  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __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 = 1564; __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 = 1564; __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 = 1564; __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 = 1564; __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 = 1564; __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 = 1564; __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 = 1564; __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 = 1564; __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 = 1564; __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 = 1564; __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 = 1564; __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_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 = 2367; __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_10, function);
+        __Pyx_DECREF_SET(__pyx_t_3, 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 = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+    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 = 2367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     } else {
-      __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __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 = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __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 = 1564; __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_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 = 1564; __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":1565
- *         .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__14, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_12) {
-
-    /* "netCDF4.pyx":1567
- *         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 = 1567; __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":1566
- *         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 = 1566; __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 = 1566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    goto __pyx_L9;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
   }
   /*else*/ {
 
-    /* "netCDF4.pyx":1569
- *                     (self.data_model, self.disk_format))
+    /* "netCDF4/_netCDF4.pyx":2369
+ *             return self.__unicode__()
  *         else:
- *             ncdump.append('group %s:\n' % self.path)             # <<<<<<<<<<<<<<
- *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\
- *                 self.ncattrs()]
+ *             return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
+ * 
+ *     def __unicode__(self):
  */
-    __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 = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2369; __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 = 2369; __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 = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 2369; __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 = 2369; __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 = 2369; __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 = 2369; __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 = 2369; __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;
   }
-  __pyx_L9:;
 
-  /* "netCDF4.pyx":1570
- *         else:
- *             ncdump.append('group %s:\n' % self.path)
- *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\             # <<<<<<<<<<<<<<
- *                 self.ncattrs()]
- *         ncdump = ncdump + attrs
+  /* "netCDF4/_netCDF4.pyx":2365
+ *             raise AttributeError("name cannot be altered")
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *             return self.__unicode__()
  */
-  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
 
-  /* "netCDF4.pyx":1571
- *             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 = 1571; __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 = 1571; __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 = 1571; __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 = 1571; __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 = 1571; __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 = 1571; __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 = 1571; __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 = 1571; __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 = 1571; __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 = 1571; __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;
+  /* 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._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":1570
- *         else:
- *             ncdump.append('group %s:\n' % self.path)
- *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\             # <<<<<<<<<<<<<<
- *                 self.ncattrs()]
- *         ncdump = ncdump + attrs
+/* "netCDF4/_netCDF4.pyx":2371
+ *             return unicode(self).encode(default_encoding)
+ * 
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         if not dir(self._grp):
+ *             return 'Dimension object no longer valid'
  */
-    __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 = 1570; __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 = 1570; __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 = 1570; __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 = 1570; __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 = 1570; __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 = 1570; __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 = 1570; __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":1572
- *         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))
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_7__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_6__unicode__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":2372
+ * 
+ *     def __unicode__(self):
+ *         if not dir(self._grp):             # <<<<<<<<<<<<<<
+ *             return 'Dimension object no longer valid'
+ *         if self.isunlimited():
  */
-  __pyx_t_4 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1572; __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;
+  __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 = 2372; __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 = 2372; __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":1573
- *                 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))
+    /* "netCDF4/_netCDF4.pyx":2373
+ *     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_t_4 = __Pyx_PyString_Join(__pyx_kp_s__39, __pyx_v_dimnames); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1573; __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 = 1573; __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 = 1573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __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":1574
- *         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)
+  /* "netCDF4/_netCDF4.pyx":2374
+ *         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_3 = __Pyx_PyString_Join(__pyx_kp_s__39, __pyx_v_varnames); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1574; __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 = 1574; __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 = 1574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __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 = 2374; __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 = 2374; __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 = 2374; __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 = 2374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (__pyx_t_4) {
 
-  /* "netCDF4.pyx":1575
- *         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)
- * 
+    /* "netCDF4/_netCDF4.pyx":2375
+ *             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_t_4 = __Pyx_PyString_Join(__pyx_kp_s__39, __pyx_v_grpnames); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __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 = 1575; __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 = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __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 = 2375; __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 = 2375; __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 = 2375; __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 = 2375; __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 = 2375; __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 = 2375; __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":1576
- *         ncdump.append('    variables(dimensions): %s\n' % ', '.join(varnames))
- *         ncdump.append('    groups: %s\n' % ', '.join(grpnames))
- *         return ''.join(ncdump)             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":2377
+ *             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 close(self):
+ *     def __len__(self):
  */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__15, __pyx_v_ncdump); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
-  goto __pyx_L0;
+    __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 = 2377; __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 = 2377; __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 = 2377; __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 = 2377; __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 = 2377; __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 = 2377; __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":1553
- *            return unicode(self).encode(default_encoding)
+  /* "netCDF4/_netCDF4.pyx":2371
+ *             return unicode(self).encode(default_encoding)
  * 
  *     def __unicode__(self):             # <<<<<<<<<<<<<<
- *         ncdump = ['%r\n' % type(self)]
- *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
+ *         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_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_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dimension.__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":1578
- *         return ''.join(ncdump)
+/* "netCDF4/_netCDF4.pyx":2379
+ *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
  * 
- *     def close(self):             # <<<<<<<<<<<<<<
- *         """
- * close(self)
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         # len(L{Dimension} instance) returns current size of dimension
+ *         cdef int ierr
  */
 
 /* 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;
+static Py_ssize_t __pyx_pw_7netCDF4_8_netCDF4_9Dimension_9__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pw_7netCDF4_8_netCDF4_9Dimension_9__len__(PyObject *__pyx_v_self) {
+  Py_ssize_t __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("close (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_7Dataset_12close(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__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) {
+static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_9Dimension_8__len__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self) {
   int __pyx_v_ierr;
-  PyObject *__pyx_r = NULL;
+  size_t __pyx_v_lengthp;
+  Py_ssize_t __pyx_r;
   __Pyx_RefNannyDeclarations
   int __pyx_t_1;
   char *__pyx_t_2;
@@ -24395,437 +20769,671 @@ static PyObject *__pyx_pf_7netCDF4_7Dataset_12close(struct __pyx_obj_7netCDF4_Da
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("close", 0);
+  __Pyx_RefNannySetupContext("__len__", 0);
 
-  /* "netCDF4.pyx":1584
- * Close the Dataset."""
+  /* "netCDF4/_netCDF4.pyx":2383
  *         cdef int ierr
- *         ierr = nc_close(self._grpid)             # <<<<<<<<<<<<<<
+ *         cdef size_t lengthp
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
+ *         if ierr != NC_NOERR:
+ */
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
+
+        /* "netCDF4/_netCDF4.pyx":2384
+ *         cdef size_t lengthp
+ *         with nogil:
+ *             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_close(__pyx_v_self->_grpid);
+        __pyx_v_ierr = nc_inq_dimlen(__pyx_v_self->_grpid, __pyx_v_self->_dimid, (&__pyx_v_lengthp));
+      }
 
-  /* "netCDF4.pyx":1585
+      /* "netCDF4/_netCDF4.pyx":2383
  *         cdef int ierr
- *         ierr = nc_close(self._grpid)
+ *         cdef size_t lengthp
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
+ *         if ierr != NC_NOERR:
+ */
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L5;
+        }
+        __pyx_L5:;
+      }
+  }
+
+  /* "netCDF4/_netCDF4.pyx":2385
+ *         with nogil:
+ *             ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
  *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
  *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         self._isopen = 0 # indicates file already closed, checked by __dealloc__
+ *         return lengthp
  */
   __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
   if (__pyx_t_1) {
 
-    /* "netCDF4.pyx":1586
- *         ierr = nc_close(self._grpid)
+    /* "netCDF4/_netCDF4.pyx":2386
+ *             ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
  *         if ierr != NC_NOERR:
  *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *         self._isopen = 0 # indicates file already closed, checked by __dealloc__
+ *         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 = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 2386; __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 = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2386; __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 = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 2386; __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 = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
 
-  /* "netCDF4.pyx":1587
+  /* "netCDF4/_netCDF4.pyx":2387
  *         if ierr != NC_NOERR:
  *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         self._isopen = 0 # indicates file already closed, checked by __dealloc__             # <<<<<<<<<<<<<<
+ *         return lengthp             # <<<<<<<<<<<<<<
  * 
- *     def __dealloc__(self):
+ *     def group(self):
  */
-  __pyx_v_self->_isopen = 0;
+  __pyx_r = __pyx_v_lengthp;
+  goto __pyx_L0;
 
-  /* "netCDF4.pyx":1578
- *         return ''.join(ncdump)
+  /* "netCDF4/_netCDF4.pyx":2379
+ *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
  * 
- *     def close(self):             # <<<<<<<<<<<<<<
- *         """
- * close(self)
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         # len(L{Dimension} instance) returns current size of dimension
+ *         cdef int ierr
  */
 
   /* 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_AddTraceback("netCDF4._netCDF4.Dimension.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
   __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":1589
- *         self._isopen = 0 # indicates file already closed, checked by __dealloc__
+/* "netCDF4/_netCDF4.pyx":2389
+ *         return lengthp
  * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         # close file when there are no references to object left
- *         cdef int ierr
+ *     def group(self):             # <<<<<<<<<<<<<<
+ *         """
+ * group(self)
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_11group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_9Dimension_10group[] = "\ngroup(self)\n\nreturn the group that this L{Dimension} is a member of.";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_11group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-  __pyx_pf_7netCDF4_7Dataset_14__dealloc__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+  __Pyx_RefNannySetupContext("group (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension_10group(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self));
 
   /* function exit code */
   __Pyx_RefNannyFinishContext();
+  return __pyx_r;
 }
 
-static void __pyx_pf_7netCDF4_7Dataset_14__dealloc__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
-  CYTHON_UNUSED int __pyx_v_ierr;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_10group(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  __Pyx_RefNannySetupContext("__dealloc__", 0);
+  __Pyx_RefNannySetupContext("group", 0);
 
-  /* "netCDF4.pyx":1592
- *         # close file when there are no references to object left
- *         cdef int ierr
- *         if self._isopen:             # <<<<<<<<<<<<<<
- *             ierr = nc_close(self._grpid)
+  /* "netCDF4/_netCDF4.pyx":2394
  * 
- */
-  __pyx_t_1 = (__pyx_v_self->_isopen != 0);
-  if (__pyx_t_1) {
-
-    /* "netCDF4.pyx":1593
- *         cdef int ierr
- *         if self._isopen:
- *             ierr = nc_close(self._grpid)             # <<<<<<<<<<<<<<
+ * return the group that this L{Dimension} is a member of."""
+ *         return self._grp             # <<<<<<<<<<<<<<
  * 
- *     def sync(self):
+ *     def isunlimited(self):
  */
-    __pyx_v_ierr = nc_close(__pyx_v_self->_grpid);
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_grp);
+  __pyx_r = __pyx_v_self->_grp;
+  goto __pyx_L0;
 
-  /* "netCDF4.pyx":1589
- *         self._isopen = 0 # indicates file already closed, checked by __dealloc__
+  /* "netCDF4/_netCDF4.pyx":2389
+ *         return lengthp
  * 
- *     def __dealloc__(self):             # <<<<<<<<<<<<<<
- *         # close file when there are no references to object left
- *         cdef int ierr
+ *     def group(self):             # <<<<<<<<<<<<<<
+ *         """
+ * group(self)
  */
 
   /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
+  return __pyx_r;
 }
 
-/* "netCDF4.pyx":1595
- *             ierr = nc_close(self._grpid)
+/* "netCDF4/_netCDF4.pyx":2396
+ *         return self._grp
  * 
- *     def sync(self):             # <<<<<<<<<<<<<<
+ *     def isunlimited(self):             # <<<<<<<<<<<<<<
  *         """
- * sync(self)
+ * isunlimited(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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_13isunlimited(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_9Dimension_12isunlimited[] = "\nisunlimited(self)\n\nreturns C{True} if the L{Dimension} instance is unlimited, C{False} otherwise.";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_13isunlimited(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));
+  __Pyx_RefNannySetupContext("isunlimited (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_12isunlimited(struct __pyx_obj_7netCDF4_8_netCDF4_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("sync", 0);
+  __Pyx_RefNannySetupContext("isunlimited", 0);
 
-  /* "netCDF4.pyx":1601
- * 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'))
+  /* "netCDF4/_netCDF4.pyx":2403
+ *         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_v_ierr = nc_sync(__pyx_v_self->_grpid);
+  __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 = 2403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
 
-  /* "netCDF4.pyx":1602
- *         cdef int ierr
- *         ierr = nc_sync(self._grpid)
- *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- * 
+    /* "netCDF4/_netCDF4.pyx":2404
+ *         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_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_1) {
+    __pyx_v_ierr = nc_inq_unlimdims(__pyx_v_self->_grpid, (&__pyx_v_numunlimdims), NULL);
 
-    /* "netCDF4.pyx":1603
- *         ierr = nc_sync(self._grpid)
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- * 
- *     def _redef(self):
+    /* "netCDF4/_netCDF4.pyx":2405
+ *         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_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 = 1603; __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 = 1603; __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 = 1603; __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 = 1603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+    __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_1) {
 
-  /* "netCDF4.pyx":1595
- *             ierr = nc_close(self._grpid)
- * 
- *     def sync(self):             # <<<<<<<<<<<<<<
+      /* "netCDF4/_netCDF4.pyx":2406
+ *             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 = 2406; __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 = 2406; __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 = 2406; __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 = 2406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4/_netCDF4.pyx":2407
+ *             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/_netCDF4.pyx":2408
+ *                 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/_netCDF4.pyx":2410
+ *                 return False
+ *             else:
+ *                 dimid = self._dimid             # <<<<<<<<<<<<<<
+ *                 with nogil:
+ *                     ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
+ */
+      __pyx_t_5 = __pyx_v_self->_dimid;
+      __pyx_v_dimid = __pyx_t_5;
+
+      /* "netCDF4/_netCDF4.pyx":2411
+ *             else:
+ *                 dimid = self._dimid
+ *                 with nogil:             # <<<<<<<<<<<<<<
+ *                     ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
+ *                 if ierr != NC_NOERR:
+ */
+      {
+          #ifdef WITH_THREAD
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
+          #endif
+          /*try:*/ {
+
+            /* "netCDF4/_netCDF4.pyx":2412
+ *                 dimid = self._dimid
+ *                 with nogil:
+ *                     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/_netCDF4.pyx":2411
+ *             else:
+ *                 dimid = self._dimid
+ *                 with nogil:             # <<<<<<<<<<<<<<
+ *                     ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
+ *                 if ierr != NC_NOERR:
+ */
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L8;
+            }
+            __pyx_L8:;
+          }
+      }
+
+      /* "netCDF4/_netCDF4.pyx":2413
+ *                 with nogil:
+ *                     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/_netCDF4.pyx":2414
+ *                     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 = 2414; __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 = 2414; __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 = 2414; __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 = 2414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4/_netCDF4.pyx":2415
+ *                 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 = 2415; __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/_netCDF4.pyx":2416
+ *                     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/_netCDF4.pyx":2417
+ *                 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 = 2417; __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 = 2417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      }
+
+      /* "netCDF4/_netCDF4.pyx":2418
+ *                 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 = 2418; __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 = 2418; __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/_netCDF4.pyx":2419
+ *                     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/_netCDF4.pyx":2421
+ *                     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/_netCDF4.pyx":2424
+ *         else: # if not NETCDF4, there is only one unlimited dimension.
+ *             # nc_inq_unlimdims only works for NETCDF4.
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
+ *             if self._dimid == xdimid:
+ */
+    {
+        #ifdef WITH_THREAD
+        PyThreadState *_save;
+        Py_UNBLOCK_THREADS
+        #endif
+        /*try:*/ {
+
+          /* "netCDF4/_netCDF4.pyx":2425
+ *             # nc_inq_unlimdims only works for NETCDF4.
+ *             with nogil:
+ *                 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/_netCDF4.pyx":2424
+ *         else: # if not NETCDF4, there is only one unlimited dimension.
+ *             # nc_inq_unlimdims only works for NETCDF4.
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
+ *             if self._dimid == xdimid:
+ */
+        /*finally:*/ {
+          /*normal exit:*/{
+            #ifdef WITH_THREAD
+            Py_BLOCK_THREADS
+            #endif
+            goto __pyx_L15;
+          }
+          __pyx_L15:;
+        }
+    }
+
+    /* "netCDF4/_netCDF4.pyx":2426
+ *             with nogil:
+ *                 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/_netCDF4.pyx":2427
+ *                 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/_netCDF4.pyx":2429
+ *                 return True
+ *             else:
+ *                 return False             # <<<<<<<<<<<<<<
+ * 
+ * cdef class Variable:
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __Pyx_INCREF(Py_False);
+      __pyx_r = Py_False;
+      goto __pyx_L0;
+    }
+  }
+
+  /* "netCDF4/_netCDF4.pyx":2396
+ *         return self._grp
+ * 
+ *     def isunlimited(self):             # <<<<<<<<<<<<<<
  *         """
- * sync(self)
+ * isunlimited(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_AddTraceback("netCDF4._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":1605
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+/* "netCDF4/_netCDF4.pyx":2316
+ * 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 _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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_6_dimid_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_6_dimid_1__get__(PyObject *__pyx_v_self) {
   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));
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_dimid___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_dimid___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_redef", 0);
-
-  /* "netCDF4.pyx":1607
- *     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":1605
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- * 
- *     def _redef(self):             # <<<<<<<<<<<<<<
- *         cdef int ierr
- *         ierr = nc_redef(self._grpid)
- */
+  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 = 2316; __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_r = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dimension._dimid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":1609
- *         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;
+static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_6_dimid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_6_dimid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_enddef (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_7Dataset_20_enddef(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_dimid_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
   /* 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;
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_dimid_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_enddef", 0);
-
-  /* "netCDF4.pyx":1611
- *     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":1609
- *         ierr = nc_redef(self._grpid)
- * 
- *     def _enddef(self):             # <<<<<<<<<<<<<<
- *         cdef int ierr
- *         ierr = nc_enddef(self._grpid)
- */
+  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 = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_dimid = __pyx_t_1;
 
   /* function exit code */
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  __Pyx_XGIVEREF(__pyx_r);
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dimension._dimid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":1613
- *         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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_6_grpid_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_6_grpid_1__get__(PyObject *__pyx_v_self) {
   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));
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_grpid___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_grpid___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self) {
   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_1 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("set_fill_on", 0);
-
-  /* "netCDF4.pyx":1627
- * 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":1628
- *         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":1629
- *         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 = 1629; __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 = 1629; __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 = 1629; __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 = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-
-  /* "netCDF4.pyx":1613
- *         ierr = nc_enddef(self._grpid)
- * 
- *     def set_fill_on(self):             # <<<<<<<<<<<<<<
- *         """
- * set_fill_on(self)
- */
+  __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 = 2316; __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_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_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Dimension._grpid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -24833,278 +21441,398 @@ static PyObject *__pyx_pf_7netCDF4_7Dataset_22set_fill_on(struct __pyx_obj_7netC
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":1631
- *             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;
+static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
   __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));
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_grpid_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
   /* 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;
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_6_grpid_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __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("set_fill_off", 0);
-
-  /* "netCDF4.pyx":1641
- * 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":1642
- *         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":1643
- *         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 = 1643; __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 = 1643; __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 = 1643; __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 = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-
-  /* "netCDF4.pyx":1631
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- * 
- *     def set_fill_off(self):             # <<<<<<<<<<<<<<
- *         """
- * set_fill_off(self)
- */
+  __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 = 2316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_grpid = __pyx_t_1;
 
   /* function exit code */
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_r = 0;
   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_AddTraceback("netCDF4._netCDF4.Dimension._grpid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
   __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":1645
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+/* "netCDF4/_netCDF4.pyx":2317
+ * determine if the dimension is unlimited"""
+ *     cdef public int _dimid, _grpid
+ *     cdef public _data_model, _name, _grp             # <<<<<<<<<<<<<<
  * 
- *     def createDimension(self, dimname, size=None):             # <<<<<<<<<<<<<<
- *         """
- * createDimension(self, dimname, size=None)
+ *     def __init__(self, grp, name, size=None, **kwargs):
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_11_data_model_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9Dimension_11_data_model_1__get__(PyObject *__pyx_v_self) {
   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 = 1645; __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 = 1645; __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);
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension_11_data_model___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self));
 
   /* 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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_11_data_model___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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("createDimension", 0);
+  __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;
 
-  /* "netCDF4.pyx":1658
- * 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 = 1658; __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 = 1658; __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 = 1658; __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 = 1658; __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 = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":1659
- * 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):
- */
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_11_data_model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_11_data_model_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_11_data_model_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_11_data_model_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_11_data_model_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_11_data_model_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_5_name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_5_name___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_5_name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
   __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 = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
+  __Pyx_INCREF(__pyx_v_self->_name);
+  __pyx_r = __pyx_v_self->_name;
   goto __pyx_L0;
 
-  /* "netCDF4.pyx":1645
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- * 
- *     def createDimension(self, dimname, size=None):             # <<<<<<<<<<<<<<
- *         """
- * createDimension(self, dimname, size=None)
- */
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_5_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_5_name_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_5_name_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_5_name_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_5_name_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension_5_name_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_5_name_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_4_grp_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_4_grp___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9Dimension_4_grp___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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_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":1661
- *         return self.dimensions[dimname]
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_4_grp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_4_grp_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4_grp_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_9Dimension_4_grp_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_9Dimension_4_grp_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4_grp_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_9Dimension_4_grp_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":2571
+ *     _isvlen, _grp, _cmptype, _vltype, __orthogonal_indexing__
  * 
- *     def renameDimension(self, oldname, newname):             # <<<<<<<<<<<<<<
- *         """
- * renameDimension(self, oldname, newname)
+ *     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 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;
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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;
-  PyObject *__pyx_r = 0;
+  int __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("renameDimension (wrapper)", 0);
+  __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_oldname,&__pyx_n_s_newname,0};
-    PyObject* values[2] = {0,0};
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grp,&__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/_netCDF4.pyx":2572
+ * 
+ *     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/_netCDF4.pyx":2573
+ *     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, _grpid
+ */
+    values[9] = ((PyObject *)Py_None);
+    values[10] = ((PyObject *)__pyx_n_s_native);
+    values[11] = ((PyObject *)Py_None);
+
+    /* "netCDF4/_netCDF4.pyx":2574
+ *             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, _grpid
+ *         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;
@@ -25113,4750 +21841,4868 @@ static PyObject *__pyx_pw_7netCDF4_7Dataset_29renameDimension(PyObject *__pyx_v_
       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--;
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grp)) != 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--;
+        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 = 2571; __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("renameDimension", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2571; __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, 0, values, pos_args, "renameDimension") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2571; __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);
+      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_oldname = values[0];
-    __pyx_v_newname = values[1];
+    __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("renameDimension", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2571; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("netCDF4.Dataset.renameDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
-  return NULL;
+  return -1;
   __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);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(((struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":2571
+ *     _isvlen, _grp, _cmptype, _vltype, __orthogonal_indexing__
+ * 
+ *     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 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;
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable___init__(struct __pyx_obj_7netCDF4_8_netCDF4_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,  [...]
+  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;
-  int __pyx_v_ierr;
-  PyObject *__pyx_r = NULL;
+  PyObject *__pyx_v_fillval = NULL;
+  int __pyx_r;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  char *__pyx_t_2;
-  int __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
+  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;
-  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":1667
- * 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()
+  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/_netCDF4.pyx":2583
+ *         cdef float preemptionp
+ *         # flag to indicate that orthogonal indexing is supported
+ *         self.__orthogonal_indexing__ = True             # <<<<<<<<<<<<<<
+ *         # if complevel is set to zero, set zlib to False.
+ *         if not complevel:
  */
-  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_bytestr = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __Pyx_INCREF(Py_True);
+  __Pyx_GIVEREF(Py_True);
+  __Pyx_GOTREF(__pyx_v_self->__orthogonal_indexing__);
+  __Pyx_DECREF(__pyx_v_self->__orthogonal_indexing__);
+  __pyx_v_self->__orthogonal_indexing__ = Py_True;
 
-  /* "netCDF4.pyx":1668
- *         cdef char *namstring
- *         bytestr = _strencode(newname)
- *         namstring = bytestr             # <<<<<<<<<<<<<<
- *         if self.data_model != 'NETCDF4': self._redef()
- *         try:
+  /* "netCDF4/_netCDF4.pyx":2585
+ *         self.__orthogonal_indexing__ = True
+ *         # 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_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_namstring = __pyx_t_2;
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_complevel); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = ((!__pyx_t_1) != 0);
+  if (__pyx_t_2) {
 
-  /* "netCDF4.pyx":1669
- *         bytestr = _strencode(newname)
- *         namstring = bytestr
- *         if self.data_model != 'NETCDF4': self._redef()             # <<<<<<<<<<<<<<
- *         try:
- *             dim = self.dimensions[oldname]
+    /* "netCDF4/_netCDF4.pyx":2586
+ *         # 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_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 = 1669; __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 = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_INCREF(Py_False);
+    __Pyx_DECREF_SET(__pyx_v_zlib, Py_False);
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "netCDF4/_netCDF4.pyx":2590
+ *         # 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 = 2590; __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 = 2590; __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 = 2590; __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 = 2590; __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 = 2590; __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 = 2590; __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/_netCDF4.pyx":2591
+ *         # 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 = 2591; __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/_netCDF4.pyx":2592
+ *         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 = 2592; __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 = 2592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_v_self->_grpid = __pyx_t_4;
+
+  /* "netCDF4/_netCDF4.pyx":2595
+ *         # 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 = 2595; __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 = 2595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (__pyx_t_2) {
+
+    /* "netCDF4/_netCDF4.pyx":2596
+ *         # 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 = 2596; __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 = 2596; __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 && likely(PyMethod_Check(__pyx_t_4))) {
-      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+    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_4);
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
         __Pyx_INCREF(__pyx_t_5);
         __Pyx_INCREF(function);
-        __Pyx_DECREF_SET(__pyx_t_4, function);
+        __Pyx_DECREF_SET(__pyx_t_6, 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 = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    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 = 2596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
     } else {
-      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2596; __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 = 2596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
     }
-    __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_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;
   }
-  __pyx_L3:;
+  /*else*/ {
 
-  /* "netCDF4.pyx":1670
- *         namstring = bytestr
- *         if self.data_model != 'NETCDF4': self._redef()
- *         try:             # <<<<<<<<<<<<<<
- *             dim = self.dimensions[oldname]
- *         except KeyError:
+    /* "netCDF4/_netCDF4.pyx":2598
+ *             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_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:*/ {
+    __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":1671
- *         if self.data_model != 'NETCDF4': self._redef()
- *         try:
- *             dim = self.dimensions[oldname]             # <<<<<<<<<<<<<<
- *         except KeyError:
- *             raise KeyError('%s not a valid dimension name' % oldname)
+  /* "netCDF4/_netCDF4.pyx":2600
+ *             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 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_oldname); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __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;
+  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_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":1672
- *         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)
+  /* "netCDF4/_netCDF4.pyx":2601
+ *         # 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_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 = 1672; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_8 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_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":1673
- *             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()
+  /* "netCDF4/_netCDF4.pyx":2602
+ *         if (not isinstance(datatype, CompoundType) and \
+ *             not isinstance(datatype, VLType)) and \
+ *             datatype != str and \             # <<<<<<<<<<<<<<
+ *             type(datatype) != numpy.dtype:
+ *             datatype = numpy.dtype(datatype)
  */
-      __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 = 1673; __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 = 1673; __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 = 1673; __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 = 1673; __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:;
+  __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 = 2602; __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 = 2602; __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":1674
- *         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:
+  /* "netCDF4/_netCDF4.pyx":2603
+ *             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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_dimid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __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 = 1674; __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);
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); 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_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 = 2603; __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 = 2603; __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":1675
- *             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'))
+    /* "netCDF4/_netCDF4.pyx":2604
+ *             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_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 = 1675; __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 = 1675; __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_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __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_4, function);
+        __Pyx_DECREF_SET(__pyx_t_7, 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 = 1675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    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 = 2604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
     } else {
-      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2604; __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 = 2604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     }
-    __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_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_L14:;
-
-  /* "netCDF4.pyx":1676
- *         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) {
+  __pyx_L9:;
 
-    /* "netCDF4.pyx":1677
- *         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)
+  /* "netCDF4/_netCDF4.pyx":2607
+ *         # 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_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 = 1677; __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 = 1677; __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 = 1677; __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 = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2607; __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 = 2607; __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 = 2607; __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":1679
- *             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
+  /* "netCDF4/_netCDF4.pyx":2608
+ *         # 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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dimensions, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __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);
-    }
+  __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 = 2608; __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 = 2608; __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 {
   }
-  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 = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
+  __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 = 2608; __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 = 2608; __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 = 2608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  if (!__pyx_t_8) {
   } else {
-    __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __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 = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_5);
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    __pyx_t_2 = __pyx_t_8;
+    goto __pyx_L15_bool_binop_done;
   }
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_L17_next_or:;
 
-  /* "netCDF4.pyx":1681
- *         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.
+  /* "netCDF4/_netCDF4.pyx":2609
+ *         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.
  */
-  if (unlikely(PyObject_SetItem(__pyx_v_self->dimensions, __pyx_v_newname, __pyx_v_dim) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 2609; __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 = 2609; __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":1661
- *         return self.dimensions[dimname]
- * 
- *     def renameDimension(self, oldname, newname):             # <<<<<<<<<<<<<<
- *         """
- * renameDimension(self, oldname, newname)
+    /* "netCDF4/_netCDF4.pyx":2610
+ *             ((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:;
 
-  /* 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/_netCDF4.pyx":2612
+ *             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 = 2612; __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":1685
- *         # looks in the file, so no need to manually update.
- * 
- *     def createCompoundType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
- *         """
- * createCompoundType(self, datatype, datatype_name)
+  /* "netCDF4/_netCDF4.pyx":2613
+ *         # 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__33, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __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:;
 
-/* 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 = 1685; __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 = 1685; __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];
+  /* "netCDF4/_netCDF4.pyx":2614
+ *         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__13, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2614; __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;
   }
-  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 = 1685; __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);
+  __pyx_L20:;
 
-  /* "netCDF4.pyx":1699
- * 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]
+  /* "netCDF4/_netCDF4.pyx":2615
+ *         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_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __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 = 1699; __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 = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__12, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2615; __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":1701
- *         self.cmptypes[datatype_name] = CompoundType(self, datatype,\
- *                 datatype_name)
- *         return self.cmptypes[datatype_name]             # <<<<<<<<<<<<<<
- * 
- *     def createVLType(self, datatype, datatype_name):
+  /* "netCDF4/_netCDF4.pyx":2616
+ *         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:
+ *             if dtype_endian == 'native' and endian == sys.byteorder:
  */
-  __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 = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
+  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__34, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2616; __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":1685
- *         # looks in the file, so no need to manually update.
- * 
- *     def createCompoundType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
- *         """
- * createCompoundType(self, datatype, datatype_name)
+  /* "netCDF4/_netCDF4.pyx":2617
+ *         if dtype_endian == '<': dtype_endian='little'
+ *         if dtype_endian == '|': dtype_endian=None
+ *         if dtype_endian is not None and dtype_endian != endian:             # <<<<<<<<<<<<<<
+ *             if dtype_endian == 'native' and endian == sys.byteorder:
+ *                 pass
  */
+  __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 = 2617; __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 = 2617; __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) {
 
-  /* 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/_netCDF4.pyx":2618
+ *         if dtype_endian == '|': dtype_endian=None
+ *         if dtype_endian is not None and dtype_endian != endian:
+ *             if dtype_endian == 'native' and endian == sys.byteorder:             # <<<<<<<<<<<<<<
+ *                 pass
+ *             else:
+ */
+    __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_n_s_native, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_1) {
+    } else {
+      __pyx_t_2 = __pyx_t_1;
+      goto __pyx_L27_bool_binop_done;
+    }
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_3 = PyObject_RichCompare(__pyx_v_endian, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2618; __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) {
+      goto __pyx_L26;
+    }
+    /*else*/ {
 
-/* "netCDF4.pyx":1703
- *         return self.cmptypes[datatype_name]
- * 
- *     def createVLType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
- *         """
- * createVLType(self, datatype, datatype_name)
+      /* "netCDF4/_netCDF4.pyx":2622
+ *             else:
+ *                 # 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;
 
-/* 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 = 1703; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      /* "netCDF4/_netCDF4.pyx":2624
+ *                 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 = 2624; __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 = 2624; __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 (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 = 1703; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      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 = 2624; __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 = 2624; __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 = 2624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
       }
-    } 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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     }
-    __pyx_v_datatype = values[0];
-    __pyx_v_datatype_name = values[1];
+    __pyx_L26:;
+    goto __pyx_L23;
   }
-  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 = 1703; __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);
+  __pyx_L23:;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":2627
+ *                 #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;
 
-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/_netCDF4.pyx":2628
+ *         # 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":1712
- * 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]
- * 
+  /* "netCDF4/_netCDF4.pyx":2629
+ *         self._isprimitive = False
+ *         self._iscompound = False
+ *         self._isvlen = False             # <<<<<<<<<<<<<<
+ *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
+ *                       or datatype == str:
  */
-  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __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 = 1712; __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 = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __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":1713
- * datatype."""
- *         self.vltypes[datatype_name] = VLType(self, datatype, datatype_name)
- *         return self.vltypes[datatype_name]             # <<<<<<<<<<<<<<
- * 
- *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,
+  /* "netCDF4/_netCDF4.pyx":2630
+ *         self._iscompound = False
+ *         self._isvlen = False
+ *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\             # <<<<<<<<<<<<<<
+ *                       or datatype == str:
+ *             if isinstance(datatype, CompoundType):
  */
-  __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 = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
+  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_CompoundType)); 
+  __pyx_t_8 = (__pyx_t_1 != 0);
+  if (!__pyx_t_8) {
+  } else {
+    __pyx_t_2 = __pyx_t_8;
+    goto __pyx_L30_bool_binop_done;
+  }
 
-  /* "netCDF4.pyx":1703
- *         return self.cmptypes[datatype_name]
- * 
- *     def createVLType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
- *         """
- * createVLType(self, datatype, datatype_name)
+  /* "netCDF4/_netCDF4.pyx":2631
+ *         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_8_netCDF4_VLType)); 
 
-  /* 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/_netCDF4.pyx":2630
+ *         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_L30_bool_binop_done;
+  }
 
-/* "netCDF4.pyx":1715
- *         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,
+  /* "netCDF4/_netCDF4.pyx":2631
+ *         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 = 2631; __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 = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_2 = __pyx_t_1;
+  __pyx_L30_bool_binop_done:;
+  if (__pyx_t_2) {
 
-/* 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/_netCDF4.pyx":2632
+ *         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_8_netCDF4_CompoundType)); 
+    __pyx_t_1 = (__pyx_t_2 != 0);
+    if (__pyx_t_1) {
 
-    /* "netCDF4.pyx":1716
- * 
- *     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):
+      /* "netCDF4/_netCDF4.pyx":2633
+ *                       or datatype == str:
+ *             if isinstance(datatype, CompoundType):
+ *                 self._iscompound = True             # <<<<<<<<<<<<<<
+ *                 self._cmptype = datatype
+ *             if isinstance(datatype, VLType) or datatype==str:
  */
-    values[5] = ((PyObject *)Py_True);
-    values[6] = ((PyObject *)Py_False);
-    values[7] = ((PyObject *)Py_False);
+      __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":1717
- *     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):
- *         """
+      /* "netCDF4/_netCDF4.pyx":2634
+ *             if isinstance(datatype, CompoundType):
+ *                 self._iscompound = True
+ *                 self._cmptype = datatype             # <<<<<<<<<<<<<<
+ *             if isinstance(datatype, VLType) or datatype==str:
+ *                 self._isvlen = True
  */
-    values[8] = ((PyObject *)Py_None);
-    values[9] = ((PyObject *)__pyx_n_s_native);
-    values[10] = ((PyObject *)Py_None);
+      __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_L33;
+    }
+    __pyx_L33:;
 
-    /* "netCDF4.pyx":1718
- *             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)
+    /* "netCDF4/_netCDF4.pyx":2635
+ *                 self._iscompound = True
+ *                 self._cmptype = datatype
+ *             if isinstance(datatype, VLType) or datatype==str:             # <<<<<<<<<<<<<<
+ *                 self._isvlen = True
+ *                 self._vltype = datatype
  */
-    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 = 1715; __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 = 1715; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-      }
+    __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_VLType)); 
+    __pyx_t_8 = (__pyx_t_2 != 0);
+    if (!__pyx_t_8) {
     } 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_t_1 = __pyx_t_8;
+      goto __pyx_L35_bool_binop_done;
     }
-    __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 = 1715; __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);
+    __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 = 2635; __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 = 2635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_1 = __pyx_t_8;
+    __pyx_L35_bool_binop_done:;
+    if (__pyx_t_1) {
 
-  /* "netCDF4.pyx":1715
- *         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,
+      /* "netCDF4/_netCDF4.pyx":2636
+ *                 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;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":2637
+ *             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_L34;
+    }
+    __pyx_L34:;
 
-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/_netCDF4.pyx":2638
+ *                 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 = 2638; __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 = 2638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (__pyx_t_1) {
 
-  /* "netCDF4.pyx":1833
- * 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,
+      /* "netCDF4/_netCDF4.pyx":2639
+ *                 self._vltype = datatype
+ *             if datatype==str:
+ *                 if grp.data_model != 'NETCDF4':             # <<<<<<<<<<<<<<
+ *                     raise ValueError(
+ *                         'Variable length strings are only supported for the '
  */
-  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __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 = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); 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_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 = 2639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_1) {
 
-  /* "netCDF4.pyx":1834
- * 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,
+        /* "netCDF4/_netCDF4.pyx":2640
+ *             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 '
  */
-  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dimensions, __pyx_v_dimensions) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __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 = 1833; __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 = 1833; __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 = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2640; __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 = 2640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
 
-  /* "netCDF4.pyx":1835
- *         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)
+      /* "netCDF4/_netCDF4.pyx":2645
+ *                         '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
  */
-  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fletcher32, __pyx_v_fletcher32) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __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 = 1833; __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 = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2645; __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_8_netCDF4_VLType)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2645; __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":1836
- *         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]
+      /* "netCDF4/_netCDF4.pyx":2646
+ *                         '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.
  */
-  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_endian, __pyx_v_endian) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __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 = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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_L37;
+    }
+    __pyx_L37:;
 
-  /* "netCDF4.pyx":1837
- *         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]
- * 
+    /* "netCDF4/_netCDF4.pyx":2647
+ *                 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
  */
-  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __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 = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 2647; __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 = 2647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_v_xtype = __pyx_t_9;
 
-  /* "netCDF4.pyx":1833
- * 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,
+    /* "netCDF4/_netCDF4.pyx":2649
+ *             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_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 = 1833; __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 = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __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 = 2649; __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_L29;
+  }
 
-  /* "netCDF4.pyx":1838
- *         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):
+  /* "netCDF4/_netCDF4.pyx":2650
+ *             # 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_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 = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __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 = 2650; __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__36, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
-  goto __pyx_L0;
+  __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 = 2650; __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 = 2650; __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":1715
- *         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,
+    /* "netCDF4/_netCDF4.pyx":2651
+ *             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;
 
-  /* 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":1840
- *         return self.variables[varname]
- * 
- *     def renameVariable(self, oldname, newname):             # <<<<<<<<<<<<<<
- *         """
- * renameVariable(self, oldname, newname)
+    /* "netCDF4/_netCDF4.pyx":2654
+ *             # 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 = 2654; __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 = 2654; __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__37, 1, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2654; __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 = 2654; __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 = 2654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_v_xtype = __pyx_t_9;
 
-/* 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 = 1840; __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 = 1840; __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];
+    /* "netCDF4/_netCDF4.pyx":2656
+ *             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_L29;
   }
-  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 = 1840; __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);
+  /*else*/ {
 
-  /* "netCDF4.pyx":1846
- * rename a L{Variable} named C{oldname} to C{newname}"""
- *         cdef char *namstring
- *         try:             # <<<<<<<<<<<<<<
- *             var = self.variables[oldname]
- *         except KeyError:
+    /* "netCDF4/_netCDF4.pyx":2658
+ *             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_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:*/ {
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __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 = 2658; __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 = 2658; __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 = 2658; __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 = 2658; __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 = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_L29:;
 
-      /* "netCDF4.pyx":1847
- *         cdef char *namstring
- *         try:
- *             var = self.variables[oldname]             # <<<<<<<<<<<<<<
- *         except KeyError:
- *             raise KeyError('%s not a valid variable name' % oldname)
+  /* "netCDF4/_netCDF4.pyx":2659
+ *         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_4 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_oldname); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1847; __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;
+  __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 = 2659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = (__pyx_t_8 != 0);
+  if (__pyx_t_1) {
 
-    /* "netCDF4.pyx":1848
- *         try:
- *             var = self.variables[oldname]
- *         except KeyError:             # <<<<<<<<<<<<<<
- *             raise KeyError('%s not a valid variable name' % oldname)
- *         bytestr = _strencode(newname)
+    /* "netCDF4/_netCDF4.pyx":2660
+ *             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_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 = 1848; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_GOTREF(__pyx_t_7);
+    __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 = 2660; __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 = 2660; __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_L39;
+  }
+  /*else*/ {
 
-      /* "netCDF4.pyx":1849
- *             var = self.variables[oldname]
- *         except KeyError:
- *             raise KeyError('%s not a valid variable name' % oldname)             # <<<<<<<<<<<<<<
- *         bytestr = _strencode(newname)
- *         namstring = bytestr
+    /* "netCDF4/_netCDF4.pyx":2662
+ *             self._varid = kwargs['id']
+ *         else:
+ *             bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *             varname = bytestr
+ *             ndims = len(dimensions)
  */
-      __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 = 1849; __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 = 1849; __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 = 1849; __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 = 1849; __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:;
-  }
+    __pyx_t_3 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_v_bytestr = __pyx_t_3;
+    __pyx_t_3 = 0;
 
-  /* "netCDF4.pyx":1850
- *         except KeyError:
- *             raise KeyError('%s not a valid variable name' % oldname)
- *         bytestr = _strencode(newname)             # <<<<<<<<<<<<<<
- *         namstring = bytestr
- *         if self.data_model != 'NETCDF4': self._redef()
+    /* "netCDF4/_netCDF4.pyx":2663
+ *         else:
+ *             bytestr = _strencode(name)
+ *             varname = bytestr             # <<<<<<<<<<<<<<
+ *             ndims = len(dimensions)
+ *             # find dimension ids.
  */
-  __pyx_t_7 = __pyx_f_7netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __pyx_v_bytestr = __pyx_t_7;
-  __pyx_t_7 = 0;
+    __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_varname = __pyx_t_10;
 
-  /* "netCDF4.pyx":1851
- *             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)
+    /* "netCDF4/_netCDF4.pyx":2664
+ *             bytestr = _strencode(name)
+ *             varname = bytestr
+ *             ndims = len(dimensions)             # <<<<<<<<<<<<<<
+ *             # find dimension ids.
+ *             if ndims:
  */
-  __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_namstring = __pyx_t_10;
+    __pyx_t_11 = PyObject_Length(__pyx_v_dimensions); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_ndims = __pyx_t_11;
 
-  /* "netCDF4.pyx":1852
- *         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()
+    /* "netCDF4/_netCDF4.pyx":2666
+ *             ndims = len(dimensions)
+ *             # find dimension ids.
+ *             if ndims:             # <<<<<<<<<<<<<<
+ *                 for n from 0 <= n < ndims:
+ *                     dimname = dimensions[n]
  */
-  __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 = 1852; __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 = 1852; __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 = 1852; __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 = 1852; __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:;
+    __pyx_t_1 = (__pyx_v_ndims != 0);
+    if (__pyx_t_1) {
 
-  /* "netCDF4.pyx":1853
- *         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:
+      /* "netCDF4/_netCDF4.pyx":2667
+ *             # 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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_varid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __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 = 1853; __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);
+      __pyx_t_4 = __pyx_v_ndims;
+      for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {
 
-  /* "netCDF4.pyx":1854
- *         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'))
+        /* "netCDF4/_netCDF4.pyx":2668
+ *             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_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 = 1854; __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 = 1854; __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 = 1854; __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 = 1854; __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:;
+        __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 = 2668; __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":1855
- *         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.
+        /* "netCDF4/_netCDF4.pyx":2671
+ *                     # 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_11 = ((__pyx_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_11) {
+        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2671; __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 = 2671; __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 = 2671; __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":1856
- *         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)
+        /* "netCDF4/_netCDF4.pyx":2672
+ *                     # 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_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 = 1856; __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 = 1856; __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 = 1856; __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 = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+        __pyx_t_1 = (__pyx_v_dim == Py_None);
+        __pyx_t_8 = (__pyx_t_1 != 0);
+        if (__pyx_t_8) {
 
-  /* "netCDF4.pyx":1858
- *             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
+          /* "netCDF4/_netCDF4.pyx":2673
+ *                     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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_pop); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __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 = 1858; __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 = 1858; __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 = 1858; __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;
+          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __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 = 2673; __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 = 2673; __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 = 2673; __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 = 2673; __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 = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
 
-  /* "netCDF4.pyx":1860
- *         self.variables.pop(oldname)
- *         # add new key.
- *         self.variables[newname] = var             # <<<<<<<<<<<<<<
- * 
- *     def createGroup(self, groupname):
+        /* "netCDF4/_netCDF4.pyx":2674
+ *                     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
  */
-  if (unlikely(PyObject_SetItem(__pyx_v_self->variables, __pyx_v_newname, __pyx_v_var) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2674; __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 = 2674; __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_L40;
+    }
+    __pyx_L40:;
 
-  /* "netCDF4.pyx":1840
- *         return self.variables[varname]
- * 
- *     def renameVariable(self, oldname, newname):             # <<<<<<<<<<<<<<
- *         """
- * renameVariable(self, oldname, newname)
+    /* "netCDF4/_netCDF4.pyx":2678
+ *             # 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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; __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 = 2678; __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 = 2678; __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 = 2678; __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 = 2678; __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_L44;
+    }
+    __pyx_L44:;
 
-  /* 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":1862
- *         self.variables[newname] = var
- * 
- *     def createGroup(self, groupname):             # <<<<<<<<<<<<<<
- *         """
- * createGroup(self, groupname)
+    /* "netCDF4/_netCDF4.pyx":2680
+ *             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) {
 
-/* 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":1869
- * 
- * The return value is a L{Group} class instance describing the new group."""
- *         self.groups[groupname] = Group(self, groupname)             # <<<<<<<<<<<<<<
- *         return self.groups[groupname]
- * 
+      /* "netCDF4/_netCDF4.pyx":2681
+ *             # define variable.
+ *             if ndims:
+ *                 ierr = nc_def_var(self._grpid, varname, xtype, ndims,             # <<<<<<<<<<<<<<
+ *                                   dimids, &self._varid)
+ *             else: # a scalar variable.
  */
-  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __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 = 1869; __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 = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __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_L45;
+    }
+    /*else*/ {
 
-  /* "netCDF4.pyx":1870
- * 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):
+      /* "netCDF4/_netCDF4.pyx":2684
+ *                                   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_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 = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_r = __pyx_t_2;
-  __pyx_t_2 = 0;
-  goto __pyx_L0;
+      __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_L45:;
 
-  /* "netCDF4.pyx":1862
- *         self.variables[newname] = var
- * 
- *     def createGroup(self, groupname):             # <<<<<<<<<<<<<<
- *         """
- * createGroup(self, groupname)
+    /* "netCDF4/_netCDF4.pyx":2690
+ *             # 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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2690; __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 = 2690; __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__38, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2690; __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 = 2690; __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_L47_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_L47_bool_binop_done:;
+    if (__pyx_t_8) {
 
-  /* 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":1872
- *         return self.groups[groupname]
- * 
- *     def ncattrs(self):             # <<<<<<<<<<<<<<
- *         """
- * ncattrs(self)
+      /* "netCDF4/_netCDF4.pyx":2691
+ *             # 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));
 
-/* 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));
+      /* "netCDF4/_netCDF4.pyx":2693
+ *                 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) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":2694
+ *                         &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 = 2694; __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 = 2694; __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 = 2694; __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 = 2694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
 
-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/_netCDF4.pyx":2696
+ *                     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 = 2696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_sizep = __pyx_t_13;
 
-  /* "netCDF4.pyx":1877
- * 
- * 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):
+      /* "netCDF4/_netCDF4.pyx":2697
+ *                 # 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_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 = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
+      __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":1872
- *         return self.groups[groupname]
- * 
- *     def ncattrs(self):             # <<<<<<<<<<<<<<
- *         """
- * ncattrs(self)
+      /* "netCDF4/_netCDF4.pyx":2699
+ *                 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) {
 
-  /* 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/_netCDF4.pyx":2700
+ *                         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 = 2700; __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 = 2700; __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 = 2700; __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 = 2700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      goto __pyx_L46;
+    }
+    __pyx_L46:;
 
-/* "netCDF4.pyx":1879
- *         return _get_att_names(self._grpid, NC_GLOBAL)
- * 
- *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
- *         """
- * setncattr(self,name,value)
+    /* "netCDF4/_netCDF4.pyx":2701
+ *                 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) {
 
-/* 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 = 1879; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      /* "netCDF4/_netCDF4.pyx":2702
+ *                     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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2702; __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 = 2702; __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 = 2702; __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 = 2702; __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 = 2702; __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_L52;
       }
-      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 = 1879; __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 = 1879; __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);
+      __pyx_L52:;
 
-  /* "netCDF4.pyx":1886
- * 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()
+      /* "netCDF4/_netCDF4.pyx":2703
+ *             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_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 = 1886; __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 = 1886; __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 = 1886; __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 = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 2703; __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 = 2703; __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 = 2703; __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 = 2703; __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":1887
- * 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 = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":1888
- *         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):
+    /* "netCDF4/_netCDF4.pyx":2710
+ *             # 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_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 = 1888; __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 = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2710; __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 = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __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 = 2710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!__pyx_t_2) {
     } else {
-      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = __pyx_t_2;
+      goto __pyx_L54_bool_binop_done;
     }
-    __Pyx_GOTREF(__pyx_t_2);
+    __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 = 2710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __pyx_t_2;
+    __pyx_L54_bool_binop_done:;
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
+    __pyx_t_2 = (__pyx_t_8 != 0);
+    if (__pyx_t_2) {
 
-  /* "netCDF4.pyx":1879
- *         return _get_att_names(self._grpid, NC_GLOBAL)
- * 
- *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
- *         """
- * setncattr(self,name,value)
+      /* "netCDF4/_netCDF4.pyx":2712
+ *             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 = 2712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_8) {
+      } else {
+        __pyx_t_2 = __pyx_t_8;
+        goto __pyx_L57_bool_binop_done;
+      }
+      __pyx_t_8 = (__pyx_v_ndims != 0);
+      __pyx_t_2 = __pyx_t_8;
+      __pyx_L57_bool_binop_done:;
+      if (__pyx_t_2) {
 
-  /* 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/_netCDF4.pyx":2713
+ *                 # 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 = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_v_ideflate_level = __pyx_t_4;
 
-/* "netCDF4.pyx":1890
- *         if self.data_model !=  'NETCDF4': self._enddef()
- * 
- *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
- *         """
- * setncatts(self,attdict)
+        /* "netCDF4/_netCDF4.pyx":2714
+ *                 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 = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_2) {
 
-/* 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));
+          /* "netCDF4/_netCDF4.pyx":2715
+ *                     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_L59;
+        }
+        /*else*/ {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+          /* "netCDF4/_netCDF4.pyx":2717
+ *                         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_L59:;
 
-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/_netCDF4.pyx":2718
+ *                     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":1898
- * 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)
+          /* "netCDF4/_netCDF4.pyx":2719
+ *                         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_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 = 1898; __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 = 1898; __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 = 1898; __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 = 1898; __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:;
+          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2719; __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 = 2719; __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 = 2719; __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 = 2719; __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 = 2719; __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_L61;
+          }
+          __pyx_L61:;
 
-  /* "netCDF4.pyx":1899
- * 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()
+          /* "netCDF4/_netCDF4.pyx":2720
+ *                     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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attdict, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __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 = 2720; __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 = 2720; __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 = 2720; __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 = 2720; __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 = 1899; __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); 
+        goto __pyx_L56;
       }
-      __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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 = 1899; __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;
+      __pyx_L56:;
 
-    /* "netCDF4.pyx":1900
- *         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()
- * 
+      /* "netCDF4/_netCDF4.pyx":2722
+ *                         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_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 = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_fletcher32); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_8) {
+      } else {
+        __pyx_t_2 = __pyx_t_8;
+        goto __pyx_L63_bool_binop_done;
+      }
+      __pyx_t_8 = (__pyx_v_ndims != 0);
+      __pyx_t_2 = __pyx_t_8;
+      __pyx_L63_bool_binop_done:;
+      if (__pyx_t_2) {
 
-    /* "netCDF4.pyx":1899
- * 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()
+        /* "netCDF4/_netCDF4.pyx":2723
+ *                 # 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_v_ierr = nc_def_var_fletcher32(__pyx_v_self->_grpid, __pyx_v_self->_varid, 1);
 
-  /* "netCDF4.pyx":1901
- *         for name, value in attdict.items():
- *             _set_att(self, NC_GLOBAL, name, value)
- *         if self.data_model != 'NETCDF4': self._enddef()             # <<<<<<<<<<<<<<
- * 
- *     def getncattr(self,name):
+        /* "netCDF4/_netCDF4.pyx":2724
+ *                 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_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 = 1901; __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 = 1901; __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 = 1901; __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 = 1901; __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:;
+        __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
+        if (__pyx_t_2) {
 
-  /* "netCDF4.pyx":1890
- *         if self.data_model !=  'NETCDF4': self._enddef()
- * 
- *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
- *         """
- * setncatts(self,attdict)
+          /* "netCDF4/_netCDF4.pyx":2725
+ *                     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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2725; __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 = 2725; __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 = 2725; __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 = 2725; __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 = 2725; __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_L66;
+          }
+          __pyx_L66:;
 
-  /* 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":1903
- *         if self.data_model != 'NETCDF4': self._enddef()
- * 
- *     def getncattr(self,name):             # <<<<<<<<<<<<<<
- *         """
- * getncattr(self,name)
+          /* "netCDF4/_netCDF4.pyx":2726
+ *                     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 = 2726; __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 = 2726; __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 = 2726; __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 = 2726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        goto __pyx_L62;
+      }
+      __pyx_L62:;
 
-/* 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":1910
- * netCDF attribute with the same name as one of the reserved python
- * attributes."""
- *         return _get_att(self, NC_GLOBAL, name)             # <<<<<<<<<<<<<<
- * 
- *     def __delattr__(self,name):
+      /* "netCDF4/_netCDF4.pyx":2728
+ *                         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_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 = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
+      __pyx_t_2 = (__pyx_v_ndims != 0);
+      if (__pyx_t_2) {
 
-  /* "netCDF4.pyx":1903
- *         if self.data_model != 'NETCDF4': self._enddef()
- * 
- *     def getncattr(self,name):             # <<<<<<<<<<<<<<
- *         """
- * getncattr(self,name)
+        /* "netCDF4/_netCDF4.pyx":2729
+ *                 # 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 = 2729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_2) {
 
-  /* 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":1912
- *         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:
+          /* "netCDF4/_netCDF4.pyx":2730
+ *                 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;
 
-/* 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":1914
- *     def __delattr__(self,name):
- *         # if it's a netCDF attribute, remove it
- *         if name not in _private_atts:             # <<<<<<<<<<<<<<
- *             self.delncattr(name)
- *         else:
+          /* "netCDF4/_netCDF4.pyx":2731
+ *                     if contiguous:
+ *                         icontiguous = NC_CONTIGUOUS
+ *                         if chunksizes is not None:             # <<<<<<<<<<<<<<
+ *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')
+ *                     else:
  */
-  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1914; __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 = 1914; __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) {
+          __pyx_t_2 = (__pyx_v_chunksizes != Py_None);
+          __pyx_t_8 = (__pyx_t_2 != 0);
+          if (__pyx_t_8) {
 
-    /* "netCDF4.pyx":1915
- *         # if it's a netCDF attribute, remove it
- *         if name not in _private_atts:
- *             self.delncattr(name)             # <<<<<<<<<<<<<<
- *         else:
- *             raise AttributeError(
+            /* "netCDF4/_netCDF4.pyx":2732
+ *                         icontiguous = NC_CONTIGUOUS
+ *                         if chunksizes is not None:
+ *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         icontiguous = NC_CHUNKED
  */
-    __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 = 1915; __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 = 1915; __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 = 1915; __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 = 1915; __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*/ {
+            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2732; __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 = 2732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          goto __pyx_L68;
+        }
+        /*else*/ {
 
-    /* "netCDF4.pyx":1918
- *         else:
- *             raise AttributeError(
- *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))             # <<<<<<<<<<<<<<
- * 
- *     def delncattr(self, name):
+          /* "netCDF4/_netCDF4.pyx":2734
+ *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')
+ *                     else:
+ *                         icontiguous = NC_CHUNKED             # <<<<<<<<<<<<<<
+ *                     if chunksizes is None:
+ *                         chunksizesp = NULL
  */
-    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __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 = 1918; __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 = 1918; __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 = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+          __pyx_v_icontiguous = NC_CHUNKED;
+        }
+        __pyx_L68:;
 
-    /* "netCDF4.pyx":1917
- *             self.delncattr(name)
- *         else:
- *             raise AttributeError(             # <<<<<<<<<<<<<<
- *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
- * 
+        /* "netCDF4/_netCDF4.pyx":2735
+ *                     else:
+ *                         icontiguous = NC_CHUNKED
+ *                     if chunksizes is None:             # <<<<<<<<<<<<<<
+ *                         chunksizesp = NULL
+ *                     else:
  */
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __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 = 1917; __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 = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L3:;
+        __pyx_t_8 = (__pyx_v_chunksizes == Py_None);
+        __pyx_t_2 = (__pyx_t_8 != 0);
+        if (__pyx_t_2) {
 
-  /* "netCDF4.pyx":1912
- *         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:
+          /* "netCDF4/_netCDF4.pyx":2736
+ *                         icontiguous = NC_CHUNKED
+ *                     if chunksizes is None:
+ *                         chunksizesp = NULL             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         if len(chunksizes) != len(dimensions):
  */
+          __pyx_v_chunksizesp = NULL;
+          goto __pyx_L70;
+        }
+        /*else*/ {
 
-  /* 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":1920
- *             "'%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)
+          /* "netCDF4/_netCDF4.pyx":2738
+ *                         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 = 2738; __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 = 2738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_2 = ((__pyx_t_11 != __pyx_t_14) != 0);
+          if (__pyx_t_2) {
 
-/* 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));
+            /* "netCDF4/_netCDF4.pyx":2739
+ *                     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); 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_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 = 2739; __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 = 2739; __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 = 2739; __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 = 2739; __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_L72;
+            }
+            __pyx_L72:;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+            /* "netCDF4/_netCDF4.pyx":2740
+ *                         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__40, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __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 = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
 
-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/_netCDF4.pyx":2741
+ *                             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":1929
- *         cdef char *attname
- *         cdef int ierr
- *         bytestr = _strencode(name)             # <<<<<<<<<<<<<<
- *         attname = bytestr
- *         if self.data_model != 'NETCDF4': self._redef()
+          /* "netCDF4/_netCDF4.pyx":2742
+ *                             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_1 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_bytestr = __pyx_t_1;
-  __pyx_t_1 = 0;
+          __pyx_t_4 = __pyx_v_ndims;
+          for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {
 
-  /* "netCDF4.pyx":1930
- *         cdef int ierr
- *         bytestr = _strencode(name)
- *         attname = bytestr             # <<<<<<<<<<<<<<
- *         if self.data_model != 'NETCDF4': self._redef()
- *         ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)
+            /* "netCDF4/_netCDF4.pyx":2743
+ *                         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_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_attname = __pyx_t_2;
+            __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 = 2743; __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 = 2743; __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_L70:;
 
-  /* "netCDF4.pyx":1931
- *         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()
+        /* "netCDF4/_netCDF4.pyx":2744
+ *                         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_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 = 1931; __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 = 1931; __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 = 1931; __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 = 1931; __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:;
+        __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_L76_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 = 2744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __pyx_t_1;
+        __pyx_L76_bool_binop_done:;
+        if (__pyx_t_2) {
 
-  /* "netCDF4.pyx":1932
- *         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:
+          /* "netCDF4/_netCDF4.pyx":2745
+ *                             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_del_att(__pyx_v_self->_grpid, NC_GLOBAL, __pyx_v_attname);
+          __pyx_v_ierr = nc_def_var_chunking(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_icontiguous, __pyx_v_chunksizesp);
 
-  /* "netCDF4.pyx":1933
- *         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'))
+          /* "netCDF4/_netCDF4.pyx":2746
+ *                     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()
  */
-  __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 = 1933; __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 = 1933; __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 = 1933; __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 = 1933; __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:;
+          free(__pyx_v_chunksizesp);
 
-  /* "netCDF4.pyx":1934
- *         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'))
- * 
+          /* "netCDF4/_netCDF4.pyx":2747
+ *                         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_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_3) {
+          __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
+          if (__pyx_t_2) {
 
-    /* "netCDF4.pyx":1935
- *         if self.data_model != 'NETCDF4': self._enddef()
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- * 
- *     def __setattr__(self,name,value):
+            /* "netCDF4/_netCDF4.pyx":2748
+ *                         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_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 = 1935; __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 = 1935; __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 = 1935; __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 = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2748; __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 = 2748; __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 = 2748; __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 = 2748; __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 = 2748; __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":1920
- *             "'%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)
+            /* "netCDF4/_netCDF4.pyx":2749
+ *                         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 = 2749; __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 = 2749; __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 = 2749; __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 = 2749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          goto __pyx_L75;
+        }
+        __pyx_L75:;
+        goto __pyx_L67;
+      }
+      __pyx_L67:;
 
-  /* 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":1937
- *             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.
+      /* "netCDF4/_netCDF4.pyx":2751
+ *                             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 = 2751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_2) {
 
-/* 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;
-}
+        /* "netCDF4/_netCDF4.pyx":2752
+ *                 # 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_L80;
+      }
 
-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/_netCDF4.pyx":2753
+ *                 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 = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_2) {
 
-  /* "netCDF4.pyx":1940
- *         # 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('__'):
+        /* "netCDF4/_netCDF4.pyx":2754
+ *                     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_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; __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 = 1940; __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) {
+        __pyx_v_ierr = nc_def_var_endian(__pyx_v_self->_grpid, __pyx_v_self->_varid, NC_ENDIAN_BIG);
+        goto __pyx_L80;
+      }
 
-    /* "netCDF4.pyx":1941
- *         # 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):
+      /* "netCDF4/_netCDF4.pyx":2755
+ *                 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_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setncattr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __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_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 = 2755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_2) {
+        goto __pyx_L80;
       }
-    }
-    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __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 = 1941; __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;
-  }
+      /*else*/ {
 
-  /* "netCDF4.pyx":1942
- *         if name not in _private_atts:
- *             self.setncattr(name, value)
- *         elif not name.endswith('__'):             # <<<<<<<<<<<<<<
- *             if hasattr(self,name):
- *                 raise AttributeError(
+        /* "netCDF4/_netCDF4.pyx":2758
+ *                     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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __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 = 1942; __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) {
+        __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 = 2758; __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 = 2758; __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 = 2758; __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 = 2758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L80:;
 
-    /* "netCDF4.pyx":1943
- *             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)))
+      /* "netCDF4/_netCDF4.pyx":2759
+ *                 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 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_name); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = (__pyx_t_2 != 0);
-    if (__pyx_t_3) {
+      __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_2) {
 
-      /* "netCDF4.pyx":1945
- *             if hasattr(self,name):
- *                 raise AttributeError(
- *             "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))             # <<<<<<<<<<<<<<
+        /* "netCDF4/_netCDF4.pyx":2760
+ *                     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:
- *                 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 = 1945; __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 = 1945; __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 = 1945; __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 = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2760; __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 = 2760; __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 = 2760; __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 = 2760; __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 = 2760; __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_L82;
+        }
+        __pyx_L82:;
 
-      /* "netCDF4.pyx":1944
- *         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)))
+        /* "netCDF4/_netCDF4.pyx":2761
+ *                 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_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1944; __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 = 1944; __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 = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2761; __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 = 2761; __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 = 2761; __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 = 2761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      goto __pyx_L53;
     }
     /*else*/ {
 
-      /* "netCDF4.pyx":1947
- *             "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))
+      /* "netCDF4/_netCDF4.pyx":2763
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  *             else:
- *                 self.__dict__[name]=value             # <<<<<<<<<<<<<<
- * 
- *     def __getattr__(self,name):
+ *                 if endian != 'native':             # <<<<<<<<<<<<<<
+ *                     msg="only endian='native' allowed for NETCDF3 files"
+ *                     raise RuntimeError(msg)
  */
-      __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 = 1947; __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 = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    }
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
+      __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 = 2763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_2) {
 
-  /* "netCDF4.pyx":1937
- *             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.
+        /* "netCDF4/_netCDF4.pyx":2764
+ *             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);
 
-  /* 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":1949
- *                 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.
+        /* "netCDF4/_netCDF4.pyx":2765
+ *                 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 = 2765; __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 = 2765; __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 = 2765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+    }
+    __pyx_L53:;
 
-/* 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/_netCDF4.pyx":2769
+ *             # 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":1952
- *         # 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__':
+      /* "netCDF4/_netCDF4.pyx":2770
+ *             # 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_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __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 = 1952; __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 = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __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 = 1952; __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) {
+      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fill_value); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2770; __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_L86_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 = 2770; __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_L86_bool_binop_done:;
+      if (__pyx_t_1) {
 
-    /* "netCDF4.pyx":1954
- *         if name.startswith('__') and name.endswith('__'):
- *             # if __dict__ requested, return a dict with netCDF attributes.
- *             if name == '__dict__':             # <<<<<<<<<<<<<<
- *                 names = self.ncattrs()
- *                 values = []
+        /* "netCDF4/_netCDF4.pyx":2772
+ *                 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_PyString_Equals(__pyx_v_name, __pyx_n_s_dict, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_1) {
+        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = ((!__pyx_t_1) != 0);
+        if (__pyx_t_2) {
 
-      /* "netCDF4.pyx":1955
- *             # if __dict__ requested, return a dict with netCDF attributes.
- *             if name == '__dict__':
- *                 names = self.ncattrs()             # <<<<<<<<<<<<<<
- *                 values = []
- *                 for name in names:
+          /* "netCDF4/_netCDF4.pyx":2775
+ *                         # no fill values for VLEN and compound variables
+ *                         # anyway.
+ *                         ierr = 0             # <<<<<<<<<<<<<<
+ *                     else:
+ *                         ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL)
  */
-      __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 = 1955; __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);
+          __pyx_v_ierr = 0;
+          goto __pyx_L88;
         }
-      }
-      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 = 1955; __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 = 1955; __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;
+        /*else*/ {
 
-      /* "netCDF4.pyx":1956
- *             if name == '__dict__':
- *                 names = self.ncattrs()
- *                 values = []             # <<<<<<<<<<<<<<
- *                 for name in names:
- *                     values.append(_get_att(self, NC_GLOBAL, name))
+          /* "netCDF4/_netCDF4.pyx":2777
+ *                         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_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_v_values = ((PyObject*)__pyx_t_2);
-      __pyx_t_2 = 0;
+          __pyx_v_ierr = nc_def_var_fill(__pyx_v_self->_grpid, __pyx_v_self->_varid, 1, NULL);
+        }
+        __pyx_L88:;
 
-      /* "netCDF4.pyx":1957
- *                 names = self.ncattrs()
- *                 values = []
- *                 for name in names:             # <<<<<<<<<<<<<<
- *                     values.append(_get_att(self, NC_GLOBAL, name))
- *                 return OrderedDict(zip(names,values))
+        /* "netCDF4/_netCDF4.pyx":2778
+ *                     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'))
  */
-      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 = 1957; __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 = 1957; __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 = 1957; __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 = 1957; __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 = 1957; __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 = 1957; __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 = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
+        if (__pyx_t_2) {
+
+          /* "netCDF4/_netCDF4.pyx":2779
+ *                         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); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2779; __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 = 2779; __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 = 2779; __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);
+              }
             }
-            break;
+            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 = 2779; __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 = 2779; __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_L90;
           }
+          __pyx_L90:;
+
+          /* "netCDF4/_netCDF4.pyx":2780
+ *                     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 = 2780; __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 = 2780; __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 = 2780; __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 = 2780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
-        __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3);
-        __pyx_t_3 = 0;
+        goto __pyx_L85;
+      }
+      /*else*/ {
 
-        /* "netCDF4.pyx":1958
- *                 values = []
- *                 for name in names:
- *                     values.append(_get_att(self, NC_GLOBAL, name))             # <<<<<<<<<<<<<<
- *                 return OrderedDict(zip(names,values))
- *             else:
+        /* "netCDF4/_netCDF4.pyx":2783
+ *                 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_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 = 1958; __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 = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (__pyx_t_2) {
 
-        /* "netCDF4.pyx":1957
- *                 names = self.ncattrs()
- *                 values = []
- *                 for name in names:             # <<<<<<<<<<<<<<
- *                     values.append(_get_att(self, NC_GLOBAL, name))
- *                 return OrderedDict(zip(names,values))
+          /* "netCDF4/_netCDF4.pyx":2784
+ *                     # 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2784; __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 = 2784; __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 = 2784; __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 = 2784; __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":1959
- *                 for name in names:
- *                     values.append(_get_att(self, NC_GLOBAL, name))
- *                 return OrderedDict(zip(names,values))             # <<<<<<<<<<<<<<
- *             else:
- *                 raise AttributeError
+          /* "netCDF4/_netCDF4.pyx":2785
+ *                     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_XDECREF(__pyx_r);
-      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; __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 = 1959; __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_6 = __pyx_v_self->_grp;
+          __Pyx_INCREF(__pyx_t_6);
+          __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__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 = 2785; __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_L91;
         }
+        /*else*/ {
+
+          /* "netCDF4/_netCDF4.pyx":2787
+ *                         _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__41, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2787; __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 = 2787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        __pyx_L91:;
       }
-      __pyx_t_11 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; __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 = 1959; __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_L85:;
+      goto __pyx_L84;
+    }
+    __pyx_L84:;
+
+    /* "netCDF4/_netCDF4.pyx":2788
+ *                     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/_netCDF4.pyx":2789
+ *                         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 = 2789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L92;
+    }
+    __pyx_L92:;
+
+    /* "netCDF4/_netCDF4.pyx":2791
+ *                 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); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; __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 = 2791; __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 = 2791; __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_3, function);
+          __Pyx_DECREF_SET(__pyx_t_6, 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 = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      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 = 2791; __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 = 1959; __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 = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+        __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_r = __pyx_t_2;
-      __pyx_t_2 = 0;
-      goto __pyx_L0;
-    }
-    /*else*/ {
-
-      /* "netCDF4.pyx":1961
- *                 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 = 1961; __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_L93;
     }
+    __pyx_L93:;
   }
+  __pyx_L39:;
 
-  /* "netCDF4.pyx":1962
- *             else:
- *                 raise AttributeError
- *         elif name in _private_atts:             # <<<<<<<<<<<<<<
- *             return self.__dict__[name]
- *         else:
+  /* "netCDF4/_netCDF4.pyx":2793
+ *             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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __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 = 1962; __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) {
+  __pyx_v_self->_nunlimdim = 0;
 
-    /* "netCDF4.pyx":1963
- *                 raise AttributeError
- *         elif name in _private_atts:
- *             return self.__dict__[name]             # <<<<<<<<<<<<<<
- *         else:
- *             return self.getncattr(name)
+  /* "netCDF4/_netCDF4.pyx":2794
+ *         # 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_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 = 1963; __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 = 1963; __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;
+  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 = 2794; __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 = 2794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  /*else*/ {
+  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 = 2794; __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 = 2794; __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 = 2794; __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 = 2794; __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 = 2794; __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":1965
- *             return self.__dict__[name]
- *         else:
- *             return self.getncattr(name)             # <<<<<<<<<<<<<<
- * 
- *     def renameAttribute(self, oldname, newname):
+    /* "netCDF4/_netCDF4.pyx":2796
+ *         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_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 = 1965; __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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __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_2, function);
+        __Pyx_DECREF_SET(__pyx_t_5, function);
+        __pyx_t_11 = 1;
       }
     }
-    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 = 1965; __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 = 1965; __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 = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_16 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2796; __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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_r = __pyx_t_3;
-    __pyx_t_3 = 0;
-    goto __pyx_L0;
-  }
+    __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 = 2796; __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":1949
- *                 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.
+    /* "netCDF4/_netCDF4.pyx":2797
+ *             # 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).
+ *         with nogil:
  */
+    __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 = 2797; __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 = 2797; __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 = 2797; __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 = 2797; __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_L96;
+    }
+    __pyx_L96:;
 
-  /* 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":1967
- *             return self.getncattr(name)
- * 
- *     def renameAttribute(self, oldname, newname):             # <<<<<<<<<<<<<<
- *         """
- * renameAttribute(self, oldname, newname)
+    /* "netCDF4/_netCDF4.pyx":2794
+ *         # 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;
 
-/* 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);
+  /* "netCDF4/_netCDF4.pyx":2799
+ *             if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1
+ *         # set ndim attribute (number of dimensions).
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
+ *         if ierr != NC_NOERR:
+ */
   {
-    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;
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
+
+        /* "netCDF4/_netCDF4.pyx":2800
+ *         # set ndim attribute (number of dimensions).
+ *         with nogil:
+ *             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));
       }
-      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 = 1967; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+
+      /* "netCDF4/_netCDF4.pyx":2799
+ *             if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1
+ *         # set ndim attribute (number of dimensions).
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
+ *         if ierr != NC_NOERR:
+ */
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L99;
         }
+        __pyx_L99:;
       }
-      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 = 1967; __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 = 1967; __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":1975
- *         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 = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_bytestr = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "netCDF4.pyx":1976
- *         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 = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_oldnamec = __pyx_t_2;
-
-  /* "netCDF4.pyx":1977
- *         bytestr = _strencode(oldname)
- *         oldnamec = bytestr
- *         bytestr = _strencode(newname)             # <<<<<<<<<<<<<<
- *         newnamec = bytestr
- *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
+  /* "netCDF4/_netCDF4.pyx":2801
+ *         with nogil:
+ *             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_f_7netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1977; __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;
+  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_1) {
 
-  /* "netCDF4.pyx":1978
- *         oldnamec = bytestr
- *         bytestr = _strencode(newname)
- *         newnamec = bytestr             # <<<<<<<<<<<<<<
- *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
+    /* "netCDF4/_netCDF4.pyx":2802
+ *             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_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_newnamec = __pyx_t_2;
+    __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 = 2802; __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 = 2802; __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 = 2802; __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 = 2802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-  /* "netCDF4.pyx":1979
- *         bytestr = _strencode(newname)
- *         newnamec = bytestr
- *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":2803
  *         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_v_ierr = nc_rename_att(__pyx_v_self->_grpid, NC_GLOBAL, __pyx_v_oldnamec, __pyx_v_newnamec);
+  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_numdims); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2803; __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":1980
- *         newnamec = bytestr
- *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
- *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":2804
  *             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/_netCDF4.pyx":2807
+ *         # default for automatically applying scale_factor and
+ *         # add_offset, and converting to/from masked arrays is True.
+ *         self.scale = True             # <<<<<<<<<<<<<<
+ *         self.mask = True
  * 
  */
-  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_3) {
+  __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":1981
- *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":2808
+ *         # add_offset, and converting to/from masked arrays is True.
+ *         self.scale = True
+ *         self.mask = True             # <<<<<<<<<<<<<<
  * 
- *     def renameGroup(self, oldname, newname):
+ *     def __array__(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 = 1981; __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 = 1981; __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 = 1981; __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 = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  __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":1967
- *             return self.getncattr(name)
+  /* "netCDF4/_netCDF4.pyx":2571
+ *     _isvlen, _grp, _cmptype, _vltype, __orthogonal_indexing__
  * 
- *     def renameAttribute(self, oldname, newname):             # <<<<<<<<<<<<<<
- *         """
- * renameAttribute(self, oldname, newname)
+ *     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 = Py_None; __Pyx_INCREF(Py_None);
+  __pyx_r = 0;
   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_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._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_XGIVEREF(__pyx_r);
+  __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":1983
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+/* "netCDF4/_netCDF4.pyx":2810
+ *         self.mask = True
  * 
- *     def renameGroup(self, oldname, newname):             # <<<<<<<<<<<<<<
- *         """
- * renameGroup(self, oldname, newname)
+ *     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_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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_3__array__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_3__array__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
   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 = 1983; __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 = 1983; __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 = 1983; __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);
+  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_2__array__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_2__array__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_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("renameGroup", 0);
-
-  /* "netCDF4.pyx":2005
- *             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;
+  __Pyx_RefNannySetupContext("__array__", 0);
 
-  /* "netCDF4.pyx":2008
- * 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)             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":2814
+ *         # allows numpy ufuncs to work faster on Variable objects
+ *         # (issue 216).
+ *         return self[...]             # <<<<<<<<<<<<<<
  * 
- *     def set_auto_maskandscale(self, value):
+ *     def __repr__(self):
  */
-  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 2814; __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 = 2008; __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 = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
 
-  /* "netCDF4.pyx":1983
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+  /* "netCDF4/_netCDF4.pyx":2810
+ *         self.mask = True
  * 
- *     def renameGroup(self, oldname, newname):             # <<<<<<<<<<<<<<
- *         """
- * renameGroup(self, oldname, newname)
+ *     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_XDECREF(__pyx_t_2);
-  __Pyx_AddTraceback("netCDF4.Dataset.renameGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
-  __Pyx_XDECREF(__pyx_v_msg);
+  __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":2010
- *             raise ValueError(msg)
+/* "netCDF4/_netCDF4.pyx":2816
+ *         return self[...]
  * 
- *     def set_auto_maskandscale(self, value):             # <<<<<<<<<<<<<<
- *         """
- * set_auto_maskandscale(self, True_or_False)
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *             return self.__unicode__()
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_5__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_5__repr__(PyObject *__pyx_v_self) {
   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));
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_4__repr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
+  int __pyx_t_2;
   PyObject *__pyx_t_3 = NULL;
-  Py_ssize_t __pyx_t_4;
-  PyObject *(*__pyx_t_5)(PyObject *);
+  PyObject *__pyx_t_4 = NULL;
+  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 *);
-  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);
+  __Pyx_RefNannySetupContext("__repr__", 0);
 
-  /* "netCDF4.pyx":2028
- *         """
- * 
- *         for var in self.variables.values():             # <<<<<<<<<<<<<<
- *             var.set_auto_maskandscale(value)
+  /* "netCDF4/_netCDF4.pyx":2817
  * 
+ *     def __repr__(self):
+ *         if python3:             # <<<<<<<<<<<<<<
+ *             return self.__unicode__()
+ *         else:
  */
-  __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 = 2028; __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 = 2028; __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 = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2817; __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 = 2028; __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 = 2028; __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 = 2817; __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 = 2028; __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 = 2028; __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 = 2028; __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 = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
+  if (__pyx_t_2) {
+
+    /* "netCDF4/_netCDF4.pyx":2818
+ *     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 = 2818; __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 = 2818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     } 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 = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
-      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
+    __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":2029
- * 
- *         for var in self.variables.values():
- *             var.set_auto_maskandscale(value)             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":2820
+ *             return self.__unicode__()
+ *         else:
+ *             return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
  * 
- *         for groups in _walk_grps(self):
+ *     def __unicode__(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 = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_6 = NULL;
+    __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 = 2820; __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 = 2820; __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 = 2820; __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_6 = PyMethod_GET_SELF(__pyx_t_3);
-      if (likely(__pyx_t_6)) {
+      __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_6);
+        __Pyx_INCREF(__pyx_t_5);
         __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 = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    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 = 2820; __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[0]; __pyx_lineno = 2029; __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 = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2820; __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 = 2820; __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_6); __pyx_t_6 = 0;
     }
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-    /* "netCDF4.pyx":2028
- *         """
- * 
- *         for var in self.variables.values():             # <<<<<<<<<<<<<<
- *             var.set_auto_maskandscale(value)
- * 
- */
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":2031
- *             var.set_auto_maskandscale(value)
+  /* "netCDF4/_netCDF4.pyx":2816
+ *         return self[...]
  * 
- *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
- *             for group in groups:
- *                 for var in group.variables.values():
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *             return self.__unicode__()
  */
-  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2031; __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 = 2031; __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 = 2031; __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 = 2031; __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 = 2031; __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 = 2031; __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 = 2031; __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 = 2031; __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 = 2031; __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 = 2031; __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 = 2031; __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":2032
+  /* 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._netCDF4.Variable.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":2822
+ *             return unicode(self).encode(default_encoding)
  * 
- *         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 = 2032; __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 = 2032; __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 = 2032; __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 = 2032; __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 = 2032; __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 = 2032; __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 = 2032; __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":2033
- *         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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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 = 2033; __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":2034
- *             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 = 2034; __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 = 2034; __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 = 2034; __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 = 2034; __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":2033
- *         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":2032
- * 
- *         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":2031
- *             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":2010
- *             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":2037
- * 
- * 
- *     def set_auto_mask(self, value):             # <<<<<<<<<<<<<<
- *         """
- * set_auto_mask(self, True_or_False)
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         cdef int ierr, no_fill
+ *         if not dir(self._grp):
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_7__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_7__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
   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));
+  __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  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_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("set_auto_mask", 0);
+  __Pyx_RefNannySetupContext("__unicode__", 0);
 
-  /* "netCDF4.pyx":2055
- *         """
- * 
- *         for var in self.variables.values():             # <<<<<<<<<<<<<<
- *             var.set_auto_mask(value)
- * 
+  /* "netCDF4/_netCDF4.pyx":2824
+ *     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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 2824; __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 = 2055; __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 = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 2824; __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/_netCDF4.pyx":2825
+ *         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/_netCDF4.pyx":2826
+ *         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_3, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2826; __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 = 2826; __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;
+  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/_netCDF4.pyx":2827
+ *             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 = 2827; __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 = 2827; __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_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __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 = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2827; __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 = 2827; __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;
   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 (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_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 = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2827; __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 = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) 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 = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2827; __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 = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       }
     } else {
-      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
-      if (unlikely(!__pyx_t_1)) {
+      __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 = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
-      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(__pyx_t_2);
     }
-    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
-    __pyx_t_1 = 0;
-
-    /* "netCDF4.pyx":2056
- * 
- *         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 = 2056; __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_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 = 2827; __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_3, function);
+        __Pyx_DECREF_SET(__pyx_t_8, 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 = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+    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 = 2827; __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 = 2056; __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 = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2827; __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 = 2827; __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_3); __pyx_t_3 = 0;
-    __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_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2827; __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 = 2827; __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":2055
- *         """
- * 
- *         for var in self.variables.values():             # <<<<<<<<<<<<<<
- *             var.set_auto_mask(value)
- * 
+  /* "netCDF4/_netCDF4.pyx":2828
+ *         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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
 
-  /* "netCDF4.pyx":2058
- *             var.set_auto_mask(value)
- * 
- *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
- *             for group in groups:
- *                 for var in group.variables.values():
+  /* "netCDF4/_netCDF4.pyx":2829
+ *         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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __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_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 = 2829; __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_1, function);
+      __Pyx_DECREF_SET(__pyx_t_2, 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 = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
+  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 = 2829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   } else {
-    __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __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 = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __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;
+  __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_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __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 = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2829; __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 = 2829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 (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_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 = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2829; __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 = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) 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 = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2829; __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 = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       }
     } else {
-      __pyx_t_2 = __pyx_t_5(__pyx_t_1);
-      if (unlikely(!__pyx_t_2)) {
+      __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 = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
-      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(__pyx_t_1);
     }
-    __Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_2);
-    __pyx_t_2 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
+    __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":2059
- * 
- *         for groups in _walk_grps(self):
- *             for group in groups:             # <<<<<<<<<<<<<<
- *                 for var in group.variables.values():
- *                     var.set_auto_mask(value)
+    /* "netCDF4/_netCDF4.pyx":2828
+ *         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:
  */
-    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;
+    __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 = 2828; __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 = 2828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
     } 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 = 2059; __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 = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2828; __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 = 2828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     }
-    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 = 2059; __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 = 2059; __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 = 2059; __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 = 2059; __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 = 2059; __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":2060
- *         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 = 2060; __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 = 2060; __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 = 2060; __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 = 2060; __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 = 2060; __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 = 2060; __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 = 2060; __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 = 2060; __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 = 2060; __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 = 2060; __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 = 2060; __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;
+    __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 = 2828; __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 = 2828; __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 = 2828; __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":2061
- *             for group in groups:
- *                 for var in group.variables.values():
- *                     var.set_auto_mask(value)             # <<<<<<<<<<<<<<
- * 
- *     def set_auto_scale(self, value):
+  /* "netCDF4/_netCDF4.pyx":2830
+ *         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_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 = 2061; __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 = 2061; __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 = 2061; __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 = 2061; __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;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
 
-        /* "netCDF4.pyx":2060
- *         for groups in _walk_grps(self):
- *             for group in groups:
- *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
- *                     var.set_auto_mask(value)
- * 
+    /* "netCDF4/_netCDF4.pyx":2832
+ *         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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__19, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __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 = 2832; __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":2059
- * 
- *         for groups in _walk_grps(self):
- *             for group in groups:             # <<<<<<<<<<<<<<
- *                 for var in group.variables.values():
- *                     var.set_auto_mask(value)
+    /* "netCDF4/_netCDF4.pyx":2831
+ *                 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, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2831; __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 = 2831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L8;
+  }
 
-    /* "netCDF4.pyx":2058
- *             var.set_auto_mask(value)
- * 
- *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
- *             for group in groups:
- *                 for var in group.variables.values():
+  /* "netCDF4/_netCDF4.pyx":2833
+ *             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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
 
-  /* "netCDF4.pyx":2037
- * 
- * 
- *     def set_auto_mask(self, value):             # <<<<<<<<<<<<<<
- *         """
- * set_auto_mask(self, True_or_False)
+    /* "netCDF4/_netCDF4.pyx":2835
+ *         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__19, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2835; __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 = 2835; __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;
 
-  /* 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/_netCDF4.pyx":2834
+ *             ('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, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __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 = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L8;
+  }
+  /*else*/ {
 
-/* "netCDF4.pyx":2063
- *                     var.set_auto_mask(value)
- * 
- *     def set_auto_scale(self, value):             # <<<<<<<<<<<<<<
- *         """
- * set_auto_scale(self, True_or_False)
+    /* "netCDF4/_netCDF4.pyx":2838
+ *         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__19, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2838; __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 = 2838; __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;
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":2837
+ *             ('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, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; __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 = 2837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  }
+  __pyx_L8:;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":2839
+ *             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 = 2839; __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;
 
-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/_netCDF4.pyx":2840
+ *             (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 = 2840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
 
-  /* "netCDF4.pyx":2081
- *         """
- * 
- *         for var in self.variables.values():             # <<<<<<<<<<<<<<
- *             var.set_auto_scale(value)
- * 
+    /* "netCDF4/_netCDF4.pyx":2841
+ *         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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2081; __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);
-    }
+    __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 = 2841; __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 = 2841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L9;
   }
-  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 = 2081; __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 = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4/_netCDF4.pyx":2842
+ *         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 = 2842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
+
+    /* "netCDF4/_netCDF4.pyx":2843
+ *             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 = 2843; __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 = 2843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L9;
   }
-  __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;
+  __pyx_L9:;
+
+  /* "netCDF4/_netCDF4.pyx":2844
+ *         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 = 2844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_v_unlimdims = ((PyObject*)__pyx_t_5);
+  __pyx_t_5 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":2845
+ *             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 = 2845; __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_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __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 = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   for (;;) {
-    if (likely(!__pyx_t_5)) {
+    if (likely(!__pyx_t_7)) {
       if (likely(PyList_CheckExact(__pyx_t_2))) {
-        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+        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_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2845; __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 = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+        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_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2845; __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 = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       }
     } else {
-      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
-      if (unlikely(!__pyx_t_1)) {
+      __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 = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
-      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(__pyx_t_5);
     }
-    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1);
-    __pyx_t_1 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_5);
+    __pyx_t_5 = 0;
 
-    /* "netCDF4.pyx":2082
- * 
- *         for var in self.variables.values():
- *             var.set_auto_scale(value)             # <<<<<<<<<<<<<<
- * 
- *         for groups in _walk_grps(self):
+    /* "netCDF4/_netCDF4.pyx":2846
+ *         unlimdims = []
+ *         for dimname in self.dimensions:
+ *             dim = _find_dim(self._grp, dimname)             # <<<<<<<<<<<<<<
+ *             if dim.isunlimited():
+ *                 unlimdims.append(dimname)
  */
-    __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 = 2082; __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_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2846; __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_3, function);
+        __Pyx_DECREF_SET(__pyx_t_1, function);
+        __pyx_t_12 = 1;
       }
     }
-    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 = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_9 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2846; __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 = 2846; __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/_netCDF4.pyx":2847
+ *         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 = 2847; __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 = 2847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
     } else {
-      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2082; __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 = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __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 = 2847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (__pyx_t_4) {
 
-    /* "netCDF4.pyx":2081
- *         """
- * 
- *         for var in self.variables.values():             # <<<<<<<<<<<<<<
- *             var.set_auto_scale(value)
- * 
+      /* "netCDF4/_netCDF4.pyx":2848
+ *             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 = 2848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L12;
+    }
+    __pyx_L12:;
+
+    /* "netCDF4/_netCDF4.pyx":2845
+ *             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":2084
- *             var.set_auto_scale(value)
- * 
- *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
- *             for group in groups:
- *                 for var in group.variables.values():
+  /* "netCDF4/_netCDF4.pyx":2849
+ *             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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; __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 = 2084; __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 = 2084; __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 = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__14, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2849; __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); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2849; __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 = 2084; __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 = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 2849; __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 = 2849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    goto __pyx_L13;
   }
+  __pyx_L13:;
+
+  /* "netCDF4/_netCDF4.pyx":2850
+ *                 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))
+ *         with nogil:
+ */
+  __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__19, __pyx_v_unlimdims); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_dimensions_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2850; __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 = 2850; __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 = 2084; __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 = 2084; __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 = 2084; __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 = 2084; __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 = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
+
+  /* "netCDF4/_netCDF4.pyx":2851
+ *         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))             # <<<<<<<<<<<<<<
+ *         with nogil:
+ *             ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
+ */
+  __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 = 2851; __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 = 2851; __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 = 2851; __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 = 2851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":2852
+ *         ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))
+ *         ncdump_var.append('current shape = %s\n' % repr(self.shape))
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
+ *         if ierr != NC_NOERR:
+ */
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
+
+        /* "netCDF4/_netCDF4.pyx":2853
+ *         ncdump_var.append('current shape = %s\n' % repr(self.shape))
+ *         with nogil:
+ *             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);
       }
-      __Pyx_GOTREF(__pyx_t_2);
-    }
-    __Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_2);
-    __pyx_t_2 = 0;
 
-    /* "netCDF4.pyx":2085
- * 
- *         for groups in _walk_grps(self):
- *             for group in groups:             # <<<<<<<<<<<<<<
- *                 for var in group.variables.values():
- *                     var.set_auto_scale(value)
+      /* "netCDF4/_netCDF4.pyx":2852
+ *         ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))
+ *         ncdump_var.append('current shape = %s\n' % repr(self.shape))
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
+ *         if ierr != NC_NOERR:
  */
-    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 = 2085; __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 = 2085; __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 = 2085; __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 = 2085; __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 = 2085; __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 = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
           #endif
+          goto __pyx_L16;
         }
-      } 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 = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          break;
-        }
-        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_L16:;
       }
-      __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_7);
-      __pyx_t_7 = 0;
+  }
 
-      /* "netCDF4.pyx":2086
- *         for groups in _walk_grps(self):
- *             for group in groups:
- *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
- *                     var.set_auto_scale(value)
- * 
+  /* "netCDF4/_netCDF4.pyx":2854
+ *         with nogil:
+ *             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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __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 = 2086; __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);
+  __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_4) {
+
+    /* "netCDF4/_netCDF4.pyx":2855
+ *             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 = 2855; __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 = 2855; __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 = 2855; __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 = 2855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4/_netCDF4.pyx":2856
+ *         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 = 2856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_4) {
+
+    /* "netCDF4/_netCDF4.pyx":2857
+ *             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/_netCDF4.pyx":2858
+ *         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/_netCDF4.pyx":2859
+ *             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 = 2859; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __pyx_v_fillval = __pyx_t_2;
+          __pyx_t_2 = 0;
+
+          /* "netCDF4/_netCDF4.pyx":2860
+ *                 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;
         }
-      }
-      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 = 2086; __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 = 2086; __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 = 2086; __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 = 2086; __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 = 2086; __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 = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #endif
+        __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_L27_try_end;
+        __pyx_L20_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/_netCDF4.pyx":2861
+ *                     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._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 = 2861; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_GOTREF(__pyx_t_5);
+          __Pyx_GOTREF(__pyx_t_1);
+
+          /* "netCDF4/_netCDF4.pyx":2862
+ *                     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 = 2862; __pyx_clineno = __LINE__; goto __pyx_L22_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 = 2862; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_8, 1, 0, NULL, NULL, &__pyx_slice__42, 1, 0, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2862; __pyx_clineno = __LINE__; goto __pyx_L22_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 = 2862; __pyx_clineno = __LINE__; goto __pyx_L22_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/_netCDF4.pyx":2863
+ *                 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 = 2863; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+          __Pyx_GOTREF(__pyx_t_8);
+          __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_8, 1, 0, NULL, NULL, &__pyx_slice__43, 1, 0, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2863; __pyx_clineno = __LINE__; goto __pyx_L22_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 = 2863; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+          if (!__pyx_t_3) {
           } 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 = 2086; __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 = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            #endif
+            __pyx_t_4 = __pyx_t_3;
+            goto __pyx_L31_bool_binop_done;
           }
-        } 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 = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-            }
-            break;
+          __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 = 2863; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+          __pyx_t_4 = __pyx_t_3;
+          __pyx_L31_bool_binop_done:;
+          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+          __pyx_t_3 = (__pyx_t_4 != 0);
+          if (__pyx_t_3) {
+
+            /* "netCDF4/_netCDF4.pyx":2864
+ *                     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 = 2864; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+            __Pyx_GOTREF(__pyx_t_10);
+            __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_t_10);
+            __pyx_t_10 = 0;
+            goto __pyx_L30;
           }
-          __Pyx_GOTREF(__pyx_t_7);
-        }
-        __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_7);
-        __pyx_t_7 = 0;
+          /*else*/ {
 
-        /* "netCDF4.pyx":2087
- *             for group in groups:
- *                 for var in group.variables.values():
- *                     var.set_auto_scale(value)             # <<<<<<<<<<<<<<
- * 
- * 
+            /* "netCDF4/_netCDF4.pyx":2866
+ *                         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_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 = 2087; __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);
+            __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 = 2866; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+            __Pyx_GOTREF(__pyx_t_10);
+            __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_t_10);
+            __pyx_t_10 = 0;
           }
+          __pyx_L30:;
+          __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_L21_exception_handled;
         }
-        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 = 2087; __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 = 2087; __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 = 2087; __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;
+        goto __pyx_L22_except_error;
+        __pyx_L22_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_L21_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_L27_try_end:;
+      }
 
-        /* "netCDF4.pyx":2086
- *         for groups in _walk_grps(self):
- *             for group in groups:
- *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
- *                     var.set_auto_scale(value)
- * 
+      /* "netCDF4/_netCDF4.pyx":2867
+ *                     else:
+ *                         msg = 'filling on, default _FillValue of %s used\n' % fillval
+ *                 ncdump_var.append(msg)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 ncdump_var.append('filling off\n')
  */
-      }
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __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 = 2867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L19;
+    }
+    /*else*/ {
 
-      /* "netCDF4.pyx":2085
+      /* "netCDF4/_netCDF4.pyx":2869
+ *                 ncdump_var.append(msg)
+ *             else:
+ *                 ncdump_var.append('filling off\n')             # <<<<<<<<<<<<<<
+ * 
  * 
- *         for groups in _walk_grps(self):
- *             for group in groups:             # <<<<<<<<<<<<<<
- *                 for var in group.variables.values():
- *                     var.set_auto_scale(value)
  */
+      __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 = 2869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_L19:;
+    goto __pyx_L18;
+  }
+  __pyx_L18:;
 
-    /* "netCDF4.pyx":2084
- *             var.set_auto_scale(value)
+  /* "netCDF4/_netCDF4.pyx":2872
  * 
- *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
- *             for group in groups:
- *                 for var in group.variables.values():
+ * 
+ *         return ''.join(ncdump_var)             # <<<<<<<<<<<<<<
+ * 
+ *     def _getdims(self):
  */
-  }
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump_var); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2872; __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":2063
- *                     var.set_auto_mask(value)
+  /* "netCDF4/_netCDF4.pyx":2822
+ *             return unicode(self).encode(default_encoding)
  * 
- *     def set_auto_scale(self, value):             # <<<<<<<<<<<<<<
- *         """
- * set_auto_scale(self, True_or_False)
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         cdef int ierr, no_fill
+ *         if not dir(self._grp):
  */
 
   /* 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_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.__unicode__", __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_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":1421
- * 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,\
+/* "netCDF4/_netCDF4.pyx":2874
+ *         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_7Dataset_6_grpid_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_7netCDF4_7Dataset_6_grpid_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_9_getdims(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_9_getdims(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
   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));
+  __Pyx_RefNannySetupContext("_getdims (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_getdims(struct __pyx_obj_7netCDF4_8_netCDF4_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
-  PyObject *__pyx_t_1 = NULL;
+  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("__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 = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
+  __Pyx_RefNannySetupContext("_getdims", 0);
 
-  /* 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;
-}
+  /* "netCDF4/_netCDF4.pyx":2880
+ *         cdef int dimids[NC_MAX_DIMS]
+ *         # get number of dimensions for this variable.
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
+ *         if ierr != NC_NOERR:
+ */
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
 
-/* 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));
+        /* "netCDF4/_netCDF4.pyx":2881
+ *         # get number of dimensions for this variable.
+ *         with nogil:
+ *             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));
+      }
 
-  /* function exit code */
+      /* "netCDF4/_netCDF4.pyx":2880
+ *         cdef int dimids[NC_MAX_DIMS]
+ *         # get number of dimensions for this variable.
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
+ *         if ierr != NC_NOERR:
+ */
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L5;
+        }
+        __pyx_L5:;
+      }
+  }
+
+  /* "netCDF4/_netCDF4.pyx":2882
+ *         with nogil:
+ *             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/_netCDF4.pyx":2883
+ *             ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *         # get dimension ids.
+ *         with nogil:
+ */
+    __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 = 2883; __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 = 2883; __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 = 2883; __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 = 2883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4/_netCDF4.pyx":2885
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         # get dimension ids.
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)
+ *         if ierr != NC_NOERR:
+ */
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
+
+        /* "netCDF4/_netCDF4.pyx":2886
+ *         # get dimension ids.
+ *         with nogil:
+ *             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/_netCDF4.pyx":2885
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         # get dimension ids.
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)
+ *         if ierr != NC_NOERR:
+ */
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L9;
+        }
+        __pyx_L9:;
+      }
+  }
+
+  /* "netCDF4/_netCDF4.pyx":2887
+ *         with nogil:
+ *             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/_netCDF4.pyx":2888
+ *             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 = 2888; __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 = 2888; __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 = 2888; __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 = 2888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4/_netCDF4.pyx":2890
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         # loop over dimensions, retrieve names.
+ *         dimensions = ()             # <<<<<<<<<<<<<<
+ *         for nn from 0 <= nn < numdims:
+ *             with nogil:
+ */
+  __Pyx_INCREF(__pyx_empty_tuple);
+  __pyx_v_dimensions = __pyx_empty_tuple;
+
+  /* "netCDF4/_netCDF4.pyx":2891
+ *         # loop over dimensions, retrieve names.
+ *         dimensions = ()
+ *         for nn from 0 <= nn < numdims:             # <<<<<<<<<<<<<<
+ *             with nogil:
+ *                 ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
+ */
+  __pyx_t_5 = __pyx_v_numdims;
+  for (__pyx_v_nn = 0; __pyx_v_nn < __pyx_t_5; __pyx_v_nn++) {
+
+    /* "netCDF4/_netCDF4.pyx":2892
+ *         dimensions = ()
+ *         for nn from 0 <= nn < numdims:
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
+ *             if ierr != NC_NOERR:
+ */
+    {
+        #ifdef WITH_THREAD
+        PyThreadState *_save;
+        Py_UNBLOCK_THREADS
+        #endif
+        /*try:*/ {
+
+          /* "netCDF4/_netCDF4.pyx":2893
+ *         for nn from 0 <= nn < numdims:
+ *             with nogil:
+ *                 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/_netCDF4.pyx":2892
+ *         dimensions = ()
+ *         for nn from 0 <= nn < numdims:
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
+ *             if ierr != NC_NOERR:
+ */
+        /*finally:*/ {
+          /*normal exit:*/{
+            #ifdef WITH_THREAD
+            Py_BLOCK_THREADS
+            #endif
+            goto __pyx_L17;
+          }
+          __pyx_L17:;
+        }
+    }
+
+    /* "netCDF4/_netCDF4.pyx":2894
+ *             with nogil:
+ *                 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/_netCDF4.pyx":2895
+ *                 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 = 2895; __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 = 2895; __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 = 2895; __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 = 2895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4/_netCDF4.pyx":2896
+ *             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 = 2896; __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 = 2896; __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 = 2896; __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 = 2896; __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 = 2896; __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 = 2896; __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/_netCDF4.pyx":2897
+ *                 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 = 2897; __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 = 2897; __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/_netCDF4.pyx":2898
+ *             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/_netCDF4.pyx":2874
+ *         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._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;
 }
 
-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;
+/* "netCDF4/_netCDF4.pyx":2900
+ *         return dimensions
+ * 
+ *     def _getname(self):             # <<<<<<<<<<<<<<
+ *         # Private method to get name associated with instance
+ *         cdef int err, _grpid
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_11_getname(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_11_getname(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
+  __Pyx_RefNannySetupContext("_getname (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_getname(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
+  int __pyx_v__grpid;
+  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("__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 = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_grpid = __pyx_t_1;
+  __Pyx_RefNannySetupContext("_getname", 0);
 
-  /* function exit code */
-  __pyx_r = 0;
+  /* "netCDF4/_netCDF4.pyx":2904
+ *         cdef int err, _grpid
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         _grpid = self._grp._grpid             # <<<<<<<<<<<<<<
+ *         with nogil:
+ *             ierr = nc_inq_varname(_grpid, self._varid, namstring)
+ */
+  __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 = 2904; __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 = 2904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v__grpid = __pyx_t_2;
+
+  /* "netCDF4/_netCDF4.pyx":2905
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         _grpid = self._grp._grpid
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_varname(_grpid, self._varid, namstring)
+ *         if ierr != NC_NOERR:
+ */
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
+
+        /* "netCDF4/_netCDF4.pyx":2906
+ *         _grpid = self._grp._grpid
+ *         with nogil:
+ *             ierr = nc_inq_varname(_grpid, self._varid, namstring)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+        __pyx_v_ierr = nc_inq_varname(__pyx_v__grpid, __pyx_v_self->_varid, __pyx_v_namstring);
+      }
+
+      /* "netCDF4/_netCDF4.pyx":2905
+ *         cdef char namstring[NC_MAX_NAME+1]
+ *         _grpid = self._grp._grpid
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_varname(_grpid, self._varid, namstring)
+ *         if ierr != NC_NOERR:
+ */
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L5;
+        }
+        __pyx_L5:;
+      }
+  }
+
+  /* "netCDF4/_netCDF4.pyx":2907
+ *         with nogil:
+ *             ierr = nc_inq_varname(_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/_netCDF4.pyx":2908
+ *             ierr = nc_inq_varname(_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 = 2908; __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 = 2908; __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 = 2908; __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 = 2908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4/_netCDF4.pyx":2909
+ *         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 = 2909; __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 = 2909; __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 = 2909; __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 = 2909; __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 = 2909; __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 = 2909; __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/_netCDF4.pyx":2900
+ *         return dimensions
+ * 
+ *     def _getname(self):             # <<<<<<<<<<<<<<
+ *         # Private method to get name associated with instance
+ *         cdef int err, _grpid
+ */
+
+  /* function exit code */
   __pyx_L1_error:;
-  __Pyx_AddTraceback("netCDF4.Dataset._grpid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
+  __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._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":1422
- *     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
+/* "netCDF4/_netCDF4.pyx":2913
+ *     property name:
+ *         """string name of Variable instance"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getname()
+ *         def __set__(self,value):
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_4name_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));
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_4name___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":2914
+ *         """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_1 = __Pyx_PyInt_From_int(__pyx_v_self->_isopen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 2914; __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 = 2914; __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 = 2914; __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/_netCDF4.pyx":2913
+ *     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_AddTraceback("netCDF4.Dataset._isopen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -29864,332 +26710,765 @@ static PyObject *__pyx_pf_7netCDF4_7Dataset_7_isopen___get__(struct __pyx_obj_7n
   return __pyx_r;
 }
 
+/* "netCDF4/_netCDF4.pyx":2915
+ *         def __get__(self):
+ *             return self._getname()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("name cannot be altered")
+ * 
+ */
+
 /* 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) {
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_7Dataset_7_isopen_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_4name_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__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) {
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4name_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
+  PyObject *__pyx_t_1 = NULL;
   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 = 1422; __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);
+  /* "netCDF4/_netCDF4.pyx":2916
+ *             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__44, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __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 = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4/_netCDF4.pyx":2915
+ *         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._netCDF4.Variable.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = -1;
-  __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":1423
- *     cdef public int _grpid
- *     cdef public int _isopen
- *     cdef public groups, dimensions, variables, disk_format, path, parent,\             # <<<<<<<<<<<<<<
- *     file_format, data_model, cmptypes, vltypes, keepweakref
- * 
+/* "netCDF4/_netCDF4.pyx":2920
+ *     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_7Dataset_6groups_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_7netCDF4_7Dataset_6groups_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_8datatype_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_8datatype_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));
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8datatype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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);
-  __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));
+  /* "netCDF4/_netCDF4.pyx":2921
+ *         """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 = 2921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":2922
+ *         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;
+  }
 
-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;
+  /* "netCDF4/_netCDF4.pyx":2923
+ *             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 = 2923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":2924
+ *                 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;
+  }
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":2925
+ *             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 = 2925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":2926
+ *                 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;
+  }
 
-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;
+  /* "netCDF4/_netCDF4.pyx":2920
+ *     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 = 0;
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4._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/_netCDF4.pyx":2930
+ *     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_7Dataset_10dimensions_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_7netCDF4_7Dataset_10dimensions_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_5shape_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));
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":2931
+ *         """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/_netCDF4.pyx":2932
+ *         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 = 2932; __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 = 2932; __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 = 2932; __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 = 2932; __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 = 2932; __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 = 2932; __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 = 2932; __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 = 2932; __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 = 2932; __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 = 2932; __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/_netCDF4.pyx":2934
+ *             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 = 2934; __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 = 2934; __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 = 2934; __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/_netCDF4.pyx":2935
+ *                 # 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 = 2935; __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 = 2935; __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 = 2935; __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 = 2935; __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/_netCDF4.pyx":2932
+ *         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/_netCDF4.pyx":2936
+ *                 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_self->dimensions);
-  __pyx_r = __pyx_v_self->dimensions;
+  __Pyx_INCREF(__pyx_v_shape);
+  __pyx_r = __pyx_v_shape;
   goto __pyx_L0;
 
+  /* "netCDF4/_netCDF4.pyx":2930
+ *     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._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/_netCDF4.pyx":2937
+ *                 shape = shape + (len(dim),)
+ *             return shape
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("shape cannot be altered")
+ * 
+ */
+
 /* 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) {
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_5shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_7Dataset_10dimensions_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__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) {
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5shape_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_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);
-  __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;
+
+  /* "netCDF4/_netCDF4.pyx":2938
+ *             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__45, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2938; __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 = 2938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4/_netCDF4.pyx":2937
+ *                 shape = shape + (len(dim),)
+ *             return shape
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("shape cannot be altered")
+ * 
+ */
 
   /* function exit code */
-  __pyx_r = 0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.shape.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "netCDF4/_netCDF4.pyx":2942
+ *     property size:
+ *         """Return the number of stored elements."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return numpy.prod(self.shape)
+ * 
+ */
+
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_4size_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10dimensions_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_4size___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4size___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
   __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;
+  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/_netCDF4.pyx":2943
+ *         """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 = 2943; __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 = 2943; __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 = 2943; __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 = 2943; __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 = 2943; __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 = 2943; __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/_netCDF4.pyx":2942
+ *     property size:
+ *         """Return the number of stored elements."""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return numpy.prod(self.shape)
+ * 
+ */
 
   /* function exit code */
-  __pyx_r = 0;
+  __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._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/_netCDF4.pyx":2947
+ *     property dimensions:
+ *         """get variables's dimension names"""
+ *         def __get__(self):             # <<<<<<<<<<<<<<
+ *             return self._getdims()
+ *         def __set__(self,value):
+ */
+
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_10dimensions_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_10dimensions_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));
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":2948
+ *         """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_INCREF(__pyx_v_self->variables);
-  __pyx_r = __pyx_v_self->variables;
+  __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 = 2948; __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 = 2948; __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 = 2948; __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/_netCDF4.pyx":2947
+ *     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._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/_netCDF4.pyx":2949
+ *         def __get__(self):
+ *             return self._getdims()
+ *         def __set__(self,value):             # <<<<<<<<<<<<<<
+ *             raise AttributeError("dimensions cannot be altered")
+ * 
+ */
+
 /* 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) {
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_10dimensions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_7Dataset_9variables_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__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) {
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_10dimensions_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_8_netCDF4_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);
-  __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;
-}
+  /* "netCDF4/_netCDF4.pyx":2950
+ *             return self._getdims()
+ *         def __set__(self,value):
+ *             raise AttributeError("dimensions cannot be altered")             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2950; __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 = 2950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":2949
+ *         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._netCDF4.Variable.dimensions.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
   __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;
-}
+/* "netCDF4/_netCDF4.pyx":2953
+ * 
+ * 
+ *     def group(self):             # <<<<<<<<<<<<<<
+ *         """
+ * group(self)
+ */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_13group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_12group[] = "\ngroup(self)\n\nreturn the group that this L{Variable} is a member of.";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_13group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
   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));
+  __Pyx_RefNannySetupContext("group (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_12group(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_12group(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_RefNannySetupContext("group", 0);
+
+  /* "netCDF4/_netCDF4.pyx":2958
+ * 
+ * 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->disk_format);
-  __pyx_r = __pyx_v_self->disk_format;
+  __Pyx_INCREF(__pyx_v_self->_grp);
+  __pyx_r = __pyx_v_self->_grp;
   goto __pyx_L0;
 
+  /* "netCDF4/_netCDF4.pyx":2953
+ * 
+ * 
+ *     def group(self):             # <<<<<<<<<<<<<<
+ *         """
+ * group(self)
+ */
+
   /* function exit code */
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -30197,1371 +27476,1698 @@ static PyObject *__pyx_pf_7netCDF4_7Dataset_11disk_format___get__(struct __pyx_o
   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;
-}
+/* "netCDF4/_netCDF4.pyx":2960
+ *         return self._grp
+ * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         """
+ * ncattrs(self)
+ */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_15ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_14ncattrs[] = "\nncattrs(self)\n\nreturn netCDF attribute names for this L{Variable} in a list.";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_15ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
   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));
+  __Pyx_RefNannySetupContext("ncattrs (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_14ncattrs(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_14ncattrs(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("ncattrs", 0);
+
+  /* "netCDF4/_netCDF4.pyx":2965
+ * 
+ * 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_INCREF(__pyx_v_self->path);
-  __pyx_r = __pyx_v_self->path;
+  __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__get_att_names(__pyx_v_self->_grpid, __pyx_v_self->_varid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2965; __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/_netCDF4.pyx":2960
+ *         return self._grp
+ * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         """
+ * ncattrs(self)
+ */
+
   /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.ncattrs", __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_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;
-}
+/* "netCDF4/_netCDF4.pyx":2967
+ *         return _get_att_names(self._grpid, self._varid)
+ * 
+ *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
+ *         """
+ * setncattr(self,name,value)
+ */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_17setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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_8_netCDF4_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("__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_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 = 2967; __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 = 2967; __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 = 2967; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.setncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __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;
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_16setncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), __pyx_v_name, __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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_16setncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+  PyObject *__pyx_r = NULL;
   __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;
-}
+  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);
 
-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;
+  /* "netCDF4/_netCDF4.pyx":2974
+ * 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); 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_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 = 2974; __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 = 2974; __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 = 2974; __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 = 2974; __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:;
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":2975
+ * 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_8_netCDF4__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 = 2975; __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":1424
- *     cdef public int _isopen
- *     cdef public groups, dimensions, variables, disk_format, path, parent,\
- *     file_format, data_model, cmptypes, vltypes, keepweakref             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":2976
+ *         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 __init__(self, filename, mode='r', clobber=True, format='NETCDF4',
+ *     def setncatts(self,attdict):
  */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2976; __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 = 2976; __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 = 2976; __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 = 2976; __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 = 2976; __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:;
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":2967
+ *         return _get_att_names(self._grpid, self._varid)
+ * 
+ *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
+ *         """
+ * setncattr(self,name,value)
+ */
 
   /* 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;
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
-
-  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.setncattr", __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_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;
-}
+/* "netCDF4/_netCDF4.pyx":2978
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ * 
+ *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
+ *         """
+ * setncatts(self,attdict)
+ */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_19setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_19setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict) {
   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));
+  __Pyx_RefNannySetupContext("setncatts (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncatts(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_attdict));
 
   /* 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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_18setncatts(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_attdict) {
+  PyObject *__pyx_v_name = NULL;
+  PyObject *__pyx_v_value = NULL;
   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;
-}
+  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);
 
-/* 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;
-}
+  /* "netCDF4/_netCDF4.pyx":2986
+ * 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); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2986; __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 = 2986; __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 = 2986; __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 = 2986; __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 = 2986; __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:;
 
-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;
+  /* "netCDF4/_netCDF4.pyx":2987
+ * 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 = 2987; __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 = 2987; __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 = 2987; __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 = 2987; __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 = 2987; __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 = 2987; __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 = 2987; __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 = 2987; __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 = 2987; __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 = 2987; __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 = 2987; __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 = 2987; __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 = 2987; __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 = 2987; __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 = 2987; __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 = 2987; __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;
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":2988
+ *         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_8_netCDF4__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 = 2988; __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;
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":2987
+ * 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;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":2989
+ *         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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2989; __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 = 2989; __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 = 2989; __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 = 2989; __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 = 2989; __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:;
 
-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;
+  /* "netCDF4/_netCDF4.pyx":2978
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ * 
+ *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
+ *         """
+ * setncatts(self,attdict)
+ */
 
   /* function exit code */
-  __pyx_r = 0;
+  __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._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/_netCDF4.pyx":2991
+ *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
+ * 
+ *     def getncattr(self,name):             # <<<<<<<<<<<<<<
+ *         """
+ * getncattr(self,name)
+ */
+
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_21getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_21getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
   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));
+  __Pyx_RefNannySetupContext("getncattr (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_20getncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_name));
 
   /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-static PyObject *__pyx_pf_7netCDF4_7Dataset_8cmptypes___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_20getncattr(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
+  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/_netCDF4.pyx":2998
+ * 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_INCREF(__pyx_v_self->cmptypes);
-  __pyx_r = __pyx_v_self->cmptypes;
+  __pyx_t_1 = __pyx_v_self->_grp;
+  __Pyx_INCREF(__pyx_t_1);
+  __pyx_t_2 = __pyx_f_7netCDF4_8_netCDF4__get_att(__pyx_t_1, __pyx_v_self->_varid, __pyx_v_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2998; __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/_netCDF4.pyx":2991
+ *         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._netCDF4.Variable.getncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
+/* "netCDF4/_netCDF4.pyx":3000
+ *         return _get_att(self._grp, self._varid, name)
+ * 
+ *     def delncattr(self, name):             # <<<<<<<<<<<<<<
+ *         """
+ * delncattr(self,name,value)
+ */
+
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_23delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_23delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_r = 0;
   __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));
+  __Pyx_RefNannySetupContext("delncattr (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_22delncattr(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_name));
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_22delncattr(struct __pyx_obj_7netCDF4_8_netCDF4_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
-  __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;
+  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);
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":3008
+ * attributes."""
+ *         cdef char *attname
+ *         bytestr = _strencode(name)             # <<<<<<<<<<<<<<
+ *         attname = bytestr
+ *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
+ */
+  __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":3009
+ *         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 = 3009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_attname = __pyx_t_2;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":3010
+ *         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); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3010; __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 = 3010; __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 = 3010; __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 = 3010; __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 = 3010; __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:;
 
-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;
+  /* "netCDF4/_netCDF4.pyx":3011
+ *         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);
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":3012
+ *         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); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3012; __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 = 3012; __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 = 3012; __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 = 3012; __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 = 3012; __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:;
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":3013
+ *         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) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":3014
+ *         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 = 3014; __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 = 3014; __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 = 3014; __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 = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-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;
+  /* "netCDF4/_netCDF4.pyx":3000
+ *         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._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/_netCDF4.pyx":3016
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def filters(self):             # <<<<<<<<<<<<<<
+ *         """
+ * filters(self)
+ */
+
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_25filters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_24filters[] = "\nfilters(self)\n\nreturn dictionary containing HDF5 filter parameters.";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_25filters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
   __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));
+  __Pyx_RefNannySetupContext("filters (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_24filters(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_24filters(struct __pyx_obj_7netCDF4_8_netCDF4_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
-  __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;
-}
+  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);
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":3022
+ * 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
+ *         with nogil:
+ */
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __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 = 3022; __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 = 3022; __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 = 3022; __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 = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_filtdict = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":3023
+ *         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             # <<<<<<<<<<<<<<
+ *         with nogil:
+ *             ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __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 = 3023; __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 = 3023; __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;
+  }
 
-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;
+  /* "netCDF4/_netCDF4.pyx":3024
+ *         filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False}
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
+ *         if ierr != NC_NOERR:
+ */
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":3025
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
+ *         with nogil:
+ *             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));
+      }
 
-/* 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));
+      /* "netCDF4/_netCDF4.pyx":3024
+ *         filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False}
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
+ *         if ierr != NC_NOERR:
+ */
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L8;
+        }
+        __pyx_L8:;
+      }
+  }
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":3026
+ *         with nogil:
+ *             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'))
+ *         with nogil:
+ */
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
 
-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;
+    /* "netCDF4/_netCDF4.pyx":3027
+ *             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'))             # <<<<<<<<<<<<<<
+ *         with nogil:
+ *             ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
+ */
+    __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 = 3027; __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 = 3027; __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 = 3027; __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 = 3027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-  /* function exit code */
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":3028
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
+ *         if ierr != NC_NOERR:
+ */
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
 
-/* 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));
+        /* "netCDF4/_netCDF4.pyx":3029
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         with nogil:
+ *             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));
+      }
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":3028
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
+ *         if ierr != NC_NOERR:
+ */
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L12;
+        }
+        __pyx_L12:;
+      }
+  }
 
-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;
+  /* "netCDF4/_netCDF4.pyx":3030
+ *         with nogil:
+ *             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) {
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":3031
+ *             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 = 3031; __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 = 3031; __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 = 3031; __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 = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":3032
+ *         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) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":3033
+ *             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 = 3033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-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;
+    /* "netCDF4/_netCDF4.pyx":3034
+ *         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 = 3034; __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 = 3034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L14;
+  }
+  __pyx_L14:;
+
+  /* "netCDF4/_netCDF4.pyx":3035
+ *             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/_netCDF4.pyx":3036
+ *             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 = 3036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L15;
+  }
+  __pyx_L15:;
+
+  /* "netCDF4/_netCDF4.pyx":3037
+ *         if ishuffle:
+ *             filtdict['shuffle']=True
+ *         if ifletcher32:             # <<<<<<<<<<<<<<
+ *             filtdict['fletcher32']=True
+ *         return filtdict
+ */
+  __pyx_t_3 = (__pyx_v_ifletcher32 != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4/_netCDF4.pyx":3038
+ *             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 = 3038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L16;
+  }
+  __pyx_L16:;
+
+  /* "netCDF4/_netCDF4.pyx":3039
+ *         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/_netCDF4.pyx":3016
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ * 
+ *     def filters(self):             # <<<<<<<<<<<<<<
+ *         """
+ * filters(self)
+ */
 
   /* function exit code */
-  __pyx_r = 0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4._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":2118
- * 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
+/* "netCDF4/_netCDF4.pyx":3041
+ *         return filtdict
+ * 
+ *     def endian(self):             # <<<<<<<<<<<<<<
+ *         """
+ * endian(self)
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_27endian(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_26endian[] = "\nendian(self)\n\nreturn endian-ness (little,big,native) of variable (as stored in HDF5 file).";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_27endian(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+  PyObject *__pyx_r = 0;
   __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 = 2118; __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 = 2118; __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 = 2118; __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);
+  __Pyx_RefNannySetupContext("endian (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_26endian(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
   /* 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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_26endian(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
   int __pyx_v_ierr;
-  char *__pyx_v_groupname;
-  PyObject *__pyx_v_bytestr = NULL;
-  int __pyx_r;
+  int __pyx_v_iendian;
+  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;
-  int __pyx_t_7;
-  int __pyx_t_8;
-  int __pyx_t_9;
-  PyObject *(*__pyx_t_10)(PyObject *);
-  char *__pyx_t_11;
+  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("__init__", 0);
-
-  /* "netCDF4.pyx":2122
- *         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 = 2122; __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;
+  __Pyx_RefNannySetupContext("endian", 0);
 
-  /* "netCDF4.pyx":2123
- *         # 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)
+  /* "netCDF4/_netCDF4.pyx":3047
+ * 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'
+ *         with nogil:
  */
-  __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 = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3047; __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;
+  __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 = 3047; __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 = 3047; __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":2125
- *         self.file_format = parent.file_format
- *         # full path to Group.
- *         self.path = posixpath.join(parent.path, name)             # <<<<<<<<<<<<<<
- *         # parent group.
- *         self.parent = parent
+    /* "netCDF4/_netCDF4.pyx":3048
+ *         cdef int ierr, iendian
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
+ *             return 'native'             # <<<<<<<<<<<<<<
+ *         with nogil:
+ *             ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
  */
-  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2125; __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 = 2125; __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 = 2125; __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 = 2125; __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_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_native);
+    __pyx_r = __pyx_n_s_native;
+    goto __pyx_L0;
   }
-  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 = 2125; __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":2127
- *         self.path = posixpath.join(parent.path, name)
- *         # parent group.
- *         self.parent = parent             # <<<<<<<<<<<<<<
- *         # propagate weak reference setting from parent.
- *         self.keepweakref = parent.keepweakref
+  /* "netCDF4/_netCDF4.pyx":3049
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
+ *             return 'native'
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
+ *         if ierr != NC_NOERR:
  */
-  __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;
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
 
-  /* "netCDF4.pyx":2129
- *         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 = 2129; __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":2130
- *         # 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 = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_8 = (__pyx_t_7 != 0);
-  if (__pyx_t_8) {
-
-    /* "netCDF4.pyx":2131
- *         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)
+        /* "netCDF4/_netCDF4.pyx":3050
+ *             return 'native'
+ *         with nogil:
+ *             ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-    __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 = 2131; __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 = 2131; __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;
+        __pyx_v_ierr = nc_inq_var_endian(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_iendian));
+      }
 
-    /* "netCDF4.pyx":2133
- *             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)
+      /* "netCDF4/_netCDF4.pyx":3049
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
+ *             return 'native'
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
+ *         if ierr != NC_NOERR:
  */
-    __pyx_t_1 = __pyx_f_7netCDF4__get_types(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2133; __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 = 2133; __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); 
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L8;
+        }
+        __pyx_L8:;
       }
-      __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 = 2133; __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 = 2133; __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 = 2133; __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 = 2133; __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 = 2133; __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":2135
- *             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)
+  /* "netCDF4/_netCDF4.pyx":3051
+ *         with nogil:
+ *             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_1 = __pyx_f_7netCDF4__get_dims(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2135; __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;
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
 
-    /* "netCDF4.pyx":2137
- *             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)
+    /* "netCDF4/_netCDF4.pyx":3052
+ *             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_1 = __pyx_f_7netCDF4__get_vars(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 3052; __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 = 3052; __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_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":2139
- *             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 = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3052; __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;
+    __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 = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  /*else*/ {
-
-    /* "netCDF4.pyx":2141
- *             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 = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_v_bytestr = __pyx_t_1;
-    __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":2142
+  /* "netCDF4/_netCDF4.pyx":3055
+ *         if iendian == NC_ENDIAN_LITTLE:
+ *             return 'little'
+ *         elif iendian == NC_ENDIAN_BIG:             # <<<<<<<<<<<<<<
+ *             return 'big'
  *         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 = 2142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_groupname = __pyx_t_11;
-
-    /* "netCDF4.pyx":2143
- *             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 = 2143; __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 = 2143; __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":2144
- *             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":2145
- *             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 = 2145; __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 = 2145; __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 = 2145; __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 = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+  switch (__pyx_v_iendian) {
 
-    /* "netCDF4.pyx":2146
- *             if ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *             self.cmptypes = OrderedDict()             # <<<<<<<<<<<<<<
- *             self.vltypes = OrderedDict()
- *             self.dimensions = OrderedDict()
+    /* "netCDF4/_netCDF4.pyx":3053
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if iendian == NC_ENDIAN_LITTLE:             # <<<<<<<<<<<<<<
+ *             return 'little'
+ *         elif iendian == NC_ENDIAN_BIG:
  */
-    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2146; __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 = 2146; __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 = 2146; __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;
+    case NC_ENDIAN_LITTLE:
 
-    /* "netCDF4.pyx":2147
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *             self.cmptypes = OrderedDict()
- *             self.vltypes = OrderedDict()             # <<<<<<<<<<<<<<
- *             self.dimensions = OrderedDict()
- *             self.variables = OrderedDict()
+    /* "netCDF4/_netCDF4.pyx":3054
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         if iendian == NC_ENDIAN_LITTLE:
+ *             return 'little'             # <<<<<<<<<<<<<<
+ *         elif iendian == NC_ENDIAN_BIG:
+ *             return 'big'
  */
-    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); 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_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 = 2147; __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 = 2147; __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;
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_little);
+    __pyx_r = __pyx_n_s_little;
+    goto __pyx_L0;
+    break;
 
-    /* "netCDF4.pyx":2148
- *             self.cmptypes = OrderedDict()
- *             self.vltypes = OrderedDict()
- *             self.dimensions = OrderedDict()             # <<<<<<<<<<<<<<
- *             self.variables = OrderedDict()
- *             self.groups = OrderedDict()
+    /* "netCDF4/_netCDF4.pyx":3055
+ *         if iendian == NC_ENDIAN_LITTLE:
+ *             return 'little'
+ *         elif iendian == NC_ENDIAN_BIG:             # <<<<<<<<<<<<<<
+ *             return 'big'
+ *         else:
  */
-    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2148; __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 = 2148; __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 = 2148; __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;
+    case NC_ENDIAN_BIG:
 
-    /* "netCDF4.pyx":2149
- *             self.vltypes = OrderedDict()
- *             self.dimensions = OrderedDict()
- *             self.variables = OrderedDict()             # <<<<<<<<<<<<<<
- *             self.groups = OrderedDict()
- * 
+    /* "netCDF4/_netCDF4.pyx":3056
+ *             return 'little'
+ *         elif iendian == NC_ENDIAN_BIG:
+ *             return 'big'             # <<<<<<<<<<<<<<
+ *         else:
+ *             return 'native'
  */
-    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2149; __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 = 2149; __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 = 2149; __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;
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_big);
+    __pyx_r = __pyx_n_s_big;
+    goto __pyx_L0;
+    break;
+    default:
 
-    /* "netCDF4.pyx":2150
- *             self.dimensions = OrderedDict()
- *             self.variables = OrderedDict()
- *             self.groups = OrderedDict()             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":3058
+ *             return 'big'
+ *         else:
+ *             return 'native'             # <<<<<<<<<<<<<<
  * 
- *     def close(self):
+ *     def chunking(self):
  */
-    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2150; __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 = 2150; __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 = 2150; __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_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_n_s_native);
+    __pyx_r = __pyx_n_s_native;
+    goto __pyx_L0;
+    break;
   }
-  __pyx_L3:;
 
-  /* "netCDF4.pyx":2118
- * 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
+  /* "netCDF4/_netCDF4.pyx":3041
+ *         return filtdict
+ * 
+ *     def endian(self):             # <<<<<<<<<<<<<<
+ *         """
+ * endian(self)
  */
 
   /* 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_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.endian", __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":2152
- *             self.groups = OrderedDict()
+/* "netCDF4/_netCDF4.pyx":3060
+ *             return 'native'
  * 
- *     def close(self):             # <<<<<<<<<<<<<<
+ *     def chunking(self):             # <<<<<<<<<<<<<<
  *         """
- * close(self)
+ * chunking(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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_29chunking(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_29chunking(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));
+  __Pyx_RefNannySetupContext("chunking (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_28chunking(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_28chunking(struct __pyx_obj_7netCDF4_8_netCDF4_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("close", 0);
+  __Pyx_RefNannySetupContext("chunking", 0);
 
-  /* "netCDF4.pyx":2158
- * 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):
+  /* "netCDF4/_netCDF4.pyx":3070
+ *         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_Call(__pyx_builtin_IOError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); 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_Raise(__pyx_t_1, 0, 0, 0);
+  __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 = 3070; __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 = 3070; __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_filename = __pyx_f[0]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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":2152
- *             self.groups = OrderedDict()
- * 
- *     def close(self):             # <<<<<<<<<<<<<<
- *         """
- * close(self)
+  /* "netCDF4/_netCDF4.pyx":3071
+ *         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)
+ *         with nogil:
  */
+  __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 = 3071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_ndims = __pyx_t_4;
 
-  /* 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/_netCDF4.pyx":3072
+ *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None
+ *         ndims = self.ndim
+ *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)             # <<<<<<<<<<<<<<
+ *         with nogil:
+ *             ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
+ */
+  __pyx_v_chunksizesp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims)));
 
-/* "netCDF4.pyx":2160
- *         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
+  /* "netCDF4/_netCDF4.pyx":3073
+ *         ndims = self.ndim
+ *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
+ *         if ierr != NC_NOERR:
  */
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
 
-/* 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));
+        /* "netCDF4/_netCDF4.pyx":3074
+ *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+ *         with nogil:
+ *             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/_netCDF4.pyx":3073
+ *         ndims = self.ndim
+ *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
+ *         if ierr != NC_NOERR:
+ */
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L8;
+        }
+        __pyx_L8:;
+      }
+  }
+
+  /* "netCDF4/_netCDF4.pyx":3075
+ *         with nogil:
+ *             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/_netCDF4.pyx":3076
+ *             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 = 3076; __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 = 3076; __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 = 3076; __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 = 3076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "netCDF4/_netCDF4.pyx":3077
+ *         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 = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_chunksizes = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":3078
+ *             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/_netCDF4.pyx":3079
+ *         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 = 3079; __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 = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+
+  /* "netCDF4/_netCDF4.pyx":3080
+ *         for n from 0 <= n < ndims:
+ *             chunksizes.append(chunksizesp[n])
+ *         free(chunksizesp)             # <<<<<<<<<<<<<<
+ *         if icontiguous:
+ *             return 'contiguous'
+ */
+  free(__pyx_v_chunksizesp);
+
+  /* "netCDF4/_netCDF4.pyx":3081
+ *             chunksizes.append(chunksizesp[n])
+ *         free(chunksizesp)
+ *         if icontiguous:             # <<<<<<<<<<<<<<
+ *             return 'contiguous'
+ *         else:
+ */
+  __pyx_t_3 = (__pyx_v_icontiguous != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4/_netCDF4.pyx":3082
+ *         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/_netCDF4.pyx":3084
+ *             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/_netCDF4.pyx":3060
+ *             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._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;
 }
 
-static PyObject *__pyx_pf_7netCDF4_5Group_4_getname(struct __pyx_obj_7netCDF4_Group *__pyx_v_self) {
-  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
+/* "netCDF4/_netCDF4.pyx":3086
+ *             return chunksizes
+ * 
+ *     def get_var_chunk_cache(self):             # <<<<<<<<<<<<<<
+ *         """
+ * get_var_chunk_cache(self)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_31get_var_chunk_cache(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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_8_netCDF4_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_8_netCDF4_8Variable_30get_var_chunk_cache(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_30get_var_chunk_cache(struct __pyx_obj_7netCDF4_8_netCDF4_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;
@@ -31569,21 +29175,17 @@ static PyObject *__pyx_pf_7netCDF4_5Group_4_getname(struct __pyx_obj_7netCDF4_Gr
   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;
-  Py_ssize_t __pyx_t_8;
-  PyObject *__pyx_t_9 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("_getname", 0);
+  __Pyx_RefNannySetupContext("get_var_chunk_cache", 0);
 
-  /* "netCDF4.pyx":2164
- *         cdef int err
- *         cdef char namstring[NC_MAX_NAME+1]
+  /* "netCDF4/_netCDF4.pyx":3096
+ *         cdef size_t sizep, nelemsp
+ *         cdef float preemptionp
  *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_grpname(self._grpid, namstring)
- *         if ierr != NC_NOERR:
+ *             ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
+ *                    &nelemsp, &preemptionp)
  */
   {
       #ifdef WITH_THREAD
@@ -31592,22 +29194,22 @@ static PyObject *__pyx_pf_7netCDF4_5Group_4_getname(struct __pyx_obj_7netCDF4_Gr
       #endif
       /*try:*/ {
 
-        /* "netCDF4.pyx":2165
- *         cdef char namstring[NC_MAX_NAME+1]
+        /* "netCDF4/_netCDF4.pyx":3097
+ *         cdef float preemptionp
  *         with nogil:
- *             ierr = nc_inq_grpname(self._grpid, namstring)             # <<<<<<<<<<<<<<
+ *             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'))
  */
-        __pyx_v_ierr = nc_inq_grpname(__pyx_v_self->__pyx_base._grpid, __pyx_v_namstring);
+        __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":2164
- *         cdef int err
- *         cdef char namstring[NC_MAX_NAME+1]
+      /* "netCDF4/_netCDF4.pyx":3096
+ *         cdef size_t sizep, nelemsp
+ *         cdef float preemptionp
  *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_grpname(self._grpid, namstring)
- *         if ierr != NC_NOERR:
+ *             ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
+ *                    &nelemsp, &preemptionp)
  */
       /*finally:*/ {
         /*normal exit:*/{
@@ -31620,94 +29222,87 @@ static PyObject *__pyx_pf_7netCDF4_5Group_4_getname(struct __pyx_obj_7netCDF4_Gr
       }
   }
 
-  /* "netCDF4.pyx":2166
- *         with nogil:
- *             ierr = nc_inq_grpname(self._grpid, namstring)
+  /* "netCDF4/_netCDF4.pyx":3099
+ *             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'))
- *         return namstring.decode(default_encoding,unicode_error)
+ *         size = sizep; nelems = nelemsp; preemption = preemptionp
  */
   __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
   if (__pyx_t_1) {
 
-    /* "netCDF4.pyx":2167
- *             ierr = nc_inq_grpname(self._grpid, namstring)
+    /* "netCDF4/_netCDF4.pyx":3100
+ *                    &nelemsp, &preemptionp)
  *         if ierr != NC_NOERR:
  *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *         return namstring.decode(default_encoding,unicode_error)
- * 
+ *         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 = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3100; __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 = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3100; __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 = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3100; __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 = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
 
-  /* "netCDF4.pyx":2168
+  /* "netCDF4/_netCDF4.pyx":3101
  *         if ierr != NC_NOERR:
  *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         return namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ *         size = sizep; nelems = nelemsp; preemption = preemptionp             # <<<<<<<<<<<<<<
+ *         return (size,nelems,preemption)
  * 
- *     property name:
+ */
+  __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 = 3101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_preemption = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":3102
+ *             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_4 = __Pyx_PyObject_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __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 = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __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_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-  __pyx_t_7 = NULL;
-  __pyx_t_8 = 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_8 = 1;
-    }
-  }
-  __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2168; __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_4);
+  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);
-  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
-  __Pyx_GIVEREF(__pyx_t_6);
-  __pyx_t_4 = 0;
-  __pyx_t_6 = 0;
-  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  __pyx_r = __pyx_t_3;
+  __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":2160
- *         raise IOError('cannot close a L{Group} (only applies to Dataset)')
+  /* "netCDF4/_netCDF4.pyx":3086
+ *             return chunksizes
  * 
- *     def _getname(self):             # <<<<<<<<<<<<<<
- *         # private method to get name associated with instance.
- *         cdef int err
+ *     def get_var_chunk_cache(self):             # <<<<<<<<<<<<<<
+ *         """
+ * get_var_chunk_cache(self)
  */
 
   /* function exit code */
@@ -31715,188 +29310,41 @@ static PyObject *__pyx_pf_7netCDF4_5Group_4_getname(struct __pyx_obj_7netCDF4_Gr
   __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_9);
-  __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":2172
- *     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":2173
- *         """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 = 2173; __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 = 2173; __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 = 2173; __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":2172
- *     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_AddTraceback("netCDF4._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":2174
- *         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":2175
- *             return self._getname()
- *         def __set__(self,value):
- *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
- * 
- * 
- */
-  __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 = 2175; __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 = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "netCDF4.pyx":2174
- *         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":2210
- *     cdef public _data_model, _name, _grp
+/* "netCDF4/_netCDF4.pyx":3104
+ *         return (size,nelems,preemption)
  * 
- *     def __init__(self, grp, name, size=None, **kwargs):             # <<<<<<<<<<<<<<
- *         cdef int ierr
- *         cdef char *dimname
+ *     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 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_33set_var_chunk_cache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_33set_var_chunk_cache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_size = 0;
-  PyObject *__pyx_v_kwargs = 0;
+  PyObject *__pyx_v_nelems = 0;
+  PyObject *__pyx_v_preemption = 0;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  int __pyx_r;
+  PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
-  __Pyx_GOTREF(__pyx_v_kwargs);
+  __Pyx_RefNannySetupContext("set_var_chunk_cache (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grp_2,&__pyx_n_s_name,&__pyx_n_s_size,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;
@@ -31911,397 +29359,487 @@ static int __pyx_pw_7netCDF4_9Dimension_1__init__(PyObject *__pyx_v_self, PyObje
       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;
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
+          if (value) { values[0] = value; kw_args--; }
+        }
         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 = 2210; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        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_size);
+          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, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_var_chunk_cache") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3104; __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;
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
         default: goto __pyx_L5_argtuple_error;
       }
     }
-    __pyx_v_grp = values[0];
-    __pyx_v_name = values[1];
-    __pyx_v_size = values[2];
+    __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("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2210; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("set_var_chunk_cache", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3104; __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_AddTraceback("netCDF4._netCDF4.Variable.set_var_chunk_cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
-  return -1;
+  return NULL;
   __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);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_32set_var_chunk_cache(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), __pyx_v_size, __pyx_v_nelems, __pyx_v_preemption);
 
   /* 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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_32set_var_chunk_cache(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_size, PyObject *__pyx_v_nelems, PyObject *__pyx_v_preemption) {
   int __pyx_v_ierr;
-  char *__pyx_v_dimname;
-  size_t __pyx_v_lendim;
-  PyObject *__pyx_v_bytestr = NULL;
-  int __pyx_r;
+  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;
-  int __pyx_t_2;
-  int __pyx_t_3;
+  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_6)(PyObject *);
   int __pyx_t_7;
-  char *__pyx_t_8;
+  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("__init__", 0);
-
-  /* "netCDF4.pyx":2214
- *         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 = 2214; __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 = 2214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v_self->_grpid = __pyx_t_2;
+  __Pyx_RefNannySetupContext("set_var_chunk_cache", 0);
 
-  /* "netCDF4.pyx":2217
- *         # 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:
+  /* "netCDF4/_netCDF4.pyx":3115
+ *         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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2217; __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 = 2217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __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 = 3115; __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) {
-
-    /* "netCDF4.pyx":2218
- *         # 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 = 2218; __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 = 2218; __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);
-      }
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3115; __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 = 3115; __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 = 3115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    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 = 2218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+    #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_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2218; __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 = 2218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __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 = 3115; __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 = 3115; __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 = 3115; __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 = 3115; __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 = 3115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = NULL;
     __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;
+    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 = 3115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L4_unpacking_done:;
   }
-  /*else*/ {
+  __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":2220
- *             self._grp = weakref.proxy(grp)
+  /* "netCDF4/_netCDF4.pyx":3116
+ *         # 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:
- *             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:;
+  __pyx_t_7 = (__pyx_v_size != Py_None);
+  __pyx_t_8 = (__pyx_t_7 != 0);
+  if (__pyx_t_8) {
 
-  /* "netCDF4.pyx":2221
+    /* "netCDF4/_netCDF4.pyx":3117
+ *         size_orig, nelems_orig, preemption_orig = self.get_var_chunk_cache()
+ *         if size is not None:
+ *             sizep = size             # <<<<<<<<<<<<<<
  *         else:
- *             self._grp = grp
- *         self._data_model = grp.data_model             # <<<<<<<<<<<<<<
- *         self._name = name
- *         if 'id' in kwargs:
+ *             sizep = size_orig
  */
-  __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 = 2221; __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;
+    __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 = 3117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_sizep = __pyx_t_9;
+    goto __pyx_L5;
+  }
+  /*else*/ {
 
-  /* "netCDF4.pyx":2222
- *             self._grp = grp
- *         self._data_model = grp.data_model
- *         self._name = name             # <<<<<<<<<<<<<<
- *         if 'id' in kwargs:
- *             self._dimid = kwargs['id']
+    /* "netCDF4/_netCDF4.pyx":3119
+ *             sizep = size
+ *         else:
+ *             sizep = size_orig             # <<<<<<<<<<<<<<
+ *         if nelems is not None:
+ *             nelemsp = nelems
  */
-  __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;
+    __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 = 3119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_sizep = __pyx_t_9;
+  }
+  __pyx_L5:;
 
-  /* "netCDF4.pyx":2223
- *         self._data_model = grp.data_model
- *         self._name = name
- *         if 'id' in kwargs:             # <<<<<<<<<<<<<<
- *             self._dimid = kwargs['id']
+  /* "netCDF4/_netCDF4.pyx":3120
+ *         else:
+ *             sizep = size_orig
+ *         if nelems is not None:             # <<<<<<<<<<<<<<
+ *             nelemsp = nelems
  *         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 = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_7 = (__pyx_t_3 != 0);
+  __pyx_t_8 = (__pyx_v_nelems != Py_None);
+  __pyx_t_7 = (__pyx_t_8 != 0);
   if (__pyx_t_7) {
 
-    /* "netCDF4.pyx":2224
- *         self._name = name
- *         if 'id' in kwargs:
- *             self._dimid = kwargs['id']             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":3121
+ *             sizep = size_orig
+ *         if nelems is not None:
+ *             nelemsp = nelems             # <<<<<<<<<<<<<<
  *         else:
- *             bytestr = _strencode(name)
+ *             nelemsp = nelems_orig
  */
-    __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 = 2224; __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 = 2224; __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;
+    __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 = 3121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_nelemsp = __pyx_t_9;
+    goto __pyx_L6;
   }
   /*else*/ {
 
-    /* "netCDF4.pyx":2226
- *             self._dimid = kwargs['id']
+    /* "netCDF4/_netCDF4.pyx":3123
+ *             nelemsp = nelems
  *         else:
- *             bytestr = _strencode(name)             # <<<<<<<<<<<<<<
- *             dimname = bytestr
- *             if size is not None:
+ *             nelemsp = nelems_orig             # <<<<<<<<<<<<<<
+ *         if preemption is not None:
+ *             preemptionp = preemption
  */
-    __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_v_bytestr = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __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 = 3123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_nelemsp = __pyx_t_9;
+  }
+  __pyx_L6:;
 
-    /* "netCDF4.pyx":2227
+  /* "netCDF4/_netCDF4.pyx":3124
+ *         else:
+ *             nelemsp = nelems_orig
+ *         if preemption is not None:             # <<<<<<<<<<<<<<
+ *             preemptionp = preemption
  *         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 = 2227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_dimname = __pyx_t_8;
+  __pyx_t_7 = (__pyx_v_preemption != Py_None);
+  __pyx_t_8 = (__pyx_t_7 != 0);
+  if (__pyx_t_8) {
 
-    /* "netCDF4.pyx":2228
- *             bytestr = _strencode(name)
- *             dimname = bytestr
- *             if size is not None:             # <<<<<<<<<<<<<<
- *                 lendim = size
- *             else:
+    /* "netCDF4/_netCDF4.pyx":3125
+ *             nelemsp = nelems_orig
+ *         if preemption is not None:
+ *             preemptionp = preemption             # <<<<<<<<<<<<<<
+ *         else:
+ *             preemptionp = preemption_orig
  */
-    __pyx_t_7 = (__pyx_v_size != Py_None);
-    __pyx_t_3 = (__pyx_t_7 != 0);
-    if (__pyx_t_3) {
+    __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 = 3125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_preemptionp = __pyx_t_10;
+    goto __pyx_L7;
+  }
+  /*else*/ {
 
-      /* "netCDF4.pyx":2229
- *             dimname = bytestr
- *             if size is not None:
- *                 lendim = size             # <<<<<<<<<<<<<<
- *             else:
- *                 lendim = NC_UNLIMITED
+    /* "netCDF4/_netCDF4.pyx":3127
+ *             preemptionp = preemption
+ *         else:
+ *             preemptionp = preemption_orig             # <<<<<<<<<<<<<<
+ *         ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,
+ *                nelemsp, preemptionp)
  */
-      __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 = 2229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_v_lendim = __pyx_t_9;
-      goto __pyx_L5;
-    }
-    /*else*/ {
+    __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 = 3127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_preemptionp = __pyx_t_10;
+  }
+  __pyx_L7:;
 
-      /* "netCDF4.pyx":2231
- *                 lendim = size
- *             else:
- *                 lendim = NC_UNLIMITED             # <<<<<<<<<<<<<<
- *             if grp.data_model != 'NETCDF4': grp._redef()
- *             ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid)
+  /* "netCDF4/_netCDF4.pyx":3128
+ *         else:
+ *             preemptionp = preemption_orig
+ *         ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,             # <<<<<<<<<<<<<<
+ *                nelemsp, preemptionp)
+ *         if ierr != NC_NOERR:
  */
-      __pyx_v_lendim = NC_UNLIMITED;
-    }
-    __pyx_L5:;
+  __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":2232
- *             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()
+  /* "netCDF4/_netCDF4.pyx":3130
+ *         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/_netCDF4.pyx":3131
+ *                nelemsp, preemptionp)
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ * 
+ *     def __delattr__(self,name):
  */
-    __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 = 2232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3131; __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 = 2232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __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;
-    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 = 2232; __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 = 2232; __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 = 2232; __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:;
+    __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 = 3131; __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 = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-    /* "netCDF4.pyx":2233
- *                 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:
+  /* "netCDF4/_netCDF4.pyx":3104
+ *         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)
  */
-    __pyx_v_ierr = nc_def_dim(__pyx_v_self->_grpid, __pyx_v_dimname, __pyx_v_lendim, (&__pyx_v_self->_dimid));
 
-    /* "netCDF4.pyx":2234
- *             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'))
+  /* 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._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/_netCDF4.pyx":3133
+ *             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:
  */
-    __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 = 2234; __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 = 2234; __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 = 2234; __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 = 2234; __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 = 2234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_35__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_34__delattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_name));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_34__delattr__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":3135
+ *     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 = 3135; __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 = 3135; __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/_netCDF4.pyx":3136
+ *         # 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 = 3136; __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 = 3136; __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;
+    } else {
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3136; __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 = 3136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     }
-    __pyx_L7:;
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    goto __pyx_L3;
+  }
+  /*else*/ {
 
-    /* "netCDF4.pyx":2235
- *             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'))
+    /* "netCDF4/_netCDF4.pyx":3139
+ *         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_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-    if (__pyx_t_3) {
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __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 = 3139; __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 = 3139; __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 = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-      /* "netCDF4.pyx":2236
- *             if grp.data_model != 'NETCDF4': grp._enddef()
- *             if ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":3138
+ *             self.delncattr(name)
+ *         else:
+ *             raise AttributeError(             # <<<<<<<<<<<<<<
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
  * 
- *     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 = 2236; __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 = 2236; __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 = 2236; __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 = 2236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3138; __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 = 3138; __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 = 3138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L4:;
+  __pyx_L3:;
 
-  /* "netCDF4.pyx":2210
- *     cdef public _data_model, _name, _grp
+  /* "netCDF4/_netCDF4.pyx":3133
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  * 
- *     def __init__(self, grp, name, size=None, **kwargs):             # <<<<<<<<<<<<<<
- *         cdef int ierr
- *         cdef char *dimname
+ *     def __delattr__(self,name):             # <<<<<<<<<<<<<<
+ *         # if it's a netCDF attribute, remove it
+ *         if name not in _private_atts:
  */
 
   /* function exit code */
@@ -32312,6572 +29850,7517 @@ static int __pyx_pf_7netCDF4_9Dimension___init__(struct __pyx_obj_7netCDF4_Dimen
   __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_AddTraceback("netCDF4._netCDF4.Variable.__delattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = -1;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_bytestr);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":2238
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+/* "netCDF4/_netCDF4.pyx":3141
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
  * 
- *     def _getname(self):             # <<<<<<<<<<<<<<
- *         # private method to get name associated with instance.
- *         cdef int err, _grpid
+ *     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 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;
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_37__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_37__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
+  int __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_getname (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_9Dimension_2_getname(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__setattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_name), ((PyObject *)__pyx_v_value));
 
   /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-static PyObject *__pyx_pf_7netCDF4_9Dimension_2_getname(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
-  int __pyx_v__grpid;
-  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
-  int __pyx_v_ierr;
-  PyObject *__pyx_r = NULL;
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_36__setattr__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  char *__pyx_t_4;
+  PyObject *__pyx_t_4 = NULL;
   PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = NULL;
+  Py_ssize_t __pyx_t_6;
   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);
+  __Pyx_RefNannySetupContext("__setattr__", 0);
+  __Pyx_INCREF(__pyx_v_value);
 
-  /* "netCDF4.pyx":2242
- *         cdef int err, _grpid
- *         cdef char namstring[NC_MAX_NAME+1]
- *         _grpid = self._grp._grpid             # <<<<<<<<<<<<<<
- *         with nogil:
- *             ierr = nc_inq_dimname(_grpid, self._dimid, namstring)
+  /* "netCDF4/_netCDF4.pyx":3144
+ *         # 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_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3144; __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 = 2242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 3144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v__grpid = __pyx_t_2;
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
 
-  /* "netCDF4.pyx":2243
- *         cdef char namstring[NC_MAX_NAME+1]
- *         _grpid = self._grp._grpid
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_dimname(_grpid, self._dimid, namstring)
- *         if ierr != NC_NOERR:
+    /* "netCDF4/_netCDF4.pyx":3147
+ *             # 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)'
  */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
+    __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 = 3147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_3) {
 
-        /* "netCDF4.pyx":2244
- *         _grpid = self._grp._grpid
- *         with nogil:
- *             ierr = nc_inq_dimname(_grpid, self._dimid, namstring)             # <<<<<<<<<<<<<<
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+      /* "netCDF4/_netCDF4.pyx":3148
+ *             # 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_v_ierr = nc_inq_dimname(__pyx_v__grpid, __pyx_v_self->_dimid, __pyx_v_namstring);
-      }
+      __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 = 3148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_v_msg = __pyx_t_1;
+      __pyx_t_1 = 0;
 
-      /* "netCDF4.pyx":2243
- *         cdef char namstring[NC_MAX_NAME+1]
- *         _grpid = self._grp._grpid
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_dimname(_grpid, self._dimid, namstring)
- *         if ierr != NC_NOERR:
+      /* "netCDF4/_netCDF4.pyx":3150
+ *                 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)
  */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L5;
-        }
-        __pyx_L5:;
-      }
-  }
+      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3150; __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 = 3150; __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 = 3150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-  /* "netCDF4.pyx":2245
- *         with nogil:
- *             ierr = nc_inq_dimname(_grpid, self._dimid, namstring)
- *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         return namstring.decode(default_encoding,unicode_error)
+    /* "netCDF4/_netCDF4.pyx":3157
+ *                 #    "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_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_3) {
+    __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 = 3157; __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 = 3157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __pyx_t_2;
+    __pyx_L5_bool_binop_done:;
+    if (__pyx_t_3) {
 
-    /* "netCDF4.pyx":2246
- *             ierr = nc_inq_dimname(_grpid, self._dimid, namstring)
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *         return namstring.decode(default_encoding,unicode_error)
- * 
+      /* "netCDF4/_netCDF4.pyx":3158
+ *                 #    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_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 = 2246; __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 = 2246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3158; __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 = 3158; __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 = 3158; __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 = 3158; __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/_netCDF4.pyx":3159
+ *             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 = 3159; __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 = 2246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3159; __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);
+    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 = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2246; __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;
+    goto __pyx_L3;
   }
 
-  /* "netCDF4.pyx":2247
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         return namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
- * 
- *     property name:
+  /* "netCDF4/_netCDF4.pyx":3160
+ *                 value = numpy.array(value, self.dtype)
+ *             self.setncattr(name, value)
+ *         elif not name.endswith('__'):             # <<<<<<<<<<<<<<
+ *             if hasattr(self,name):
+ *                 raise AttributeError(
  */
-  __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 = 2247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __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 = 2247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
+  __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 = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __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 = 2247; __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 = 2247; __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_2 = ((!__pyx_t_3) != 0);
+  if (__pyx_t_2) {
+
+    /* "netCDF4/_netCDF4.pyx":3161
+ *             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 = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = (__pyx_t_2 != 0);
+    if (__pyx_t_3) {
+
+      /* "netCDF4/_netCDF4.pyx":3163
+ *             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 = 3163; __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 = 3163; __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 = 3163; __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 = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+      /* "netCDF4/_netCDF4.pyx":3162
+ *         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 = 3162; __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 = 3162; __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 = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
+    /*else*/ {
+
+      /* "netCDF4/_netCDF4.pyx":3165
+ *                 "'%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 = 3165; __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 = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    }
+    goto __pyx_L3;
   }
-  __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __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 = 2247; __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;
+  __pyx_L3:;
 
-  /* "netCDF4.pyx":2238
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+  /* "netCDF4/_netCDF4.pyx":3141
+ *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
  * 
- *     def _getname(self):             # <<<<<<<<<<<<<<
- *         # private method to get name associated with instance.
- *         cdef int err, _grpid
+ *     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_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_AddTraceback("netCDF4._netCDF4.Variable.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
   __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_XDECREF(__pyx_v_msg);
+  __Pyx_XDECREF(__pyx_v_value);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":2251
- *     property name:
- *         """string name of Dimension instance"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._getname()
- *         def __set__(self,value):
+/* "netCDF4/_netCDF4.pyx":3167
+ *                 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_9Dimension_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_7netCDF4_9Dimension_4name_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_39__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_39__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
   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));
+  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_38__getattr__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_name));
 
   /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-static PyObject *__pyx_pf_7netCDF4_9Dimension_4name___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_38__getattr__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name) {
+  PyObject *__pyx_v_names = NULL;
+  PyObject *__pyx_v_values = NULL;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
+  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("__get__", 0);
+  __Pyx_RefNannySetupContext("__getattr__", 0);
+  __Pyx_INCREF(__pyx_v_name);
 
-  /* "netCDF4.pyx":2252
- *         """string name of Dimension instance"""
- *         def __get__(self):
- *             return self._getname()             # <<<<<<<<<<<<<<
- *         def __set__(self,value):
- *             raise AttributeError("name cannot be altered")
+  /* "netCDF4/_netCDF4.pyx":3170
+ *         # 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_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 = 2252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 3170; __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 = 2252; __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_tuple__48, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __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 = 3170; __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_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __pyx_t_4;
+    goto __pyx_L4_bool_binop_done;
   }
-  __Pyx_GOTREF(__pyx_t_1);
+  __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 = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __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 = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
+  __pyx_t_1 = __pyx_t_4;
+  __pyx_L4_bool_binop_done:;
+  if (__pyx_t_1) {
 
-  /* "netCDF4.pyx":2251
- *     property name:
- *         """string name of Dimension instance"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._getname()
- *         def __set__(self,value):
+    /* "netCDF4/_netCDF4.pyx":3172
+ *         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 = 3172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_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.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":2253
- *         def __get__(self):
- *             return self._getname()
- *         def __set__(self,value):             # <<<<<<<<<<<<<<
- *             raise AttributeError("name cannot be altered")
- * 
+      /* "netCDF4/_netCDF4.pyx":3173
+ *             # 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 = 3173; __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 = 3173; __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 = 3173; __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;
 
-/* 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":2254
- *             return self._getname()
- *         def __set__(self,value):
- *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
- * 
- *     def __repr__(self):
+      /* "netCDF4/_netCDF4.pyx":3174
+ *             if name == '__dict__':
+ *                 names = self.ncattrs()
+ *                 values = []             # <<<<<<<<<<<<<<
+ *                 for name in names:
+ *                     values.append(_get_att(self._grp, self._varid, name))
  */
-  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2254; __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 = 2254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3174; __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":2253
- *         def __get__(self):
- *             return self._getname()
- *         def __set__(self,value):             # <<<<<<<<<<<<<<
- *             raise AttributeError("name cannot be altered")
- * 
+      /* "netCDF4/_netCDF4.pyx":3175
+ *                 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 = 3175; __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 = 3175; __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 = 3175; __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 = 3175; __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 = 3175; __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 = 3175; __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 = 3175; __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;
 
-  /* 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":2256
- *             raise AttributeError("name cannot be altered")
- * 
- *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         if python3:
- *            return self.__unicode__()
+        /* "netCDF4/_netCDF4.pyx":3176
+ *                 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_8_netCDF4__get_att(__pyx_t_3, __pyx_v_self->_varid, __pyx_v_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3176; __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 = 3176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-/* 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));
+        /* "netCDF4/_netCDF4.pyx":3175
+ *                 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;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":3177
+ *                 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 = 3177; __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 = 3177; __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 = 3177; __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 = 3177; __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 = 3177; __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 = 3177; __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 = 3177; __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*/ {
 
-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/_netCDF4.pyx":3179
+ *                 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 = 3179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+  }
 
-  /* "netCDF4.pyx":2257
- * 
- *     def __repr__(self):
- *         if python3:             # <<<<<<<<<<<<<<
- *            return self.__unicode__()
+  /* "netCDF4/_netCDF4.pyx":3180
+ *             else:
+ *                 raise AttributeError
+ *         elif name in _private_atts:             # <<<<<<<<<<<<<<
+ *             return self.__dict__[name]
  *         else:
  */
-  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2257; __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 = 2257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3180; __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 = 3180; __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":2258
- *     def __repr__(self):
- *         if python3:
- *            return self.__unicode__()             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":3181
+ *                 raise AttributeError
+ *         elif name in _private_atts:
+ *             return self.__dict__[name]             # <<<<<<<<<<<<<<
  *         else:
- *            return unicode(self).encode(default_encoding)
+ *             return self.getncattr(name)
  */
     __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 = 2258; __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 = 2258; __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 = 2258; __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;
+    __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 = 3181; __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 = 3181; __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":2260
- *            return self.__unicode__()
+    /* "netCDF4/_netCDF4.pyx":3183
+ *             return self.__dict__[name]
  *         else:
- *            return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
+ *             return self.getncattr(name)             # <<<<<<<<<<<<<<
  * 
- *     def __unicode__(self):
+ *     def renameAttribute(self, oldname, newname):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2260; __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 = 2260; __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 = 2260; __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 = 2260; __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_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 = 3183; __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_3, function);
+        __Pyx_DECREF_SET(__pyx_t_2, 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 = 2260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __Pyx_GOTREF(__pyx_t_1);
+    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 = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
     } else {
-      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2260; __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 = 2260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __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 = 3183; __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_3); __pyx_t_3 = 0;
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_r = __pyx_t_5;
+    __pyx_t_5 = 0;
     goto __pyx_L0;
   }
 
-  /* "netCDF4.pyx":2256
- *             raise AttributeError("name cannot be altered")
+  /* "netCDF4/_netCDF4.pyx":3167
+ *                 self.__dict__[name]=value
  * 
- *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         if python3:
- *            return self.__unicode__()
+ *     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_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_AddTraceback("netCDF4.Dimension.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_AddTraceback("netCDF4._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":2262
- *            return unicode(self).encode(default_encoding)
+/* "netCDF4/_netCDF4.pyx":3185
+ *             return self.getncattr(name)
  * 
- *     def __unicode__(self):             # <<<<<<<<<<<<<<
- *         if not dir(self._grp):
- *             return 'Dimension object no longer valid'
+ *     def renameAttribute(self, oldname, newname):             # <<<<<<<<<<<<<<
+ *         """
+ * renameAttribute(self, oldname, newname)
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_41renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_40renameAttribute[] = "\nrenameAttribute(self, oldname, newname)\n\nrename a L{Variable} attribute named C{oldname} to C{newname}.";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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("__unicode__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_9Dimension_6__unicode__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+  __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 = 3185; __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 = 3185; __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 = 3185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.renameAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_40renameAttribute(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);
 
   /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-static PyObject *__pyx_pf_7netCDF4_9Dimension_6__unicode__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_40renameAttribute(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  PyObject *__pyx_t_2 = NULL;
+  char *__pyx_t_2;
   int __pyx_t_3;
-  int __pyx_t_4;
-  PyObject *__pyx_t_5 = NULL;
-  Py_ssize_t __pyx_t_6;
+  PyObject *__pyx_t_4 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__unicode__", 0);
+  __Pyx_RefNannySetupContext("renameAttribute", 0);
 
-  /* "netCDF4.pyx":2263
- * 
- *     def __unicode__(self):
- *         if not dir(self._grp):             # <<<<<<<<<<<<<<
- *             return 'Dimension object no longer valid'
- *         if self.isunlimited():
+  /* "netCDF4/_netCDF4.pyx":3193
+ *         cdef char *oldnamec
+ *         cdef char *newnamec
+ *         bytestr = _strencode(oldname)             # <<<<<<<<<<<<<<
+ *         oldnamec = bytestr
+ *         bytestr = _strencode(newname)
  */
-  __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 = 2263; __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 = 2263; __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) {
+  __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_oldname, NULL); 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_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":2264
- *     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))
+  /* "netCDF4/_netCDF4.pyx":3194
+ *         cdef char *newnamec
+ *         bytestr = _strencode(oldname)
+ *         oldnamec = bytestr             # <<<<<<<<<<<<<<
+ *         bytestr = _strencode(newname)
+ *         newnamec = bytestr
  */
-    __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;
-  }
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_oldnamec = __pyx_t_2;
 
-  /* "netCDF4.pyx":2265
- *         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:
+  /* "netCDF4/_netCDF4.pyx":3195
+ *         bytestr = _strencode(oldname)
+ *         oldnamec = bytestr
+ *         bytestr = _strencode(newname)             # <<<<<<<<<<<<<<
+ *         newnamec = bytestr
+ *         ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec)
  */
-  __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 = 2265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3195; __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 = 2265; __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 = 2265; __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 = 2265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (__pyx_t_4) {
+  __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_1);
+  __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":2266
- *             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))
+  /* "netCDF4/_netCDF4.pyx":3196
+ *         oldnamec = bytestr
+ *         bytestr = _strencode(newname)
+ *         newnamec = bytestr             # <<<<<<<<<<<<<<
+ *         ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec)
+ *         if ierr != NC_NOERR:
  */
-    __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 = 2266; __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 = 2266; __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 = 2266; __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 = 2266; __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 = 2266; __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 = 2266; __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*/ {
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_newnamec = __pyx_t_2;
 
-    /* "netCDF4.pyx":2268
- *             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))             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":3197
+ *         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/_netCDF4.pyx":3198
+ *         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 __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 = 2268; __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 = 2268; __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 = 2268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
+
+    /* "netCDF4/_netCDF4.pyx":3199
+ *         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 = 3199; __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 = 2268; __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_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __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_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 = 2268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3199; __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 = 2268; __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_4); __pyx_t_4 = 0;
+    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_r = __pyx_t_2;
-    __pyx_t_2 = 0;
-    goto __pyx_L0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
 
-  /* "netCDF4.pyx":2262
- *            return unicode(self).encode(default_encoding)
+  /* "netCDF4/_netCDF4.pyx":3185
+ *             return self.getncattr(name)
  * 
- *     def __unicode__(self):             # <<<<<<<<<<<<<<
- *         if not dir(self._grp):
- *             return 'Dimension object no longer valid'
+ *     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_2);
-  __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_AddTraceback("netCDF4.Dimension.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4._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":2270
- *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
+/* "netCDF4/_netCDF4.pyx":3201
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  * 
- *     def __len__(self):             # <<<<<<<<<<<<<<
- *         # len(L{Dimension} instance) returns current size of dimension
- *         cdef int ierr
+ *     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 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_43__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_elem); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_43__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_elem) {
+  PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_9Dimension_8__len__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));
+  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_42__getitem__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_elem));
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_42__getitem__(struct __pyx_obj_7netCDF4_8_netCDF4_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
-  int __pyx_t_1;
-  char *__pyx_t_2;
+  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("__len__", 0);
-
-  /* "netCDF4.pyx":2274
- *         cdef int ierr
- *         cdef size_t lengthp
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
- *         if ierr != NC_NOERR:
- */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
-
-        /* "netCDF4.pyx":2275
- *         cdef size_t lengthp
- *         with nogil:
- *             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));
-      }
+  __Pyx_RefNannySetupContext("__getitem__", 0);
 
-      /* "netCDF4.pyx":2274
- *         cdef int ierr
- *         cdef size_t lengthp
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
- *         if ierr != NC_NOERR:
+  /* "netCDF4/_netCDF4.pyx":3207
+ *         # 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:
  */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L5;
-        }
-        __pyx_L5:;
-      }
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3207; __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 = 3207; __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 = 3207; __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 = 3207; __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 = 3207; __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 = 3207; __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 = 3207; __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 = 3207; __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 = 3207; __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":2276
- *         with nogil:
- *             ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
- *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         return lengthp
+  /* "netCDF4/_netCDF4.pyx":3208
+ *         # 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_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_1) {
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3208; __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 = 3208; __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 = 3208; __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 = 3208; __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":2277
- *             ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *         return lengthp
- * 
+  /* "netCDF4/_netCDF4.pyx":3209
+ *         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_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 = 2277; __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 = 2277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_9) {
+
+    /* "netCDF4/_netCDF4.pyx":3210
+ *         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 = 3210; __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 = 3210; __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 = 2277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3210; __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 = 3210; __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 = 3210; __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 = 3210; __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 = 2277; __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_data = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L5;
   }
+  /*else*/ {
 
-  /* "netCDF4.pyx":2278
- *         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":2270
- *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
+    /* "netCDF4/_netCDF4.pyx":3212
+ *             data = numpy.empty(datashape, dtype='O')
+ *         else:
+ *             data = numpy.empty(datashape, dtype=self.dtype)             # <<<<<<<<<<<<<<
  * 
- *     def __len__(self):             # <<<<<<<<<<<<<<
- *         # len(L{Dimension} instance) returns current size of dimension
- *         cdef int ierr
+ *         # 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 = 3212; __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 = 3212; __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 = 3212; __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 = 3212; __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 = 3212; __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 = 3212; __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:;
 
-  /* 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":2280
- *         return lengthp
- * 
- *     def group(self):             # <<<<<<<<<<<<<<
- *         """
- * group(self)
+  /* "netCDF4/_netCDF4.pyx":3218
+ *         # 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 = 3218; __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 = 3218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_slice__50);
+  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_slice__50);
+  __Pyx_GIVEREF(__pyx_slice__50);
+  __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; __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;
 
-/* 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":2285
- * 
- * return the group that this L{Dimension} is a member of."""
- *         return self._grp             # <<<<<<<<<<<<<<
- * 
- *     def isunlimited(self):
+  /* "netCDF4/_netCDF4.pyx":3219
+ *         # 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_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_self->_grp);
-  __pyx_r = __pyx_v_self->_grp;
-  goto __pyx_L0;
+  __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 = 3219; __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__51, 0, 1, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __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 = 3219; __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 = 3219; __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 = 3219; __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 = 3219; __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 = 3219; __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 = 3219; __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 = 3219; __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 = 3219; __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":2280
- *         return lengthp
+    /* "netCDF4/_netCDF4.pyx":3220
+ *         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
  * 
- *     def group(self):             # <<<<<<<<<<<<<<
- *         """
- * group(self)
  */
+    __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 = 3220; __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 = 3220; __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 = 3220; __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 = 3220; __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 = 3220; __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 = 3220; __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 = 3220; __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 = 3220; __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 = 3220; __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 = 3220; __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) {
 
-  /* function exit code */
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "netCDF4.pyx":2287
- *         return self._grp
+      /* "netCDF4/_netCDF4.pyx":3221
+ *         for i,n in enumerate(put_ind.shape[:-1]):
+ *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
+ *                 squeeze[i] = 0             # <<<<<<<<<<<<<<
  * 
- *     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":2294
- *         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 = 2294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-
-    /* "netCDF4.pyx":2295
- *         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'))
+ *         # Reshape the arrays so we can iterate over them.
  */
-    __pyx_v_ierr = nc_inq_unlimdims(__pyx_v_self->_grpid, (&__pyx_v_numunlimdims), NULL);
+      if (unlikely(PyObject_SetItem(__pyx_v_squeeze, __pyx_v_i, __pyx_int_0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L8;
+    }
+    __pyx_L8:;
 
-    /* "netCDF4.pyx":2296
- *         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:
+    /* "netCDF4/_netCDF4.pyx":3219
+ *         # 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_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
-    if (__pyx_t_1) {
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-      /* "netCDF4.pyx":2297
- *             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
+  /* "netCDF4/_netCDF4.pyx":3224
+ * 
+ *         # 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_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 = 2297; __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 = 2297; __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 = 2297; __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 = 2297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 3224; __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 = 3224; __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 = 3224; __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 = 3224; __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 = 3224; __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 = 3224; __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 = 3224; __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":2298
- *             if ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *             if numunlimdims == 0:             # <<<<<<<<<<<<<<
- *                 return False
- *             else:
+  /* "netCDF4/_netCDF4.pyx":3225
+ *         # 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_v_numunlimdims == 0) != 0);
-    if (__pyx_t_1) {
-
-      /* "netCDF4.pyx":2299
- *                 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;
+  __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 = 3225; __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 = 3225; __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 = 3225; __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 = 3225; __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);
     }
-    /*else*/ {
-
-      /* "netCDF4.pyx":2301
- *                 return False
- *             else:
- *                 dimid = self._dimid             # <<<<<<<<<<<<<<
- *                 with nogil:
- *                     ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
- */
-      __pyx_t_5 = __pyx_v_self->_dimid;
-      __pyx_v_dimid = __pyx_t_5;
+  }
+  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 = 3225; __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 = 3225; __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 = 3225; __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":2302
- *             else:
- *                 dimid = self._dimid
- *                 with nogil:             # <<<<<<<<<<<<<<
- *                     ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
- *                 if ierr != NC_NOERR:
+  /* "netCDF4/_netCDF4.pyx":3226
+ *         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))
+ * 
  */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
-          #endif
-          /*try:*/ {
+  __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 = 3226; __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 = 3226; __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 = 3226; __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 = 3226; __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 = 3226; __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 = 3226; __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 = 3226; __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":2303
- *                 dimid = self._dimid
- *                 with nogil:
- *                     ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)             # <<<<<<<<<<<<<<
- *                 if ierr != NC_NOERR:
- *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+  /* "netCDF4/_netCDF4.pyx":3227
+ *         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_v_ierr = nc_inq_unlimdims(__pyx_v_self->_grpid, (&__pyx_v_numunlimdims), __pyx_v_unlimdimids);
-          }
+  __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 = 3227; __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 = 3227; __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 = 3227; __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 = 3227; __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 = 3227; __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 = 3227; __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 = 3227; __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":2302
- *             else:
- *                 dimid = self._dimid
- *                 with nogil:             # <<<<<<<<<<<<<<
- *                     ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
- *                 if ierr != NC_NOERR:
+  /* "netCDF4/_netCDF4.pyx":3230
+ * 
+ *         # 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:
  */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L8;
-            }
-            __pyx_L8:;
-          }
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __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 = 3230; __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 = 3230; __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 = 3230; __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 = 3230; __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 = 3230; __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 = 3230; __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 = 3230; __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 = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
       }
-
-      /* "netCDF4.pyx":2304
- *                 with nogil:
- *                     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":2305
- *                     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 = 2305; __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 = 2305; __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 = 2305; __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 = 2305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    } 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 = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
       }
-
-      /* "netCDF4.pyx":2306
- *                 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 = 2306; __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":2307
- *                     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":2308
- *                 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 = 2308; __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 = 2308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    }
+    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 = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-
-      /* "netCDF4.pyx":2309
- *                 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 = 2309; __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 = 2309; __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 = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(item);
+          *(temps[i]) = item;
+        }
+      }
+      #endif
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __pyx_t_7 = (__pyx_t_1 != 0);
-      if (__pyx_t_7) {
-
-        /* "netCDF4.pyx":2310
- *                     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 {
+      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 = 3230; __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;
       }
-      /*else*/ {
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_12), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __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 = 3230; __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":2312
- *                     return True
- *                 else:
- *                     return False             # <<<<<<<<<<<<<<
- *         else: # if not NETCDF4, there is only one unlimited dimension.
- *             # nc_inq_unlimdims only works for NETCDF4.
+    /* "netCDF4/_netCDF4.pyx":3231
+ *         # 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_XDECREF(__pyx_r);
-        __Pyx_INCREF(Py_False);
-        __pyx_r = Py_False;
-        goto __pyx_L0;
+    __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 = 3231; __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;
       }
     }
-  }
-  /*else*/ {
-
-    /* "netCDF4.pyx":2315
- *         else: # if not NETCDF4, there is only one unlimited dimension.
- *             # nc_inq_unlimdims only works for NETCDF4.
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
- *             if self._dimid == xdimid:
- */
-    {
-        #ifdef WITH_THREAD
-        PyThreadState *_save;
-        Py_UNBLOCK_THREADS
-        #endif
-        /*try:*/ {
-
-          /* "netCDF4.pyx":2316
- *             # nc_inq_unlimdims only works for NETCDF4.
- *             with nogil:
- *                 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":2315
- *         else: # if not NETCDF4, there is only one unlimited dimension.
- *             # nc_inq_unlimdims only works for NETCDF4.
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
- *             if self._dimid == xdimid:
- */
-        /*finally:*/ {
-          /*normal exit:*/{
-            #ifdef WITH_THREAD
-            Py_BLOCK_THREADS
-            #endif
-            goto __pyx_L15;
-          }
-          __pyx_L15:;
-        }
+    __pyx_t_4 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; __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 = 3231; __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":2317
- *             with nogil:
- *                 ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
- *             if self._dimid == xdimid:             # <<<<<<<<<<<<<<
- *                 return True
+    /* "netCDF4/_netCDF4.pyx":3232
+ *         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_7 = ((__pyx_v_self->_dimid == __pyx_v_xdimid) != 0);
-    if (__pyx_t_7) {
+    __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 = 3232; __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 = 3232; __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 = 3232; __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 = 3232; __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 = 3232; __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":2318
- *                 ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
- *             if self._dimid == xdimid:
- *                 return True             # <<<<<<<<<<<<<<
+      /* "netCDF4/_netCDF4.pyx":3233
+ *             datout = self._get(a,b,c)
+ *             if not hasattr(datout,'shape') or data.shape == datout.shape:
+ *                 data = datout             # <<<<<<<<<<<<<<
  *             else:
- *                 return False
+ *                 shape = getattr(data[tuple(i)], 'shape', ())
  */
-      __Pyx_XDECREF(__pyx_r);
-      __Pyx_INCREF(Py_True);
-      __pyx_r = Py_True;
-      goto __pyx_L0;
+      __Pyx_INCREF(__pyx_v_datout);
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_v_datout);
+      goto __pyx_L23;
     }
     /*else*/ {
 
-      /* "netCDF4.pyx":2320
- *                 return True
+      /* "netCDF4/_netCDF4.pyx":3235
+ *                 data = datout
  *             else:
- *                 return False             # <<<<<<<<<<<<<<
+ *                 shape = getattr(data[tuple(i)], 'shape', ())             # <<<<<<<<<<<<<<
+ *                 data[tuple(i)] = datout.reshape(shape)
  * 
- * cdef class Variable:
  */
-      __Pyx_XDECREF(__pyx_r);
-      __Pyx_INCREF(Py_False);
-      __pyx_r = Py_False;
-      goto __pyx_L0;
-    }
-  }
+      __pyx_t_4 = PySequence_Tuple(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __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 = 3235; __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 = 3235; __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":2287
- *         return self._grp
+      /* "netCDF4/_netCDF4.pyx":3236
+ *             else:
+ *                 shape = getattr(data[tuple(i)], 'shape', ())
+ *                 data[tuple(i)] = datout.reshape(shape)             # <<<<<<<<<<<<<<
  * 
- *     def isunlimited(self):             # <<<<<<<<<<<<<<
- *         """
- * isunlimited(self)
+ *         # 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 = 3236; __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 = 3236; __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 = 3236; __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 = 3236; __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 = 3236; __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 = 3236; __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:;
 
-  /* 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":2207
- * 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
+    /* "netCDF4/_netCDF4.pyx":3230
  * 
+ *         # 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;
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":3239
+ * 
+ *         # 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 = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_14 = (__pyx_t_9 != 0);
+  if (__pyx_t_14) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":3240
+ *         # 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 array 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 = 3240; __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 = 3240; __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:;
 
-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 = 2207; __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/_netCDF4.pyx":3241
+ *         if hasattr(data,'shape'):
+ *             data = data[tuple(squeeze)]
+ *         if hasattr(data,'ndim') and self.ndim == 0:             # <<<<<<<<<<<<<<
+ *             # Make sure a numpy scalar array 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 = 3241; __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 = 3241; __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 = 3241; __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) {
 
-  /* 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;
-}
+    /* "netCDF4/_netCDF4.pyx":3244
+ *             # Make sure a numpy scalar array is returned instead of a 1-d array of
+ *             # length 1.
+ *             if data.ndim != 0: data = numpy.asarray(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 = 3244; __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 = 3244; __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 = 3244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_14) {
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __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_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __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_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_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __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[0]; __pyx_lineno = 3244; __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_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; __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_7); __pyx_t_7 = 0;
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_1);
+      __pyx_t_1 = 0;
+      goto __pyx_L30;
+    }
+    __pyx_L30:;
+    goto __pyx_L27;
+  }
+  __pyx_L27:;
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":3254
+ *         # 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:*/ {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":3255
+ *         # 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 = 3255; __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 = 3255; __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 = 3255; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        goto __pyx_L39;
+      }
+      __pyx_L39:;
 
-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 = 2207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_dimid = __pyx_t_1;
+      /* "netCDF4/_netCDF4.pyx":3256
+ *         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 = 3256; __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 = 3256; __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 = 3256; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        goto __pyx_L40;
+      }
+      __pyx_L40:;
 
-  /* 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;
-}
+      /* "netCDF4/_netCDF4.pyx":3257
+ *             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_2); __pyx_t_2 = 0;
+    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":3258
+ *             if hasattr(self,'add_offset'): float(self.add_offset)
+ *             valid_scaleoffset = True
+ *         except:             # <<<<<<<<<<<<<<
+ *             valid_scaleoffset = False
+ *             if self.scale:
+ */
+    /*except:*/ {
+      __Pyx_AddTraceback("netCDF4._netCDF4.Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3258; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(__pyx_t_7);
+      __Pyx_GOTREF(__pyx_t_3);
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":3259
+ *             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;
 
-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 = 2207; __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/_netCDF4.pyx":3260
+ *         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 = 3260; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+      if (__pyx_t_14) {
 
-  /* 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;
-}
+        /* "netCDF4/_netCDF4.pyx":3261
+ *             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;
 
-/* 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));
+        /* "netCDF4/_netCDF4.pyx":3262
+ *             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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3262; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warn); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3262; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = NULL;
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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_v_msg); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3262; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+        } else {
+          __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3262; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+          __Pyx_INCREF(__pyx_v_msg);
+          PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_msg);
+          __Pyx_GIVEREF(__pyx_v_msg);
+          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3262; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        goto __pyx_L43;
+      }
+      __pyx_L43:;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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:;
+  }
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":3263
+ *                 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 = 3263; __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 = 3263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_14 = __pyx_t_11;
+  __pyx_L45_bool_binop_done:;
+  if (__pyx_t_14) {
 
-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 = 2207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_grpid = __pyx_t_1;
+    /* "netCDF4/_netCDF4.pyx":3264
+ *                 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_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toma); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3264; __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_v_data); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 3264; __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 = NULL;
+      __Pyx_INCREF(__pyx_v_data);
+      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_data);
+      __Pyx_GIVEREF(__pyx_v_data);
+      __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 = 3264; __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_DECREF_SET(__pyx_v_data, __pyx_t_3);
+    __pyx_t_3 = 0;
+    goto __pyx_L44;
+  }
+  __pyx_L44:;
 
-  /* 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/_netCDF4.pyx":3265
+ *         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 = 3265; __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 = 3265; __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":2208
- * 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):
+    /* "netCDF4/_netCDF4.pyx":3267
+ *         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 = 3267; __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 = 3267; __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;
+    }
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":3268
+ *             # 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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_float_0_0, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    if (!__pyx_t_11) {
+    } else {
+      __pyx_t_14 = __pyx_t_11;
+      goto __pyx_L52_bool_binop_done;
+    }
+    __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 = 3268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_float_1_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_14 = __pyx_t_11;
+    __pyx_L52_bool_binop_done:;
+    if (__pyx_t_14) {
 
-  /* 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;
-}
+      /* "netCDF4/_netCDF4.pyx":3269
+ *             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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_7 = PyNumber_Multiply(__pyx_v_data, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; __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_add_offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_4 = PyNumber_Add(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; __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_3); __pyx_t_3 = 0;
+      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_4);
+      __pyx_t_4 = 0;
+      goto __pyx_L51;
+    }
 
-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;
+    /* "netCDF4/_netCDF4.pyx":3271
+ *                 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 = 3271; __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_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 = 3271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_float_1_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_14 = __pyx_t_9;
+    __pyx_L56_bool_binop_done:;
+    if (__pyx_t_14) {
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":3272
+ *             # 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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); 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_t_4 = PyNumber_Multiply(__pyx_v_data, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3272; __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_data, __pyx_t_4);
+      __pyx_t_4 = 0;
+      goto __pyx_L51;
+    }
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":3274
+ *                 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 = 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 = 3274; __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_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 = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_float_0_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __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[0]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_14 = __pyx_t_11;
+    __pyx_L58_bool_binop_done:;
+    if (__pyx_t_14) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":3275
+ *             # else if variable has only add_offset attributes, rescale.
+ *             elif hasattr(self, 'add_offset') and self.add_offset != 0.0:
+ *                 data = data + self.add_offset             # <<<<<<<<<<<<<<
+ *         return data
+ * 
+ */
+      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_4 = PyNumber_Add(__pyx_v_data, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3275; __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_data, __pyx_t_4);
+      __pyx_t_4 = 0;
+      goto __pyx_L51;
+    }
+    __pyx_L51:;
+    goto __pyx_L47;
+  }
+  __pyx_L47:;
 
-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);
+  /* "netCDF4/_netCDF4.pyx":3276
+ *             elif hasattr(self, 'add_offset') and self.add_offset != 0.0:
+ *                 data = data + self.add_offset
+ *         return data             # <<<<<<<<<<<<<<
+ * 
+ *     def _toma(self,data):
+ */
   __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_self->_name);
-  __pyx_r = __pyx_v_self->_name;
+  __Pyx_INCREF(__pyx_v_data);
+  __pyx_r = __pyx_v_data;
   goto __pyx_L0;
 
+  /* "netCDF4/_netCDF4.pyx":3201
+ *             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._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;
 }
 
-/* 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;
-}
+/* "netCDF4/_netCDF4.pyx":3278
+ *         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_9Dimension_4_grp_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_7netCDF4_9Dimension_4_grp_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_45_toma(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_45_toma(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
   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));
+  __Pyx_RefNannySetupContext("_toma (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_44_toma(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_data));
 
   /* 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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_44_toma(struct __pyx_obj_7netCDF4_8_netCDF4_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
-  __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":2457
- *     _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;
+  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;
-  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);
+  __Pyx_RefNannySetupContext("_toma", 0);
+  __Pyx_INCREF(__pyx_v_data);
 
-    /* "netCDF4.pyx":2458
- * 
- *     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):
+  /* "netCDF4/_netCDF4.pyx":3282
+ *         # 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'):
  */
-    values[6] = ((PyObject *)Py_True);
-    values[7] = ((PyObject *)Py_False);
-    values[8] = ((PyObject *)Py_False);
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3282; __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 = 3282; __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 = 3282; __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 = 3282; __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 = 3282; __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 = 3282; __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 = 3282; __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":2459
- *     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, _grpid
+  /* "netCDF4/_netCDF4.pyx":3283
+ *         # 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)
  */
-    values[9] = ((PyObject *)Py_None);
-    values[10] = ((PyObject *)__pyx_n_s_native);
-    values[11] = ((PyObject *)Py_None);
+  __Pyx_INCREF(Py_None);
+  __pyx_v_fill_value = Py_None;
 
-    /* "netCDF4.pyx":2460
- *             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, _grpid
- *         cdef char *varname
+  /* "netCDF4/_netCDF4.pyx":3284
+ *         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\
  */
-    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 = 2457; __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 = 2457; __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 = 2457; __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_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 = 3284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = (__pyx_t_8 != 0);
+  if (__pyx_t_9) {
+
+    /* "netCDF4/_netCDF4.pyx":3285
+ *         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 = 3285; __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 = 3285; __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 = 3285; __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_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 = 2457; __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":2457
- *     _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":2469
- *         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 = 2469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = ((!__pyx_t_1) != 0);
-  if (__pyx_t_2) {
-
-    /* "netCDF4.pyx":2470
- *         # 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":2474
- *         # 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 = 2474; __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 = 2474; __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 = 2474; __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 = 2474; __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 = 2474; __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 = 2474; __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":2475
- *         # 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 = 2475; __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_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3285; __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;
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
-
-  /* "netCDF4.pyx":2476
- *         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 = 2476; __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 = 2476; __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":2479
- *         # 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 = 2479; __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 = 2479; __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_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3285; __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":2480
- *         # keep strong reference the default behaviour (issue 251)
- *         if grp.keepweakref:
- *             self._grp = weakref.proxy(grp)             # <<<<<<<<<<<<<<
- *         else:
- *             self._grp = grp
+    /* "netCDF4/_netCDF4.pyx":3286
+ *         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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2480; __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 = 2480; __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_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 = 3286; __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_6, function);
+        __Pyx_DECREF_SET(__pyx_t_7, 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 = 2480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+    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 = 3286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     } else {
-      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2480; __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 = 2480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __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":2482
- *             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":2484
- *             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":2485
- *         # 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":2486
- *         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 = 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;
-  if (__pyx_t_1) {
-  } else {
-    __pyx_t_2 = __pyx_t_1;
-    goto __pyx_L10_bool_binop_done;
-  }
-
-  /* "netCDF4.pyx":2487
- *             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 = 2487; __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 = 2487; __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 = 2487; __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 = 2487; __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) {
+    __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 = 3286; __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 = 3286; __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 = 3286; __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":2488
- *             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
+    /* "netCDF4/_netCDF4.pyx":3287
+ *             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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2488; __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 = 2488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3287; __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)) {
+    __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_6);
+        __Pyx_INCREF(__pyx_t_2);
         __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 = 2488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
+    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 = 3287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     } else {
-      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2488; __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 = 2488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
+    __Pyx_GOTREF(__pyx_t_1);
     __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:;
+    __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 = 3287; __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 = 3287; __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 = 3287; __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":2491
- *         # 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')):
+      /* "netCDF4/_netCDF4.pyx":3288
+ *             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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2491; __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 = 2491; __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 = 2491; __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;
-  }
+      __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 = 3288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3288; __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":2492
- *         # 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
+    /* "netCDF4/_netCDF4.pyx":3289
+ *                (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_datatype, __pyx_n_s_kind); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2492; __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 = 2492; __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 = 2492; __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 = 2492; __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 = 2492; __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:;
+    __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 = 3289; __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 = 3289; __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 = 3289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_9) {
 
-  /* "netCDF4.pyx":2493
- *         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.
+      /* "netCDF4/_netCDF4.pyx":3290
+ *                 mval.byteswap(True)
+ *             if mval.shape == (): # mval a scalar.
+ *                 hasmval = data==mval             # <<<<<<<<<<<<<<
+ *                 # is scalar missing value a NaN?
+ *                 try:
  */
-  __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 = 2493; __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 = 2493; __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) {
+      __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 = 3290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_hasmval = __pyx_t_1;
+      __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":2494
- *             ((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)
+      /* "netCDF4/_netCDF4.pyx":3292
+ *                 hasmval = data==mval
+ *                 # is scalar missing value a NaN?
+ *                 try:             # <<<<<<<<<<<<<<
+ *                     mvalisnan = numpy.isnan(mval)
+ *                 except TypeError: # isnan fails on some dtypes (issue 206)
  */
-    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
-    __Pyx_DECREF_SET(__pyx_v_datatype, ((PyObject *)((PyObject*)(&PyString_Type))));
-    goto __pyx_L14;
-  }
-  __pyx_L14:;
-
-  /* "netCDF4.pyx":2496
- *             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 = 2496; __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":2497
- * 	# 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__52, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2497; __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":2498
- *         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__35, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2498; __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":2499
- *         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__34, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; __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:;
+      {
+        __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":2500
- *         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:
- *             if dtype_endian == 'native' and endian == sys.byteorder:
+          /* "netCDF4/_netCDF4.pyx":3293
+ *                 # is scalar missing value a NaN?
+ *                 try:
+ *                     mvalisnan = numpy.isnan(mval)             # <<<<<<<<<<<<<<
+ *                 except TypeError: # isnan fails on some dtypes (issue 206)
+ *                     mvalisnan = False
  */
-  __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 = 2500; __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:;
+          __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3293; __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 = 3293; __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 = 3293; __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 = 3293; __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 = 3293; __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":2501
- *         if dtype_endian == '<': dtype_endian='little'
- *         if dtype_endian == '|': dtype_endian=None
- *         if dtype_endian is not None and dtype_endian != endian:             # <<<<<<<<<<<<<<
- *             if dtype_endian == 'native' and endian == sys.byteorder:
- *                 pass
+        /* "netCDF4/_netCDF4.pyx":3294
+ *                 try:
+ *                     mvalisnan = numpy.isnan(mval)
+ *                 except TypeError: # isnan fails on some dtypes (issue 206)             # <<<<<<<<<<<<<<
+ *                     mvalisnan = False
+ *             else: # mval a vector.
  */
-  __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 = 2501; __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 = 2501; __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) {
+        __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
+        if (__pyx_t_13) {
+          __Pyx_AddTraceback("netCDF4._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 = 3294; __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":2502
- *         if dtype_endian == '|': dtype_endian=None
- *         if dtype_endian is not None and dtype_endian != endian:
- *             if dtype_endian == 'native' and endian == sys.byteorder:             # <<<<<<<<<<<<<<
- *                 pass
- *             else:
+          /* "netCDF4/_netCDF4.pyx":3295
+ *                     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_t_1 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_n_s_native, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_1) {
-    } else {
-      __pyx_t_2 = __pyx_t_1;
-      goto __pyx_L27_bool_binop_done;
-    }
-    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_3 = PyObject_RichCompare(__pyx_v_endian, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2502; __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) {
-      goto __pyx_L26;
+          __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":2506
- *             else:
- *                 # 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":2508
- *                 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.
+      /* "netCDF4/_netCDF4.pyx":3297
+ *                     mvalisnan = False
+ *             else: # mval a vector.
+ *                 hasmval = numpy.zeros(data.shape, numpy.bool)             # <<<<<<<<<<<<<<
+ *                 for m in mval:
+ *                     m =  numpy.array(m)
  */
-      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_warnings); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3297; __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 = 3297; __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 = 3297; __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 = 3297; __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 = 2508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 3297; __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);
+      __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_5);
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
           __Pyx_INCREF(__pyx_t_7);
           __Pyx_INCREF(function);
-          __Pyx_DECREF_SET(__pyx_t_5, function);
+          __Pyx_DECREF_SET(__pyx_t_1, function);
+          __pyx_t_6 = 1;
         }
       }
-      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 = 2508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3297; __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 = 3297; __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/_netCDF4.pyx":3298
+ *             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 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2508; __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 = 2508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_mval); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_14 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    }
-    __pyx_L26:;
-    goto __pyx_L23;
-  }
-  __pyx_L23:;
+      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 = 3298; __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 = 3298; __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 = 3298; __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 = 3298; __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 = 3298; __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":2511
- *                 #endian = dtype_endian # dtype prevails
- *         # check validity of datatype.
- *         self._isprimitive = False             # <<<<<<<<<<<<<<
- *         self._iscompound = False
- *         self._isvlen = False
+        /* "netCDF4/_netCDF4.pyx":3299
+ *                 hasmval = numpy.zeros(data.shape, numpy.bool)
+ *                 for m in mval:
+ *                     m =  numpy.array(m)             # <<<<<<<<<<<<<<
+ *                     hasmval += data == m
+ *             if mval.shape == () and mvalisnan:
  */
-  __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;
+        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3299; __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 = 3299; __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 = 3299; __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 = 3299; __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 = 3299; __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":2512
- *         # check validity of datatype.
- *         self._isprimitive = False
- *         self._iscompound = False             # <<<<<<<<<<<<<<
- *         self._isvlen = False
- *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
+        /* "netCDF4/_netCDF4.pyx":3300
+ *                 for m in mval:
+ *                     m =  numpy.array(m)
+ *                     hasmval += data == m             # <<<<<<<<<<<<<<
+ *             if mval.shape == () and mvalisnan:
+ *                 mask = numpy.isnan(data)
  */
-  __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;
+        __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 = 3300; __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 = 3300; __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":2513
- *         self._isprimitive = False
- *         self._iscompound = False
- *         self._isvlen = False             # <<<<<<<<<<<<<<
- *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
- *                       or datatype == str:
+        /* "netCDF4/_netCDF4.pyx":3298
+ *             else: # mval a vector.
+ *                 hasmval = numpy.zeros(data.shape, numpy.bool)
+ *                 for m in mval:             # <<<<<<<<<<<<<<
+ *                     m =  numpy.array(m)
+ *                     hasmval += data == m
  */
-  __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;
+      }
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    }
+    __pyx_L9:;
 
-  /* "netCDF4.pyx":2514
- *         self._iscompound = False
- *         self._isvlen = False
- *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\             # <<<<<<<<<<<<<<
- *                       or datatype == str:
- *             if isinstance(datatype, CompoundType):
+    /* "netCDF4/_netCDF4.pyx":3301
+ *                     m =  numpy.array(m)
+ *                     hasmval += data == m
+ *             if mval.shape == () and mvalisnan:             # <<<<<<<<<<<<<<
+ *                 mask = numpy.isnan(data)
+ *             elif hasmval.any():
  */
-  __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_L30_bool_binop_done;
-  }
+    __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 = 3301; __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 = 3301; __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 = 3301; __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 = 3301; __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 = 3301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __pyx_t_8;
+    __pyx_L23_bool_binop_done:;
+    if (__pyx_t_9) {
 
-  /* "netCDF4.pyx":2515
- *         self._isvlen = False
- *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
- *                       or datatype == str:             # <<<<<<<<<<<<<<
- *             if isinstance(datatype, CompoundType):
- *                self._iscompound = True
+      /* "netCDF4/_netCDF4.pyx":3302
+ *                     hasmval += data == m
+ *             if mval.shape == () and mvalisnan:
+ *                 mask = numpy.isnan(data)             # <<<<<<<<<<<<<<
+ *             elif hasmval.any():
+ *                 mask = hasmval
  */
-  __pyx_t_8 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_VLType)); 
+      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; __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 = 3302; __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 = 3302; __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 = 3302; __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 = 3302; __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":2514
- *         self._iscompound = False
- *         self._isvlen = False
- *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\             # <<<<<<<<<<<<<<
- *                       or datatype == str:
- *             if isinstance(datatype, CompoundType):
+    /* "netCDF4/_netCDF4.pyx":3303
+ *             if mval.shape == () and mvalisnan:
+ *                 mask = numpy.isnan(data)
+ *             elif hasmval.any():             # <<<<<<<<<<<<<<
+ *                 mask = hasmval
+ *             else:
  */
-  __pyx_t_1 = (__pyx_t_8 != 0);
-  if (!__pyx_t_1) {
-  } else {
-    __pyx_t_2 = __pyx_t_1;
-    goto __pyx_L30_bool_binop_done;
-  }
+    __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 = 3303; __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 = 3303; __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 = 3303; __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 = 3303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (__pyx_t_9) {
 
-  /* "netCDF4.pyx":2515
- *         self._isvlen = False
- *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
- *                       or datatype == str:             # <<<<<<<<<<<<<<
- *             if isinstance(datatype, CompoundType):
- *                self._iscompound = True
+      /* "netCDF4/_netCDF4.pyx":3304
+ *                 mask = numpy.isnan(data)
+ *             elif hasmval.any():
+ *                 mask = hasmval             # <<<<<<<<<<<<<<
+ *             else:
+ *                 mask = None
  */
-  __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 = 2515; __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 = 2515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_2 = __pyx_t_1;
-  __pyx_L30_bool_binop_done:;
-  if (__pyx_t_2) {
+      __Pyx_INCREF(__pyx_v_hasmval);
+      __pyx_v_mask = __pyx_v_hasmval;
+      goto __pyx_L22;
+    }
+    /*else*/ {
 
-    /* "netCDF4.pyx":2516
- *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
- *                       or datatype == str:
- *             if isinstance(datatype, CompoundType):             # <<<<<<<<<<<<<<
- *                self._iscompound = True
- *                self._cmptype = datatype
+      /* "netCDF4/_netCDF4.pyx":3306
+ *                 mask = hasmval
+ *             else:
+ *                 mask = None             # <<<<<<<<<<<<<<
+ *             if mask is not None:
+ *                 fill_value = mval
  */
-    __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_CompoundType)); 
-    __pyx_t_1 = (__pyx_t_2 != 0);
-    if (__pyx_t_1) {
+      __Pyx_INCREF(Py_None);
+      __pyx_v_mask = Py_None;
+    }
+    __pyx_L22:;
 
-      /* "netCDF4.pyx":2517
- *                       or datatype == str:
- *             if isinstance(datatype, CompoundType):
- *                self._iscompound = True             # <<<<<<<<<<<<<<
- *                self._cmptype = datatype
- *             if isinstance(datatype, VLType) or datatype==str:
+    /* "netCDF4/_netCDF4.pyx":3307
+ *             else:
+ *                 mask = None
+ *             if mask is not None:             # <<<<<<<<<<<<<<
+ *                 fill_value = mval
+ *                 totalmask += mask
  */
-      __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;
+    __pyx_t_9 = (__pyx_v_mask != Py_None);
+    __pyx_t_8 = (__pyx_t_9 != 0);
+    if (__pyx_t_8) {
 
-      /* "netCDF4.pyx":2518
- *             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_L33;
+      /* "netCDF4/_netCDF4.pyx":3308
+ *                 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/_netCDF4.pyx":3309
+ *             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 = 3309; __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_L33:;
+    __pyx_L25:;
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
 
-    /* "netCDF4.pyx":2519
- *                self._iscompound = True
- *                self._cmptype = datatype
- *             if isinstance(datatype, VLType) or datatype==str:             # <<<<<<<<<<<<<<
- *                self._isvlen = True
- *                self._vltype = datatype
+  /* "netCDF4/_netCDF4.pyx":3310
+ *                 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_2 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_VLType)); 
-    __pyx_t_8 = (__pyx_t_2 != 0);
+  __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 = 3310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_9 = (__pyx_t_8 != 0);
+  if (__pyx_t_9) {
+
+    /* "netCDF4/_netCDF4.pyx":3311
+ *                 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 = 3311; __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 = 3311; __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 = 3311; __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 = 3311; __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 = 3311; __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/_netCDF4.pyx":3314
+ *             # 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 = 3314; __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 = 3314; __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 = 3314; __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 = 3314; __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_1 = __pyx_t_8;
-      goto __pyx_L35_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 = 2519; __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 = 2519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_1 = __pyx_t_8;
-    __pyx_L35_bool_binop_done:;
-    if (__pyx_t_1) {
+    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3314; __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 = 3314; __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":2520
- *                self._cmptype = datatype
- *             if isinstance(datatype, VLType) or datatype==str:
- *                self._isvlen = True             # <<<<<<<<<<<<<<
- *                self._vltype = datatype
- *             if datatype==str:
+    /* "netCDF4/_netCDF4.pyx":3315
+ *             # 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_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;
+    __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 = 3315; __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 = 3315; __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 = 3315; __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 = 3315; __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 = 3315; __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 = 3315; __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":2521
- *             if isinstance(datatype, VLType) or datatype==str:
- *                self._isvlen = True
- *                self._vltype = datatype             # <<<<<<<<<<<<<<
- *             if datatype==str:
- *                 if grp.data_model != 'NETCDF4':
+      /* "netCDF4/_netCDF4.pyx":3316
+ *             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_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_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fval, __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3316; __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_L34:;
+    __pyx_L27:;
 
-    /* "netCDF4.pyx":2522
- *                self._isvlen = True
- *                self._vltype = datatype
- *             if datatype==str:             # <<<<<<<<<<<<<<
- *                 if grp.data_model != 'NETCDF4':
- *                     raise ValueError(
+    /* "netCDF4/_netCDF4.pyx":3318
+ *                 fval.byteswap(True)
+ *             # is _FillValue a NaN?
+ *             try:             # <<<<<<<<<<<<<<
+ *                 fvalisnan = numpy.isnan(fval)
+ *             except: # isnan fails on some dtypes (issue 202)
  */
-    __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 = 2522; __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 = 2522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    if (__pyx_t_1) {
+    {
+      __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":2523
- *                self._vltype = datatype
- *             if datatype==str:
- *                 if grp.data_model != 'NETCDF4':             # <<<<<<<<<<<<<<
- *                     raise ValueError(
- *                         'Variable length strings are only supported for the '
+        /* "netCDF4/_netCDF4.pyx":3319
+ *             # is _FillValue a NaN?
+ *             try:
+ *                 fvalisnan = numpy.isnan(fval)             # <<<<<<<<<<<<<<
+ *             except: # isnan fails on some dtypes (issue 202)
+ *                 fvalisnan = False
  */
-      __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 = 2523; __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 = 2523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      if (__pyx_t_1) {
+        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3319; __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 = 3319; __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 = 3319; __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 = 3319; __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 = 3319; __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":2524
- *             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/_netCDF4.pyx":3320
+ *             try:
+ *                 fvalisnan = numpy.isnan(fval)
+ *             except: # isnan fails on some dtypes (issue 202)             # <<<<<<<<<<<<<<
+ *                 fvalisnan = False
+ *             if fvalisnan:
  */
-        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __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 = 2524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      /*except:*/ {
+        __Pyx_AddTraceback("netCDF4._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 = 3320; __pyx_clineno = __LINE__; goto __pyx_L34_except_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_GOTREF(__pyx_t_1);
+
+        /* "netCDF4/_netCDF4.pyx":3321
+ *                 fvalisnan = numpy.isnan(fval)
+ *             except: # 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;
       }
+      __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":2529
- *                         '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
+    /* "netCDF4/_netCDF4.pyx":3322
+ *             except: # isnan fails on some dtypes (issue 202)
+ *                 fvalisnan = False
+ *             if fvalisnan:             # <<<<<<<<<<<<<<
+ *                 mask = numpy.isnan(data)
+ *             elif (data == fval).any():
  */
-      __pyx_t_3 = PyTuple_New(3); 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_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 = 2529; __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;
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_fvalisnan); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_9) {
 
-      /* "netCDF4.pyx":2530
- *                         '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.
+      /* "netCDF4/_netCDF4.pyx":3323
+ *                 fvalisnan = False
+ *             if fvalisnan:
+ *                 mask = numpy.isnan(data)             # <<<<<<<<<<<<<<
+ *             elif (data == fval).any():
+ *                 mask = data==fval
  */
-      __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_L37;
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3323; __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 = 3323; __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 = 3323; __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 = 3323; __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 = 3323; __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;
     }
-    __pyx_L37:;
 
-    /* "netCDF4.pyx":2531
- *                 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
+    /* "netCDF4/_netCDF4.pyx":3324
+ *             if fvalisnan:
+ *                 mask = numpy.isnan(data)
+ *             elif (data == fval).any():             # <<<<<<<<<<<<<<
+ *                 mask = data==fval
+ *             else:
  */
-    __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 = 2531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3324; __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 = 3324; __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 = 2531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3324; __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 = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    __pyx_v_xtype = __pyx_t_9;
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_9) {
 
-    /* "netCDF4.pyx":2533
- *             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
+      /* "netCDF4/_netCDF4.pyx":3325
+ *                 mask = numpy.isnan(data)
+ *             elif (data == fval).any():
+ *                 mask = data==fval             # <<<<<<<<<<<<<<
+ *             else:
+ *                 mask = None
  */
-    __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 = 2533; __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_L29;
-  }
+      __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 = 3325; __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":2534
- *             # 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
+      /* "netCDF4/_netCDF4.pyx":3327
+ *                 mask = data==fval
+ *             else:
+ *                 mask = None             # <<<<<<<<<<<<<<
+ *             if mask is not None:
+ *                 if fill_value is None:
  */
-  __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 = 2534; __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__55, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2534; __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 = 2534; __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 = 2534; __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) {
+      __Pyx_INCREF(Py_None);
+      __Pyx_XDECREF_SET(__pyx_v_mask, Py_None);
+    }
+    __pyx_L42:;
 
-    /* "netCDF4.pyx":2535
- *             self.dtype = datatype.dtype
- *         elif datatype.str[1:] in _supportedtypes:
- *             self._isprimitive = True             # <<<<<<<<<<<<<<
- *             # find netCDF primitive data type corresponding to
- *             # specified numpy data type.
+    /* "netCDF4/_netCDF4.pyx":3328
+ *             else:
+ *                 mask = None
+ *             if mask is not None:             # <<<<<<<<<<<<<<
+ *                 if fill_value is None:
+ *                     fill_value = fval
  */
-    __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;
+    __pyx_t_9 = (__pyx_v_mask != Py_None);
+    __pyx_t_8 = (__pyx_t_9 != 0);
+    if (__pyx_t_8) {
 
-    /* "netCDF4.pyx":2538
- *             # 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
+      /* "netCDF4/_netCDF4.pyx":3329
+ *                 mask = None
+ *             if mask is not None:
+ *                 if fill_value is None:             # <<<<<<<<<<<<<<
+ *                     fill_value = fval
+ *                 totalmask += mask
  */
-    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2538; __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 = 2538; __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__56, 1, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2538; __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 = 2538; __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 = 2538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_v_xtype = __pyx_t_9;
+      __pyx_t_8 = (__pyx_v_fill_value == Py_None);
+      __pyx_t_9 = (__pyx_t_8 != 0);
+      if (__pyx_t_9) {
 
-    /* "netCDF4.pyx":2540
- *             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))
+        /* "netCDF4/_netCDF4.pyx":3330
+ *             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_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_L29;
+        __Pyx_INCREF(__pyx_v_fval);
+        __Pyx_DECREF_SET(__pyx_v_fill_value, __pyx_v_fval);
+        goto __pyx_L44;
+      }
+      __pyx_L44:;
+
+      /* "netCDF4/_netCDF4.pyx":3331
+ *                 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 = 3331; __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":2542
- *             self.dtype = datatype
+    /* "netCDF4/_netCDF4.pyx":3335
+ *         # is disabled.
  *         else:
- *             raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype))             # <<<<<<<<<<<<<<
- *         if 'id' in kwargs:
- *             self._varid = kwargs['id']
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
+ *             if ierr != NC_NOERR:
  */
-    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2542; __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 = 2542; __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 = 2542; __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 = 2542; __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 = 2542; __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 = 2542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L29:;
+    {
+        #ifdef WITH_THREAD
+        PyThreadState *_save;
+        Py_UNBLOCK_THREADS
+        #endif
+        /*try:*/ {
 
-  /* "netCDF4.pyx":2543
- *         else:
- *             raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype))
- *         if 'id' in kwargs:             # <<<<<<<<<<<<<<
- *             self._varid = kwargs['id']
+          /* "netCDF4/_netCDF4.pyx":3336
  *         else:
+ *             with nogil:
+ *                 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_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 = 2543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_1 = (__pyx_t_8 != 0);
-  if (__pyx_t_1) {
+          __pyx_v_ierr = nc_inq_var_fill(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_no_fill), NULL);
+        }
 
-    /* "netCDF4.pyx":2544
- *             raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype))
- *         if 'id' in kwargs:
- *             self._varid = kwargs['id']             # <<<<<<<<<<<<<<
+        /* "netCDF4/_netCDF4.pyx":3335
+ *         # is disabled.
  *         else:
- *             bytestr = _strencode(name)
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
+ *             if ierr != NC_NOERR:
  */
-    __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 = 2544; __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 = 2544; __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_L39;
-  }
-  /*else*/ {
+        /*finally:*/ {
+          /*normal exit:*/{
+            #ifdef WITH_THREAD
+            Py_BLOCK_THREADS
+            #endif
+            goto __pyx_L47;
+          }
+          __pyx_L47:;
+        }
+    }
 
-    /* "netCDF4.pyx":2546
- *             self._varid = kwargs['id']
- *         else:
- *             bytestr = _strencode(name)             # <<<<<<<<<<<<<<
- *             varname = bytestr
- *             ndims = len(dimensions)
+    /* "netCDF4/_netCDF4.pyx":3337
+ *             with nogil:
+ *                 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_3 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_v_bytestr = __pyx_t_3;
-    __pyx_t_3 = 0;
+    __pyx_t_9 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_9) {
 
-    /* "netCDF4.pyx":2547
- *         else:
- *             bytestr = _strencode(name)
- *             varname = bytestr             # <<<<<<<<<<<<<<
- *             ndims = len(dimensions)
- *             # find dimension ids.
+      /* "netCDF4/_netCDF4.pyx":3338
+ *                 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_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_varname = __pyx_t_10;
+      __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 = 3338; __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 = 3338; __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 = 3338; __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 = 3338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-    /* "netCDF4.pyx":2548
- *             bytestr = _strencode(name)
- *             varname = bytestr
- *             ndims = len(dimensions)             # <<<<<<<<<<<<<<
- *             # find dimension ids.
- *             if ndims:
+    /* "netCDF4/_netCDF4.pyx":3351
+ *             # 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_11 = PyObject_Length(__pyx_v_dimensions); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_ndims = __pyx_t_11;
+    __pyx_t_8 = ((__pyx_v_no_fill != 1) != 0);
+    if (__pyx_t_8) {
+    } else {
+      __pyx_t_9 = __pyx_t_8;
+      goto __pyx_L50_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 = 3351; __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__54, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3351; __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 = 3351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__pyx_t_16) {
+    } else {
+      __pyx_t_8 = __pyx_t_16;
+      goto __pyx_L52_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 = 3351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = __pyx_t_16;
+    __pyx_L52_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_L50_bool_binop_done:;
+    if (__pyx_t_9) {
 
-    /* "netCDF4.pyx":2550
- *             ndims = len(dimensions)
- *             # find dimension ids.
- *             if ndims:             # <<<<<<<<<<<<<<
- *                 for n from 0 <= n < ndims:
- *                     dimname = dimensions[n]
+      /* "netCDF4/_netCDF4.pyx":3352
+ *             # 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_v_ndims != 0);
-    if (__pyx_t_1) {
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __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 = 3352; __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 = 3352; __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 = 3352; __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__55, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __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 = 3352; __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 = 3352; __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 = 3352; __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":2551
- *             # find dimension ids.
- *             if ndims:
- *                 for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
- *                     dimname = dimensions[n]
- *                     # look for dimension in this group, and if not
+      /* "netCDF4/_netCDF4.pyx":3355
+ *                 # 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_4 = __pyx_v_ndims;
-      for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {
+      __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 = 3355; __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 = 3355; __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 = 3355; __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 = 3355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      if (!__pyx_t_16) {
+        goto __pyx_L56_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 = 3355; __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 = 3355; __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_L55_bool_binop_done;
+      }
+      __pyx_L56_next_or:;
 
-        /* "netCDF4.pyx":2552
- *             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).
+      /* "netCDF4/_netCDF4.pyx":3356
+ *                 # 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_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 = 2552; __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;
+      __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 = 3356; __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 = 3356; __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 = 3356; __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 = 3356; __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_L55_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 = 3356; __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 = 3356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __pyx_t_9 = __pyx_t_16;
+      __pyx_L55_bool_binop_done:;
+      if (__pyx_t_9) {
 
-        /* "netCDF4.pyx":2555
- *                     # 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))
+        /* "netCDF4/_netCDF4.pyx":3357
+ *                 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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); 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_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fillval, __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3357; __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_L54;
+      }
+      __pyx_L54:;
+
+      /* "netCDF4/_netCDF4.pyx":3358
+ *                    (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 = 3358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_has_fillval = __pyx_t_2;
+      __pyx_t_2 = 0;
+
+      /* "netCDF4/_netCDF4.pyx":3361
+ *                 # 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 = 3361; __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 = 3361; __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 = 3361; __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 = 3361; __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;
-        __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 (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_6);
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
             __Pyx_INCREF(__pyx_t_5);
             __Pyx_INCREF(function);
-            __Pyx_DECREF_SET(__pyx_t_6, function);
-            __pyx_t_11 = 1;
+            __Pyx_DECREF_SET(__pyx_t_1, function);
           }
         }
-        __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2555; __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 = 2555; __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":2556
- *                     # 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":2557
- *                     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 = 2557; __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 = 2557; __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 = 2557; __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 = 2557; __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 = 2557; __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 = 2557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        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 = 3361; __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 = 3361; __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 = 3361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
         }
-
-        /* "netCDF4.pyx":2558
- *                     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 = 2558; __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 = 2558; __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;
+        __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_L59;
       }
-      goto __pyx_L40;
-    }
-    __pyx_L40:;
+      __pyx_L59:;
 
-    /* "netCDF4.pyx":2562
- *             # file format.  Be careful to exit define mode before
- *             # any exceptions are raised.
- *             if grp.data_model != 'NETCDF4': grp._redef()             # <<<<<<<<<<<<<<
- *             # define variable.
- *             if ndims:
+      /* "netCDF4/_netCDF4.pyx":3362
+ *                 # 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_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 = 2562; __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 = 2562; __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 = 2562; __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_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 = 3362; __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_6, function);
+          __Pyx_DECREF_SET(__pyx_t_1, 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 = 2562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      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 = 3362; __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_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_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_3);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      goto __pyx_L44;
-    }
-    __pyx_L44:;
+      __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 = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (__pyx_t_9) {
 
-    /* "netCDF4.pyx":2564
- *             if grp.data_model != 'NETCDF4': grp._redef()
- *             # define variable.
- *             if ndims:             # <<<<<<<<<<<<<<
- *                 ierr = nc_def_var(self._grpid, varname, xtype, ndims,
- *                                   dimids, &self._varid)
+        /* "netCDF4/_netCDF4.pyx":3363
+ *                 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_8 = (__pyx_v_ndims != 0);
-    if (__pyx_t_8) {
+        __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 = 3363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_XDECREF_SET(__pyx_v_mask, __pyx_t_2);
+        __pyx_t_2 = 0;
 
-      /* "netCDF4.pyx":2565
- *             # define variable.
- *             if ndims:
- *                 ierr = nc_def_var(self._grpid, varname, xtype, ndims,             # <<<<<<<<<<<<<<
- *                                   dimids, &self._varid)
- *             else: # a scalar variable.
+        /* "netCDF4/_netCDF4.pyx":3364
+ *                 if has_fillval.any():
+ *                     mask=data==fillval
+ *                     if fill_value is None:             # <<<<<<<<<<<<<<
+ *                         fill_value = fillval
+ *                     totalmask += mask
  */
-      __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_L45;
-    }
-    /*else*/ {
+        __pyx_t_9 = (__pyx_v_fill_value == Py_None);
+        __pyx_t_16 = (__pyx_t_9 != 0);
+        if (__pyx_t_16) {
 
-      /* "netCDF4.pyx":2568
- *                                   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
+          /* "netCDF4/_netCDF4.pyx":3365
+ *                     mask=data==fillval
+ *                     if fill_value is None:
+ *                         fill_value = fillval             # <<<<<<<<<<<<<<
+ *                     totalmask += mask
+ *         # all values where data == missing_value or _FillValue are
  */
-      __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_L45:;
+          __Pyx_INCREF(__pyx_v_fillval);
+          __Pyx_DECREF_SET(__pyx_v_fill_value, __pyx_v_fillval);
+          goto __pyx_L61;
+        }
+        __pyx_L61:;
 
-    /* "netCDF4.pyx":2574
- *             # 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)
+        /* "netCDF4/_netCDF4.pyx":3366
+ *                     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_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_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_startswith); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__57, NULL); 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_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 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_1) {
-    } else {
-      __pyx_t_8 = __pyx_t_1;
-      goto __pyx_L47_bool_binop_done;
+        __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __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_L60;
+      }
+      __pyx_L60:;
+      goto __pyx_L49;
     }
-    __pyx_t_1 = (__pyx_v_chunk_cache != Py_None);
-    __pyx_t_2 = (__pyx_t_1 != 0);
-    __pyx_t_8 = __pyx_t_2;
-    __pyx_L47_bool_binop_done:;
-    if (__pyx_t_8) {
+    __pyx_L49:;
+  }
+  __pyx_L26:;
 
-      /* "netCDF4.pyx":2575
- *             # 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:
+  /* "netCDF4/_netCDF4.pyx":3370
+ *         # 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_v_ierr = nc_get_var_chunk_cache(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_sizep), (&__pyx_v_nelemsp), (&__pyx_v_preemptionp));
+  __pyx_t_16 = (__pyx_v_fill_value != Py_None);
+  __pyx_t_9 = (__pyx_t_16 != 0);
+  if (__pyx_t_9) {
 
-      /* "netCDF4.pyx":2577
- *                 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.
+    /* "netCDF4/_netCDF4.pyx":3371
+ *         # otherwise _FillValue.
+ *         if fill_value is not None:
+ *             data = ma.masked_array(data,mask=totalmask,fill_value=fill_value)             # <<<<<<<<<<<<<<
+ *         return data
+ * 
  */
-      __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0);
-      if (__pyx_t_8) {
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3371; __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 = 3371; __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 = 3371; __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 = 3371; __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 = 3371; __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 = 3371; __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 = 3371; __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_L62;
+  }
+  __pyx_L62:;
 
-        /* "netCDF4.pyx":2578
- *                         &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
+  /* "netCDF4/_netCDF4.pyx":3372
+ *         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_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 = 2578; __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 = 2578; __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 = 2578; __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 = 2578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_data);
+  __pyx_r = __pyx_v_data;
+  goto __pyx_L0;
 
-      /* "netCDF4.pyx":2580
- *                     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)
+  /* "netCDF4/_netCDF4.pyx":3278
+ *         return data
+ * 
+ *     def _toma(self,data):             # <<<<<<<<<<<<<<
+ *         cdef int ierr, no_fill
+ *         # private function for creating a masked array, masking missing_values
  */
-      __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 = 2580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_v_sizep = __pyx_t_13;
 
-      /* "netCDF4.pyx":2581
- *                 # 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);
+  /* 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._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":2583
- *                 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:
+/* "netCDF4/_netCDF4.pyx":3374
+ *         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]
  */
-      __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0);
-      if (__pyx_t_8) {
 
-        /* "netCDF4.pyx":2584
- *                         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 = 2584; __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 = 2584; __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 = 2584; __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 = 2584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_47_assign_vlen(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_46_assign_vlen[] = "private method to assign data to a single item in a VLEN variable";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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;
       }
-      goto __pyx_L46;
+      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 = 3374; __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 = 3374; __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_L46:;
+    __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 = 3374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable._assign_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_46_assign_vlen(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), __pyx_v_elem, __pyx_v_data);
 
-    /* "netCDF4.pyx":2585
- *                 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) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":2586
- *                     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 = 2586; __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 = 2586; __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 = 2586; __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 = 2586; __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 = 2586; __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_L52;
-      }
-      __pyx_L52:;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_46_assign_vlen(struct __pyx_obj_7netCDF4_8_netCDF4_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":2587
- *             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.
+  /* "netCDF4/_netCDF4.pyx":3382
+ *         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_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 = 2587; __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 = 2587; __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 = 2587; __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 = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = ((!__pyx_t_1) != 0);
+  if (__pyx_t_2) {
 
-    /* "netCDF4.pyx":2594
- *             # 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
+    /* "netCDF4/_netCDF4.pyx":3383
+ *         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_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_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3383; __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 = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (!__pyx_t_2) {
-    } else {
-      __pyx_t_8 = __pyx_t_2;
-      goto __pyx_L54_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 = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_8 = __pyx_t_2;
-    __pyx_L54_bool_binop_done:;
+    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_t_2 = (__pyx_t_8 != 0);
-    if (__pyx_t_2) {
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-      /* "netCDF4.pyx":2596
- *             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:
+  /* "netCDF4/_netCDF4.pyx":3384
+ *         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_8 = __Pyx_PyObject_IsTrue(__pyx_v_zlib); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_8) {
-      } else {
-        __pyx_t_2 = __pyx_t_8;
-        goto __pyx_L57_bool_binop_done;
-      }
-      __pyx_t_8 = (__pyx_v_ndims != 0);
-      __pyx_t_2 = __pyx_t_8;
-      __pyx_L57_bool_binop_done:;
-      if (__pyx_t_2) {
+  __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 = 3384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_ndims = __pyx_t_4;
 
-        /* "netCDF4.pyx":2597
- *                 # 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)
+  /* "netCDF4/_netCDF4.pyx":3385
+ *             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_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 = 2597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_v_ideflate_level = __pyx_t_4;
+  __Pyx_INCREF(__pyx_kp_s_single_element_VLEN_slices_must);
+  __pyx_v_msg = __pyx_kp_s_single_element_VLEN_slices_must;
 
-        /* "netCDF4.pyx":2598
- *                 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:
+  /* "netCDF4/_netCDF4.pyx":3388
+ *         # 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 = __Pyx_PyObject_IsTrue(__pyx_v_shuffle); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (__pyx_t_2) {
+  __pyx_t_2 = PyInt_Check(__pyx_v_elem); 
+  __pyx_t_1 = (__pyx_t_2 != 0);
+  if (__pyx_t_1) {
 
-          /* "netCDF4.pyx":2599
- *                     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)
+    /* "netCDF4/_netCDF4.pyx":3389
+ *         # handle negative integers.
+ *         if isinstance(elem, int):
+ *             if ndims > 1:             # <<<<<<<<<<<<<<
+ *                 raise IndexError(msg)
+ *             if elem < 0:
  */
-          __pyx_v_ierr = nc_def_var_deflate(__pyx_v_self->_grpid, __pyx_v_self->_varid, 1, 1, __pyx_v_ideflate_level);
-          goto __pyx_L59;
-        }
-        /*else*/ {
+    __pyx_t_1 = ((__pyx_v_ndims > 1) != 0);
+    if (__pyx_t_1) {
 
-          /* "netCDF4.pyx":2601
- *                         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()
+      /* "netCDF4/_netCDF4.pyx":3390
+ *         if isinstance(elem, int):
+ *             if ndims > 1:
+ *                 raise IndexError(msg)             # <<<<<<<<<<<<<<
+ *             if elem < 0:
+ *                 if self.shape[0]+elem >= 0:
  */
-          __pyx_v_ierr = nc_def_var_deflate(__pyx_v_self->_grpid, __pyx_v_self->_varid, 0, 1, __pyx_v_ideflate_level);
-        }
-        __pyx_L59:;
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3390; __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 = 3390; __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 = 3390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-        /* "netCDF4.pyx":2602
- *                     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'))
+    /* "netCDF4/_netCDF4.pyx":3391
+ *             if ndims > 1:
+ *                 raise IndexError(msg)
+ *             if elem < 0:             # <<<<<<<<<<<<<<
+ *                 if self.shape[0]+elem >= 0:
+ *                     elem = self.shape[0]+elem
  */
-        __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
-        if (__pyx_t_2) {
+    __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 = 3391; __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 = 3391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    if (__pyx_t_1) {
 
-          /* "netCDF4.pyx":2603
- *                         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.
+      /* "netCDF4/_netCDF4.pyx":3392
+ *                 raise IndexError(msg)
+ *             if elem < 0:
+ *                 if self.shape[0]+elem >= 0:             # <<<<<<<<<<<<<<
+ *                     elem = self.shape[0]+elem
+ *                 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 = 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_L61;
-          }
-          __pyx_L61:;
+      __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 = 3392; __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 = 3392; __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 = 3392; __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 = 3392; __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 = 3392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      if (__pyx_t_1) {
 
-          /* "netCDF4.pyx":2604
- *                     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
+        /* "netCDF4/_netCDF4.pyx":3393
+ *             if elem < 0:
+ *                 if self.shape[0]+elem >= 0:
+ *                     elem = self.shape[0]+elem             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     raise IndexError("Illegal index")
  */
-          __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_L56;
+        __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 = 3393; __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 = 3393; __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 = 3393; __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;
       }
-      __pyx_L56:;
+      /*else*/ {
 
-      /* "netCDF4.pyx":2606
- *                         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:
+        /* "netCDF4/_netCDF4.pyx":3395
+ *                     elem = self.shape[0]+elem
+ *                 else:
+ *                     raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
+ *         elif isinstance(elem, tuple):
+ *             if len(elem) != ndims:
  */
-      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_fletcher32); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_8) {
-      } else {
-        __pyx_t_2 = __pyx_t_8;
-        goto __pyx_L63_bool_binop_done;
+        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3395; __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 = 3395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-      __pyx_t_8 = (__pyx_v_ndims != 0);
-      __pyx_t_2 = __pyx_t_8;
-      __pyx_L63_bool_binop_done:;
-      if (__pyx_t_2) {
+      __pyx_L7:;
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+    goto __pyx_L4;
+  }
 
-        /* "netCDF4.pyx":2607
- *                 # 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()
+  /* "netCDF4/_netCDF4.pyx":3396
+ *                 else:
+ *                     raise IndexError("Illegal index")
+ *         elif isinstance(elem, tuple):             # <<<<<<<<<<<<<<
+ *             if len(elem) != ndims:
+ *                 raise IndexError("Illegal index")
  */
-        __pyx_v_ierr = nc_def_var_fletcher32(__pyx_v_self->_grpid, __pyx_v_self->_varid, 1);
+  __pyx_t_1 = PyTuple_Check(__pyx_v_elem); 
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
 
-        /* "netCDF4.pyx":2608
- *                 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'))
+    /* "netCDF4/_netCDF4.pyx":3397
+ *                     raise IndexError("Illegal index")
+ *         elif isinstance(elem, tuple):
+ *             if len(elem) != ndims:             # <<<<<<<<<<<<<<
+ *                 raise IndexError("Illegal index")
+ *             elemnew = []
  */
-        __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
-        if (__pyx_t_2) {
+    __pyx_t_6 = PyObject_Length(__pyx_v_elem); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = ((__pyx_t_6 != __pyx_v_ndims) != 0);
+    if (__pyx_t_2) {
 
-          /* "netCDF4.pyx":2609
- *                     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.
+      /* "netCDF4/_netCDF4.pyx":3398
+ *         elif isinstance(elem, tuple):
+ *             if len(elem) != ndims:
+ *                 raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
+ *             elemnew = []
+ *             for n,e in enumerate(elem):
  */
-          __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 = 2609; __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 = 2609; __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 = 2609; __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 = 2609; __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 = 2609; __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_L66;
-          }
-          __pyx_L66:;
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3398; __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 = 3398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-          /* "netCDF4.pyx":2610
- *                     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.
+    /* "netCDF4/_netCDF4.pyx":3399
+ *             if len(elem) != ndims:
+ *                 raise IndexError("Illegal index")
+ *             elemnew = []             # <<<<<<<<<<<<<<
+ *             for n,e in enumerate(elem):
+ *                 if not isinstance(e, int):
  */
-          __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 = 2610; __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 = 2610; __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 = 2610; __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 = 2610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_v_elemnew = ((PyObject*)__pyx_t_3);
+    __pyx_t_3 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":3400
+ *                 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 = 3400; __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 = 3400; __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 = 3400; __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 = 3400; __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 = 3400; __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 = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
         }
-        goto __pyx_L62;
+      } 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 = 3400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_5);
       }
-      __pyx_L62:;
+      __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":2612
- *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *                 # set chunking stuff.
- *                 if ndims: # don't bother for scalar variable.             # <<<<<<<<<<<<<<
- *                     if contiguous:
- *                         icontiguous = NC_CONTIGUOUS
+      /* "netCDF4/_netCDF4.pyx":3401
+ *             elemnew = []
+ *             for n,e in enumerate(elem):
+ *                 if not isinstance(e, int):             # <<<<<<<<<<<<<<
+ *                     raise IndexError(msg)
+ *                 elif e < 0:
  */
-      __pyx_t_2 = (__pyx_v_ndims != 0);
-      if (__pyx_t_2) {
+      __pyx_t_2 = PyInt_Check(__pyx_v_e); 
+      __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
+      if (__pyx_t_1) {
 
-        /* "netCDF4.pyx":2613
- *                 # set chunking stuff.
- *                 if ndims: # don't bother for scalar variable.
- *                     if contiguous:             # <<<<<<<<<<<<<<
- *                         icontiguous = NC_CONTIGUOUS
- *                         if chunksizes is not None:
+        /* "netCDF4/_netCDF4.pyx":3402
+ *             for n,e in enumerate(elem):
+ *                 if not isinstance(e, int):
+ *                     raise IndexError(msg)             # <<<<<<<<<<<<<<
+ *                 elif e < 0:
+ *                     enew = self.shape[n]+e
  */
-        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_contiguous); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (__pyx_t_2) {
+        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3402; __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 = 3402; __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 = 3402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
 
-          /* "netCDF4.pyx":2614
- *                 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')
+      /* "netCDF4/_netCDF4.pyx":3403
+ *                 if not isinstance(e, int):
+ *                     raise IndexError(msg)
+ *                 elif e < 0:             # <<<<<<<<<<<<<<
+ *                     enew = self.shape[n]+e
+ *                     if enew < 0:
  */
-          __pyx_v_icontiguous = NC_CONTIGUOUS;
+      __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 = 3403; __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 = 3403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      if (__pyx_t_1) {
 
-          /* "netCDF4.pyx":2615
- *                     if contiguous:
- *                         icontiguous = NC_CONTIGUOUS
- *                         if chunksizes is not None:             # <<<<<<<<<<<<<<
- *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')
+        /* "netCDF4/_netCDF4.pyx":3404
+ *                     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 = 3404; __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 = 3404; __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 = 3404; __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/_netCDF4.pyx":3405
+ *                 elif e < 0:
+ *                     enew = self.shape[n]+e
+ *                     if enew < 0:             # <<<<<<<<<<<<<<
+ *                         raise IndexError("Illegal index")
  *                     else:
  */
-          __pyx_t_2 = (__pyx_v_chunksizes != Py_None);
-          __pyx_t_8 = (__pyx_t_2 != 0);
-          if (__pyx_t_8) {
+        __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 = 3405; __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 = 3405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        if (__pyx_t_1) {
 
-            /* "netCDF4.pyx":2616
- *                         icontiguous = NC_CONTIGUOUS
- *                         if chunksizes is not None:
- *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')             # <<<<<<<<<<<<<<
+          /* "netCDF4/_netCDF4.pyx":3406
+ *                     enew = self.shape[n]+e
+ *                     if enew < 0:
+ *                         raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
  *                     else:
- *                         icontiguous = NC_CHUNKED
+ *                         elemnew.append(self.shape[n]+e)
  */
-            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__58, 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_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_L68;
+          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3406; __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 = 3406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         /*else*/ {
 
-          /* "netCDF4.pyx":2618
- *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')
+          /* "netCDF4/_netCDF4.pyx":3408
+ *                         raise IndexError("Illegal index")
  *                     else:
- *                         icontiguous = NC_CHUNKED             # <<<<<<<<<<<<<<
- *                     if chunksizes is None:
- *                         chunksizesp = NULL
+ *                         elemnew.append(self.shape[n]+e)             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     elemnew.append(e)
  */
-          __pyx_v_icontiguous = NC_CHUNKED;
+          __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 = 3408; __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 = 3408; __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 = 3408; __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 = 3408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
         }
-        __pyx_L68:;
+        goto __pyx_L11;
+      }
+      /*else*/ {
 
-        /* "netCDF4.pyx":2619
- *                     else:
- *                         icontiguous = NC_CHUNKED
- *                     if chunksizes is None:             # <<<<<<<<<<<<<<
- *                         chunksizesp = NULL
- *                     else:
+        /* "netCDF4/_netCDF4.pyx":3410
+ *                         elemnew.append(self.shape[n]+e)
+ *                 else:
+ *                     elemnew.append(e)             # <<<<<<<<<<<<<<
+ *             elem = tuple(elemnew)
+ *         else:
  */
-        __pyx_t_8 = (__pyx_v_chunksizes == Py_None);
-        __pyx_t_2 = (__pyx_t_8 != 0);
-        if (__pyx_t_2) {
+        __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 = 3410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L11:;
 
-          /* "netCDF4.pyx":2620
- *                         icontiguous = NC_CHUNKED
- *                     if chunksizes is None:
- *                         chunksizesp = NULL             # <<<<<<<<<<<<<<
- *                     else:
- *                         if len(chunksizes) != len(dimensions):
+      /* "netCDF4/_netCDF4.pyx":3400
+ *                 raise IndexError("Illegal index")
+ *             elemnew = []
+ *             for n,e in enumerate(elem):             # <<<<<<<<<<<<<<
+ *                 if not isinstance(e, int):
+ *                     raise IndexError(msg)
  */
-          __pyx_v_chunksizesp = NULL;
-          goto __pyx_L70;
-        }
-        /*else*/ {
+    }
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-          /* "netCDF4.pyx":2622
- *                         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')
+    /* "netCDF4/_netCDF4.pyx":3411
+ *                 else:
+ *                     elemnew.append(e)
+ *             elem = tuple(elemnew)             # <<<<<<<<<<<<<<
+ *         else:
+ *             raise IndexError(msg)
  */
-          __pyx_t_11 = PyObject_Length(__pyx_v_chunksizes); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2622; __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 = 2622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_t_2 = ((__pyx_t_11 != __pyx_t_14) != 0);
-          if (__pyx_t_2) {
+    __pyx_t_3 = PyList_AsTuple(__pyx_v_elemnew); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3411; __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":2623
- *                     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)
+    /* "netCDF4/_netCDF4.pyx":3413
+ *             elem = tuple(elemnew)
+ *         else:
+ *             raise IndexError(msg)             # <<<<<<<<<<<<<<
+ *         # set start, count
+ *         if isinstance(elem, tuple):
  */
-            __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 = 2623; __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 = 2623; __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 = 2623; __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 = 2623; __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 = 2623; __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_L72;
-            }
-            __pyx_L72:;
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3413; __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 = 3413; __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 = 3413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_L4:;
 
-            /* "netCDF4.pyx":2624
- *                         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:
+  /* "netCDF4/_netCDF4.pyx":3415
+ *             raise IndexError(msg)
+ *         # set start, count
+ *         if isinstance(elem, tuple):             # <<<<<<<<<<<<<<
+ *             start = list(elem)
+ *         else:
  */
-            __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 = 2624; __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 = 2624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
+  __pyx_t_1 = PyTuple_Check(__pyx_v_elem); 
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
 
-          /* "netCDF4.pyx":2625
- *                             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]
+    /* "netCDF4/_netCDF4.pyx":3416
+ *         # set start, count
+ *         if isinstance(elem, tuple):
+ *             start = list(elem)             # <<<<<<<<<<<<<<
+ *         else:
+ *             start = [elem]
  */
-          __pyx_v_chunksizesp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims)));
+    __pyx_t_8 = PySequence_List(__pyx_v_elem); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3416; __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":2626
- *                             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:
+    /* "netCDF4/_netCDF4.pyx":3418
+ *             start = list(elem)
+ *         else:
+ *             start = [elem]             # <<<<<<<<<<<<<<
+ *         count = [1]*ndims
+ *         for n from 0 <= n < ndims:
  */
-          __pyx_t_4 = __pyx_v_ndims;
-          for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {
+    __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3418; __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":2627
- *                         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)
+  /* "netCDF4/_netCDF4.pyx":3419
+ *         else:
+ *             start = [elem]
+ *         count = [1]*ndims             # <<<<<<<<<<<<<<
+ *         for n from 0 <= n < ndims:
+ *             startp[n] = start[n]
  */
-            __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 = 2627; __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 = 2627; __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_L70:;
+  __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 = 3419; __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":2628
- *                         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)
+  /* "netCDF4/_netCDF4.pyx":3420
+ *             start = [elem]
+ *         count = [1]*ndims
+ *         for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
+ *             startp[n] = start[n]
+ *             countp[n] = count[n]
  */
-        __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_L76_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 = 2628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_2 = __pyx_t_1;
-        __pyx_L76_bool_binop_done:;
-        if (__pyx_t_2) {
+  __pyx_t_4 = __pyx_v_ndims;
+  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {
 
-          /* "netCDF4.pyx":2629
- *                             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:
+    /* "netCDF4/_netCDF4.pyx":3421
+ *         count = [1]*ndims
+ *         for n from 0 <= n < ndims:
+ *             startp[n] = start[n]             # <<<<<<<<<<<<<<
+ *             countp[n] = count[n]
+ *         if self.dtype == str: # VLEN string
  */
-          __pyx_v_ierr = nc_def_var_chunking(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_icontiguous, __pyx_v_chunksizesp);
+    __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 = 3421; __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 = 3421; __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":2630
- *                     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()
+    /* "netCDF4/_netCDF4.pyx":3422
+ *         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 *))
  */
-          free(__pyx_v_chunksizesp);
+    __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 = 3422; __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 = 3422; __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":2631
- *                         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'))
+  /* "netCDF4/_netCDF4.pyx":3423
+ *             startp[n] = start[n]
+ *             countp[n] = count[n]
+ *         if self.dtype == str: # VLEN string             # <<<<<<<<<<<<<<
+ *             strdata = <char **>malloc(sizeof(char *))
+ *             bytestr = _strencode(data)
  */
-          __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
-          if (__pyx_t_2) {
+  __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 = 3423; __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 = 3423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  if (__pyx_t_2) {
 
-            /* "netCDF4.pyx":2632
- *                         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
+    /* "netCDF4/_netCDF4.pyx":3424
+ *             countp[n] = count[n]
+ *         if self.dtype == str: # VLEN string
+ *             strdata = <char **>malloc(sizeof(char *))             # <<<<<<<<<<<<<<
+ *             bytestr = _strencode(data)
+ *             strdata[0] = bytestr
  */
-            __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 = 2632; __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 = 2632; __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 = 2632; __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 = 2632; __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 = 2632; __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:;
+    __pyx_v_strdata = ((char **)malloc((sizeof(char *))));
 
-            /* "netCDF4.pyx":2633
- *                         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':
+    /* "netCDF4/_netCDF4.pyx":3425
+ *         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_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 = 2633; __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 = 2633; __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 = 2633; __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 = 2633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          goto __pyx_L75;
-        }
-        __pyx_L75:;
-        goto __pyx_L67;
-      }
-      __pyx_L67:;
+    __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_data, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_8);
+    __pyx_v_bytestr = __pyx_t_8;
+    __pyx_t_8 = 0;
 
-      /* "netCDF4.pyx":2635
- *                             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':
+    /* "netCDF4/_netCDF4.pyx":3426
+ *             strdata = <char **>malloc(sizeof(char *))
+ *             bytestr = _strencode(data)
+ *             strdata[0] = bytestr             # <<<<<<<<<<<<<<
+ *             ierr = nc_put_vara(self._grpid, self._varid,
+ *                                startp, countp, strdata)
  */
-      __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 = 2635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_2) {
+    __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    (__pyx_v_strdata[0]) = __pyx_t_11;
 
-        /* "netCDF4.pyx":2636
- *                 # 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)
+    /* "netCDF4/_netCDF4.pyx":3427
+ *             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_def_var_endian(__pyx_v_self->_grpid, __pyx_v_self->_varid, NC_ENDIAN_LITTLE);
-        goto __pyx_L80;
-      }
+    __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":2637
- *                 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':
+    /* "netCDF4/_netCDF4.pyx":3429
+ *             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_PyString_Equals(__pyx_v_endian, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_2) {
+    __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_2) {
 
-        /* "netCDF4.pyx":2638
- *                     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.
+      /* "netCDF4/_netCDF4.pyx":3430
+ *                                startp, countp, strdata)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             free(strdata)
+ *         else: # regular VLEN
  */
-        __pyx_v_ierr = nc_def_var_endian(__pyx_v_self->_grpid, __pyx_v_self->_varid, NC_ENDIAN_BIG);
-        goto __pyx_L80;
-      }
+      __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 = 3430; __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 = 3430; __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 = 3430; __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 = 3430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-      /* "netCDF4.pyx":2639
- *                 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:
+    /* "netCDF4/_netCDF4.pyx":3431
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             free(strdata)             # <<<<<<<<<<<<<<
+ *         else: # regular VLEN
+ *             if data.dtype != self.dtype:
  */
-      __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 = 2639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_2) {
-        goto __pyx_L80;
-      }
-      /*else*/ {
+    free(__pyx_v_strdata);
+    goto __pyx_L16;
+  }
+  /*else*/ {
 
-        /* "netCDF4.pyx":2642
- *                     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()
+    /* "netCDF4/_netCDF4.pyx":3433
+ *             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_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 = 2642; __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 = 2642; __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 = 2642; __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 = 2642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      __pyx_L80:;
+    __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 = 3433; __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 = 3433; __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 = 3433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    if (__pyx_t_2) {
 
-      /* "netCDF4.pyx":2643
- *                 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'))
+      /* "netCDF4/_netCDF4.pyx":3434
+ *         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_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
-      if (__pyx_t_2) {
+      __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 = 3434; __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 = 3434; __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 = 3434; __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 = 3434; __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 = 3434; __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 = 3434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-        /* "netCDF4.pyx":2644
- *                     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:
+    /* "netCDF4/_netCDF4.pyx":3435
+ *             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)
  */
-        __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 = 2644; __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 = 2644; __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 = 2644; __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 = 2644; __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 = 2644; __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_L82;
-        }
-        __pyx_L82:;
+    if (!(likely(((__pyx_v_data) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_data, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3435; __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":2645
- *                 if ierr != NC_NOERR:
- *                     if grp.data_model != 'NETCDF4': grp._enddef()
- *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *             else:
- *                 if endian != 'native':
+    /* "netCDF4/_netCDF4.pyx":3436
+ *                 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_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 = 2645; __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 = 2645; __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 = 2645; __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 = 2645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      goto __pyx_L53;
-    }
-    /*else*/ {
+    __pyx_v_vldata = ((nc_vlen_t *)malloc((sizeof(nc_vlen_t))));
 
-      /* "netCDF4.pyx":2647
- *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *             else:
- *                 if endian != 'native':             # <<<<<<<<<<<<<<
- *                     msg="only endian='native' allowed for NETCDF3 files"
- *                     raise RuntimeError(msg)
+    /* "netCDF4/_netCDF4.pyx":3437
+ *             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_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 = 2647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_2) {
+    (__pyx_v_vldata[0]).len = PyArray_SIZE(__pyx_v_data2);
 
-        /* "netCDF4.pyx":2648
- *             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
+    /* "netCDF4/_netCDF4.pyx":3438
+ *             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_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);
+    __pyx_t_11 = __pyx_v_data2->data;
+    (__pyx_v_vldata[0]).p = __pyx_t_11;
 
-        /* "netCDF4.pyx":2649
- *                 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
+    /* "netCDF4/_netCDF4.pyx":3439
+ *             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_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __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 = 2649; __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 = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-    }
-    __pyx_L53:;
+    __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":2653
- *             # 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.
+    /* "netCDF4/_netCDF4.pyx":3441
+ *             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_fill_value != Py_None);
-    __pyx_t_1 = (__pyx_t_2 != 0);
-    if (__pyx_t_1) {
+    __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_2) {
 
-      /* "netCDF4.pyx":2654
- *             # 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:
+      /* "netCDF4/_netCDF4.pyx":3442
+ *                                startp, countp, vldata)
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             free(vldata)
+ * 
  */
-      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fill_value); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2654; __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_L86_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 = 2654; __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_L86_bool_binop_done:;
-      if (__pyx_t_1) {
+      __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 = 3442; __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 = 3442; __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 = 3442; __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 = 3442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-        /* "netCDF4.pyx":2656
- *                 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.
+    /* "netCDF4/_netCDF4.pyx":3443
+ *             if ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             free(vldata)             # <<<<<<<<<<<<<<
+ * 
+ *     def __setitem__(self, elem, data):
  */
-        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_2 = ((!__pyx_t_1) != 0);
-        if (__pyx_t_2) {
+    free(__pyx_v_vldata);
+  }
+  __pyx_L16:;
 
-          /* "netCDF4.pyx":2659
- *                         # no fill values for VLEN and compound variables
- *                         # anyway.
- *                         ierr = 0             # <<<<<<<<<<<<<<
- *                     else:
- *                         ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL)
+  /* "netCDF4/_netCDF4.pyx":3374
+ *         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]
  */
-          __pyx_v_ierr = 0;
-          goto __pyx_L88;
-        }
-        /*else*/ {
 
-          /* "netCDF4.pyx":2661
- *                         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_L88:;
+  /* 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._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":2662
- *                     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'))
+/* "netCDF4/_netCDF4.pyx":3445
+ *             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
  */
-        __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
-        if (__pyx_t_2) {
 
-          /* "netCDF4.pyx":2663
- *                         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 = 2663; __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 = 2663; __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 = 2663; __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 = 2663; __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 = 2663; __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_L90;
-          }
-          __pyx_L90:;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_49__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_data); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_48__setitem__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_elem), ((PyObject *)__pyx_v_data));
 
-          /* "netCDF4.pyx":2664
- *                     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 = 2664; __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 = 2664; __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 = 2664; __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 = 2664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        goto __pyx_L85;
-      }
-      /*else*/ {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-        /* "netCDF4.pyx":2667
- *                 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)
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_48__setitem__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":3452
+ *         # 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_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        if (__pyx_t_2) {
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
 
-          /* "netCDF4.pyx":2668
- *                     # 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:
+    /* "netCDF4/_netCDF4.pyx":3453
+ * 
+ *         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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2668; __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 = 2668; __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 = 2668; __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 = 2668; __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;
+    __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 = 3453; __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 = 3453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__pyx_t_1) {
 
-          /* "netCDF4.pyx":2669
- *                     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")
+      /* "netCDF4/_netCDF4.pyx":3457
+ *                 # 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_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 = 2669; __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_L91;
-        }
-        /*else*/ {
+      __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 = 3457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0);
+      if (__pyx_t_3) {
 
-          /* "netCDF4.pyx":2671
- *                         _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
+        /* "netCDF4/_netCDF4.pyx":3458
+ *                 # 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_7 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2671; __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 = 2671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 3458; __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_L91:;
-      }
-      __pyx_L85:;
-      goto __pyx_L84;
-    }
-    __pyx_L84:;
+        __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3458; __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 = 3458; __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":2672
- *                     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.
+        /* "netCDF4/_netCDF4.pyx":3459
+ *                 if not hasattr(data,'ndim'):
+ *                     self._assign_vlen(elem, data)
+ *                     return             # <<<<<<<<<<<<<<
+ *                 elif data.dtype.kind in ['S', 'U']:
+ *                     data = data.astype(object)
  */
-    __pyx_t_2 = (__pyx_v_least_significant_digit != Py_None);
-    __pyx_t_1 = (__pyx_t_2 != 0);
-    if (__pyx_t_1) {
+        __pyx_r = 0;
+        goto __pyx_L0;
+      }
 
-      /* "netCDF4.pyx":2673
- *                         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()
+      /* "netCDF4/_netCDF4.pyx":3460
+ *                     self._assign_vlen(elem, data)
+ *                     return
+ *                 elif data.dtype.kind in ['S', 'U']:             # <<<<<<<<<<<<<<
+ *                     data = data.astype(object)
+ *                 elif data.dtype.kind != 'O':
  */
-      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 = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L92;
-    }
-    __pyx_L92:;
+      __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 = 3460; __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 = 3460; __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 = 3460; __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 = 3460; __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":2675
- *                 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
+        /* "netCDF4/_netCDF4.pyx":3461
+ *                     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_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 = 2675; __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 = 2675; __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 = 2675; __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);
+        __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 = 3461; __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 = 3461; __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 = 3461; __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 = 3461; __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;
       }
-      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 = 2675; __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 = 2675; __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_L93;
-    }
-    __pyx_L93:;
-  }
-  __pyx_L39:;
 
-  /* "netCDF4.pyx":2677
- *             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.
+      /* "netCDF4/_netCDF4.pyx":3462
+ *                 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_v_self->_nunlimdim = 0;
+      __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 = 3462; __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 = 3462; __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 = 3462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      if (__pyx_t_1) {
 
-  /* "netCDF4.pyx":2678
- *         # 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)
+        /* "netCDF4/_netCDF4.pyx":3463
+ *                     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)
  */
-  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 = 2678; __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 = 2678; __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 = 2678; __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 = 2678; __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 = 2678; __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 = 2678; __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 = 2678; __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;
+        __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":2680
- *         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).
+        /* "netCDF4/_netCDF4.pyx":3465
+ *                     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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2680; __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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3465; __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 = 3465; __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 = 3465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
+      __pyx_L5:;
+      goto __pyx_L4;
     }
-    __pyx_t_16 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2680; __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 = 2680; __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;
+    /*else*/ {
 
-    /* "netCDF4.pyx":2681
- *             # 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).
- *         with nogil:
+      /* "netCDF4/_netCDF4.pyx":3470
+ *                 # 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); 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_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);
+      __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 = 3470; __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;
       }
-    }
-    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 = 2681; __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 = 2681; __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 = 2681; __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_L96;
-    }
-    __pyx_L96:;
-
-    /* "netCDF4.pyx":2678
- *         # 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":2683
- *             if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1
- *         # set ndim attribute (number of dimensions).
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
- *         if ierr != NC_NOERR:
- */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
+      __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 = 3470; __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 = 3470; __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 = 3470; __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":2684
- *         # set ndim attribute (number of dimensions).
- *         with nogil:
- *             ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)             # <<<<<<<<<<<<<<
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        /* "netCDF4/_netCDF4.pyx":3471
+ *                 # of the vlen var.
+ *                 if not hasattr(data,'ndim') or data.dtype.kind != 'O':
+ *                     self._assign_vlen(elem, data)             # <<<<<<<<<<<<<<
+ *                     return
+ * 
  */
-        __pyx_v_ierr = nc_inq_varndims(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_numdims));
-      }
+        __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 = 3471; __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 = 3471; __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 = 3471; __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":2683
- *             if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1
- *         # set ndim attribute (number of dimensions).
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
- *         if ierr != NC_NOERR:
+        /* "netCDF4/_netCDF4.pyx":3472
+ *                 if not hasattr(data,'ndim') or data.dtype.kind != 'O':
+ *                     self._assign_vlen(elem, data)
+ *                     return             # <<<<<<<<<<<<<<
+ * 
+ *         # A numpy array is needed. Convert if necessary.
  */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L99;
-        }
-        __pyx_L99:;
+        __pyx_r = 0;
+        goto __pyx_L0;
       }
+    }
+    __pyx_L4:;
+    goto __pyx_L3;
   }
+  __pyx_L3:;
 
-  /* "netCDF4.pyx":2685
- *         with nogil:
- *             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":2686
- *             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
+  /* "netCDF4/_netCDF4.pyx":3476
+ *         # 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_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 = 2686; __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 = 2686; __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 = 2686; __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 = 2686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  __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 = 3476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = ((!(__pyx_t_1 != 0)) != 0);
+  if (__pyx_t_8) {
 
-  /* "netCDF4.pyx":2687
- *         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
+    /* "netCDF4/_netCDF4.pyx":3478
+ *         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_7 = __Pyx_PyInt_From_int(__pyx_v_numdims); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2687; __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;
+    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3478; __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 = 3478; __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 = 3478; __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":2688
- *             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.
+    /* "netCDF4/_netCDF4.pyx":3479
+ *             # 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_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":2691
- *         # 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;
+    __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 = 3479; __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 = 3479; __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":2692
- *         # add_offset, and converting to/from masked arrays is True.
- *         self.scale = True
- *         self.mask = True             # <<<<<<<<<<<<<<
- * 
- *     def __array__(self):
+      /* "netCDF4/_netCDF4.pyx":3480
+ *             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_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;
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3480; __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 = 3480; __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 = 3480; __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 = 3480; __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 = 3480; __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 = 3480; __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":2457
- *     _isvlen, _grp,_cmptype,_vltype
+      /* "netCDF4/_netCDF4.pyx":3482
+ *                 data = numpy.array(data,numpy.float)
+ *             else:
+ *                 data = numpy.array(data,self.dtype)             # <<<<<<<<<<<<<<
  * 
- *     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,
+ *         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 = 3482; __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 = 3482; __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 = 3482; __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 = 3482; __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:;
 
-  /* 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":2694
- *         self.mask = True
+  /* "netCDF4/_netCDF4.pyx":3485
  * 
- *     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":2698
- * 	# allows numpy ufuncs to work faster on Variable objects
- * 	# (issue 216).
- *         return self[...]             # <<<<<<<<<<<<<<
+ *         start, count, stride, put_ind =\
+ *         _StartCountStride(elem,self.shape,self.dimensions,self._grp,datashape=data.shape,put=True)             # <<<<<<<<<<<<<<
+ *         datashape = _out_array_shape(count)
  * 
- *     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 = 2698; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3485; __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 = 3485; __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 = 3485; __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 = 3485; __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 = 3485; __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 = 3485; __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 = 3485; __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 = 3485; __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 = 3485; __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 = 3484; __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 = 3484; __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 = 3484; __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 = 3484; __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 = 3484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L18_unpacking_done:;
+  }
 
-  /* "netCDF4.pyx":2694
- *         self.mask = True
+  /* "netCDF4/_netCDF4.pyx":3484
+ *                 data = numpy.array(data,self.dtype)
  * 
- *     def __array__(self):             # <<<<<<<<<<<<<<
- *         # numpy special method that returns a numpy array.
- * 	# allows numpy ufuncs to work faster on Variable objects
+ *         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;
 
-  /* 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":2700
- *         return self[...]
+  /* "netCDF4/_netCDF4.pyx":3486
+ *         start, count, stride, put_ind =\
+ *         _StartCountStride(elem,self.shape,self.dimensions,self._grp,datashape=data.shape,put=True)
+ *         datashape = _out_array_shape(count)             # <<<<<<<<<<<<<<
  * 
- *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         if python3:
- *            return self.__unicode__()
+ *         # 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 = 3486; __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 = 3486; __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 = 3486; __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 = 3486; __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;
 
-/* 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":2701
- * 
- *     def __repr__(self):
- *         if python3:             # <<<<<<<<<<<<<<
- *            return self.__unicode__()
- *         else:
+  /* "netCDF4/_netCDF4.pyx":3490
+ *         # 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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); 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_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
+  __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 = 3490; __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 = 3490; __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 = 3490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (__pyx_t_8) {
 
-    /* "netCDF4.pyx":2702
- *     def __repr__(self):
- *         if python3:
- *            return self.__unicode__()             # <<<<<<<<<<<<<<
- *         else:
- *            return unicode(self).encode(default_encoding)
+    /* "netCDF4/_netCDF4.pyx":3491
+ *         # 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_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 = 2702; __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_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3491; __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 = 3491; __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_3, function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+        __pyx_t_6 = 1;
       }
     }
-    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 = 2702; __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 = 2702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3491; __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_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;
+    __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 = 3491; __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;
   }
-  /*else*/ {
+  __pyx_L19:;
 
-    /* "netCDF4.pyx":2704
- *            return self.__unicode__()
- *         else:
- *            return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":3494
+ *         # 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 = 3494; __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 = 3494; __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 = 3494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = ((__pyx_t_6 != __pyx_t_12) != 0);
+  if (__pyx_t_8) {
+
+    /* "netCDF4/_netCDF4.pyx":3496
+ *         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)
  * 
- *     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 = 2704; __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 = 2704; __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 = 2704; __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 = 2704; __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_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_view); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3496; __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_3, function);
+        __Pyx_DECREF_SET(__pyx_t_7, 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 = 2704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __Pyx_GOTREF(__pyx_t_1);
+    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 = 3496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
     } else {
-      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2704; __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 = 2704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
-    goto __pyx_L0;
-  }
+    __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":2700
- *         return self[...]
+    /* "netCDF4/_netCDF4.pyx":3497
+ *             # create a view so shape in caller is not modified (issue 90)
+ *             data = data.view()
+ *             data.shape = tuple(datashape)             # <<<<<<<<<<<<<<
  * 
- *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         if python3:
- *            return self.__unicode__()
+ *         # 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 = 3497; __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 = 3497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    goto __pyx_L20;
+  }
+  __pyx_L20:;
 
-  /* 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":2706
- *            return unicode(self).encode(default_encoding)
+  /* "netCDF4/_netCDF4.pyx":3500
  * 
- *     def __unicode__(self):             # <<<<<<<<<<<<<<
- *         cdef int ierr, no_fill
- *         if not dir(self._grp):
+ *         # 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))
  */
-
-/* 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":2708
- *     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 = 2708; __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 = 2708; __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":2709
- *         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;
+  __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 = 3500; __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 = 3500; __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;
   }
-
-  /* "netCDF4.pyx":2710
- *         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 = 2710; __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 = 2710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+  __pyx_t_9 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3500; __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 = 3500; __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_v_ncdump_var = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 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 = 3500; __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 = 3500; __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 = 3500; __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":2711
- *             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()]
+  /* "netCDF4/_netCDF4.pyx":3501
+ *         # 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_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2711; __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 = 2711; __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;
+  __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 = 3501; __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 = 3501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_8) {
   } 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 = 2711; __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 = 2711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_INCREF(__pyx_v_self->ndim);
+    __pyx_t_5 = __pyx_v_self->ndim;
+    goto __pyx_L23_bool_binop_done;
   }
-  __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 = 2711; __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 = 2711; __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 = 2711; __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 = 2711; __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 = 2711; __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 = 2711; __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 = 2711; __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 = 2711; __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 = 2711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+  __pyx_t_9 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3501; __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 = 3501; __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);
     }
-    __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 = 2711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  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 = 3501; __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 = 3501; __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 = 3501; __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_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2711; __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":2712
- *         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 = 2712; __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_count, __pyx_t_4);
+  __pyx_t_4 = 0;
 
-  /* "netCDF4.pyx":2713
- *         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' %\
+  /* "netCDF4/_netCDF4.pyx":3502
+ *         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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2713; __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_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3502; __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 = 3502; __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 = 3502; __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 = 3502; __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_2, function);
+      __Pyx_DECREF_SET(__pyx_t_7, 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 = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  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 = 3502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_GOTREF(__pyx_t_4);
   } else {
-    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3502; __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 = 3502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   }
-  __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;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF_SET(__pyx_v_stride, __pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":3503
+ *         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 = 3503; __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 = 3503; __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 = 3503; __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 = 3503; __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 = 3503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __Pyx_GOTREF(__pyx_t_4);
   } 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 = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3503; __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 = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    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 = 3503; __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;
-  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 = 2713; __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 = 2713; __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 = 2713; __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 = 2713; __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 = 2713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
-      }
-      __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF_SET(__pyx_v_put_ind, __pyx_t_4);
+  __pyx_t_4 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":3505
+ *         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 = 3505; __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);
     }
-    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
-    __pyx_t_1 = 0;
+  }
+  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 = 3505; __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 = 3505; __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 = 3505; __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":2712
- *         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:
+    /* "netCDF4/_netCDF4.pyx":3506
+ * 
+ *         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_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2712; __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_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_quantize); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3506; __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 = 3506; __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_8, function);
+        __Pyx_DECREF_SET(__pyx_t_7, function);
+        __pyx_t_12 = 1;
       }
     }
-    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 = 2712; __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 = 2712; __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 = 2712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+    __pyx_t_5 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3506; __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_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 = 2712; __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 = 2712; __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 = 2712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __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 = 3506; __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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_v_attrs = ((PyObject*)__pyx_t_5);
-  __pyx_t_5 = 0;
+  __pyx_L29:;
 
-  /* "netCDF4.pyx":2714
- *         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)))
+  /* "netCDF4/_netCDF4.pyx":3515
+ *         # 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_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_4) {
+  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3515; __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 = 3515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __pyx_t_8;
+  __pyx_L31_bool_binop_done:;
+  if (__pyx_t_1) {
 
-    /* "netCDF4.pyx":2716
- *         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' %\
+    /* "netCDF4/_netCDF4.pyx":3518
+ *             # 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_5 = __Pyx_PyString_Join(__pyx_kp_s__39, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2716; __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 = 2716; __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;
+    __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 = 3518; __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 = 3518; __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":2715
- *                 self.ncattrs()]
- *         if self._iscompound:
- *             ncdump_var.append('%s %s(%s)\n' %\             # <<<<<<<<<<<<<<
- *             ('compound',self._name,', '.join(dimnames)))
- *         elif self._isvlen:
+      /* "netCDF4/_netCDF4.pyx":3520
+ *             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_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 = 2715; __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 = 2715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    goto __pyx_L8;
+      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3520; __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 = 3520; __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 = 3520; __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 = 3520; __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 = 3520; __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 = 3520; __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 = 3520; __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 = 3520; __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 = 3520; __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 = 3520; __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":2717
- *             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 = 2717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_4) {
-
-    /* "netCDF4.pyx":2719
- *         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__39, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2719; __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 = 2719; __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":2718
- *             ('compound',self._name,', '.join(dimnames)))
- *         elif self._isvlen:
- *             ncdump_var.append('%s %s(%s)\n' %\             # <<<<<<<<<<<<<<
- *             ('vlen',self._name,', '.join(dimnames)))
- *         else:
+  /* "netCDF4/_netCDF4.pyx":3521
+ *                 # 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_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 = 2718; __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 = 2718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    goto __pyx_L8;
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+  } else {
+    __pyx_t_8 = __pyx_t_1;
+    goto __pyx_L38_bool_binop_done;
   }
-  /*else*/ {
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = __pyx_t_1;
+  __pyx_L38_bool_binop_done:;
+  if (__pyx_t_8) {
 
-    /* "netCDF4.pyx":2722
- *         else:
- *             ncdump_var.append('%s %s(%s)\n' %\
- *             (self.dtype,self._name,', '.join(dimnames)))             # <<<<<<<<<<<<<<
- *         ncdump_var = ncdump_var + attrs
- *         if self._iscompound:
+    /* "netCDF4/_netCDF4.pyx":3523
+ *         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_5 = __Pyx_PyString_Join(__pyx_kp_s__39, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2722; __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 = 2722; __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;
+    __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 = 3523; __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 = 3523; __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":2721
- *             ('vlen',self._name,', '.join(dimnames)))
- *         else:
- *             ncdump_var.append('%s %s(%s)\n' %\             # <<<<<<<<<<<<<<
- *             (self.dtype,self._name,', '.join(dimnames)))
- *         ncdump_var = ncdump_var + attrs
+      /* "netCDF4/_netCDF4.pyx":3524
+ *             # 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_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 = 2721; __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 = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  }
-  __pyx_L8:;
+      __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 = 3524; __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 = 3524; __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 = 3524; __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 = 3524; __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":2723
- *             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)
+      /* "netCDF4/_netCDF4.pyx":3525
+ *             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_5 = PyNumber_Add(__pyx_v_ncdump_var, __pyx_v_attrs); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2723; __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;
+      __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 = 3525; __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 = 3525; __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 = 3525; __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 = 3525; __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 = 3525; __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 = 3525; __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 = 3525; __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":2724
- *             (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:
+    /* "netCDF4/_netCDF4.pyx":3526
+ *                 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_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_4) {
+    __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 = 3526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = (__pyx_t_8 != 0);
+    if (__pyx_t_1) {
 
-    /* "netCDF4.pyx":2725
- *         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)
+      /* "netCDF4/_netCDF4.pyx":3527
+ *                 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_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 = 2725; __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 = 2725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    goto __pyx_L9;
-  }
+      __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 = 3527; __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 = 3527; __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":2726
- *         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 = []
+      /* "netCDF4/_netCDF4.pyx":3528
+ *             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_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_4) {
+      __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 = 3528; __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 = 3528; __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 = 3528; __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 = 3528; __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 = 3528; __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 = 3528; __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 = 3528; __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":2727
- *             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:
+    /* "netCDF4/_netCDF4.pyx":3529
+ *                 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_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 = 2727; __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 = 2727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    goto __pyx_L9;
-  }
-  __pyx_L9:;
+    __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 = 3529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_8 = (__pyx_t_1 != 0);
+    if (__pyx_t_8) {
 
-  /* "netCDF4.pyx":2728
- *         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)
+      /* "netCDF4/_netCDF4.pyx":3530
+ *                 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 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_5);
-  __pyx_v_unlimdims = ((PyObject*)__pyx_t_5);
-  __pyx_t_5 = 0;
+      __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 = 3530; __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 = 3530; __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":2729
- *             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():
+      /* "netCDF4/_netCDF4.pyx":3531
+ *             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_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2729; __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 = 2729; __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 = 2729; __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 = 2729; __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 = 2729; __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 = 2729; __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 = 2729; __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 = 2729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 3531; __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 = 3531; __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 = 3531; __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 = 3531; __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);
+          }
         }
-        break;
+        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 = 3531; __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 = 3531; __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 = 3531; __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_GOTREF(__pyx_t_5);
+      __pyx_L45:;
+      goto __pyx_L40;
     }
-    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_5);
-    __pyx_t_5 = 0;
+    __pyx_L40:;
 
-    /* "netCDF4.pyx":2730
- *         unlimdims = []
- *         for dimname in self.dimensions:
- *             dim = _find_dim(self._grp, dimname)             # <<<<<<<<<<<<<<
- *             if dim.isunlimited():
- *                 unlimdims.append(dimname)
+    /* "netCDF4/_netCDF4.pyx":3532
+ *                 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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2730; __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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3532; __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 = 3532; __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_1, function);
-        __pyx_t_12 = 1;
+        __Pyx_DECREF_SET(__pyx_t_7, function);
       }
     }
-    __pyx_t_9 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2730; __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;
+    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 = 3532; __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 = 3532; __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 = 3532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     }
-    __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 = 2730; __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;
+    __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 = 3532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    if (__pyx_t_8) {
 
-    /* "netCDF4.pyx":2731
- *         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)
+      /* "netCDF4/_netCDF4.pyx":3536
+ *                 # 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 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2731; __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);
+      __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 = 3536; __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;
       }
-    }
-    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 = 2731; __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 = 2731; __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 = 2731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    if (__pyx_t_4) {
 
-      /* "netCDF4.pyx":2732
- *             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))
+      /* "netCDF4/_netCDF4.pyx":3537
+ *                 # 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_11 = __Pyx_PyList_Append(__pyx_v_unlimdims, __pyx_v_dimname); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L12;
-    }
-    __pyx_L12:;
-
-    /* "netCDF4.pyx":2729
- *             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":2733
- *             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 = 2733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__14, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2733; __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 = 2733; __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 = 2733; __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 = 2733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    goto __pyx_L13;
-  }
-  __pyx_L13:;
-
-  /* "netCDF4.pyx":2734
- *                 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))
- *         with nogil:
- */
-  __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__39, __pyx_v_unlimdims); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2734; __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 = 2734; __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 = 2734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "netCDF4.pyx":2735
- *         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))             # <<<<<<<<<<<<<<
- *         with nogil:
- *             ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
- */
-  __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 = 2735; __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 = 2735; __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 = 2735; __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 = 2735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "netCDF4.pyx":2736
- *         ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))
- *         ncdump_var.append('current shape = %s\n' % repr(self.shape))
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
- *         if ierr != NC_NOERR:
- */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
-
-        /* "netCDF4.pyx":2737
- *         ncdump_var.append('current shape = %s\n' % repr(self.shape))
- *         with nogil:
- *             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);
+      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3537; __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 = 3537; __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 = 3537; __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 = 3537; __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 = 3537; __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 = 3537; __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 = 3537; __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 = 3537; __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;
+        }
       }
-
-      /* "netCDF4.pyx":2736
- *         ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))
- *         ncdump_var.append('current shape = %s\n' % repr(self.shape))
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
- *         if ierr != NC_NOERR:
- */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L16;
+      __pyx_t_14 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3537; __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 = 3537; __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);
         }
-        __pyx_L16:;
       }
-  }
-
-  /* "netCDF4.pyx":2738
- *         with nogil:
- *             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) {
+      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 = 3537; __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 = 3537; __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 = 3537; __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 = 3537; __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":2739
- *             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:
+        /* "netCDF4/_netCDF4.pyx":3538
+ *                 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_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 = 2739; __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 = 2739; __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 = 2739; __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 = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+        __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 = 3538; __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":2740
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         if self._isprimitive:             # <<<<<<<<<<<<<<
- *             if no_fill != 1:
- *                 try:
+        /* "netCDF4/_netCDF4.pyx":3540
+ *                     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_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_4) {
+        __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 = 3540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = (__pyx_t_8 != 0);
+        if (__pyx_t_3) {
 
-    /* "netCDF4.pyx":2741
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         if self._isprimitive:
- *             if no_fill != 1:             # <<<<<<<<<<<<<<
- *                 try:
- *                     fillval = self._FillValue
+          /* "netCDF4/_netCDF4.pyx":3544
+ *                         # 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_4 = ((__pyx_v_no_fill != 1) != 0);
-    if (__pyx_t_4) {
+          __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3544; __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 = 3544; __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 = 3544; __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 = 3544; __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 = 3544; __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 = 3544; __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 = 3544; __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 = 3544; __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 = 3544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          if (__pyx_t_3) {
 
-      /* "netCDF4.pyx":2742
- *         if self._isprimitive:
- *             if no_fill != 1:
- *                 try:             # <<<<<<<<<<<<<<
- *                     fillval = self._FillValue
- *                     msg = 'filling on'
+            /* "netCDF4/_netCDF4.pyx":3545
+ *                         # 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_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:*/ {
+            __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 = 3545; __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":2743
- *             if no_fill != 1:
- *                 try:
- *                     fillval = self._FillValue             # <<<<<<<<<<<<<<
- *                     msg = 'filling on'
- *                 except AttributeError:
+            /* "netCDF4/_netCDF4.pyx":3547
+ *                             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_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 = 2743; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __pyx_v_fillval = __pyx_t_2;
-          __pyx_t_2 = 0;
+            __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":2744
- *                 try:
- *                     fillval = self._FillValue
- *                     msg = 'filling on'             # <<<<<<<<<<<<<<
- *                 except AttributeError:
- *                     fillval = default_fillvals[self.dtype.str[1:]]
+            /* "netCDF4/_netCDF4.pyx":3548
+ *                         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_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_L27_try_end;
-        __pyx_L20_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;
+            __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3548; __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 = 3548; __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 = 3548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          __pyx_L51:;
 
-        /* "netCDF4.pyx":2745
- *                     fillval = self._FillValue
- *                     msg = 'filling on'
- *                 except AttributeError:             # <<<<<<<<<<<<<<
- *                     fillval = default_fillvals[self.dtype.str[1:]]
- *                     if self.dtype.str[1:] in ['u1','i1']:
+          /* "netCDF4/_netCDF4.pyx":3549
+ *                             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_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 = 2745; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+          __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_GOTREF(__pyx_t_5);
-          __Pyx_GOTREF(__pyx_t_1);
-
-          /* "netCDF4.pyx":2746
- *                     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 = 2746; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
+          __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 = 3549; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 2746; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
-          __Pyx_GOTREF(__pyx_t_8);
-          __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_8, 1, 0, NULL, NULL, &__pyx_slice__61, 1, 0, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2746; __pyx_clineno = __LINE__; goto __pyx_L22_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 = 2746; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;};
-          __Pyx_GOTREF(__pyx_t_8);
+          __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 = 3549; __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 = 3549; __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 = 3549; __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_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-          __Pyx_XDECREF_SET(__pyx_v_fillval, __pyx_t_8);
-          __pyx_t_8 = 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 = 3549; __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 = 3549; __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 = 3549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          if (__pyx_t_3) {
 
-          /* "netCDF4.pyx":2747
- *                 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:
+            /* "netCDF4/_netCDF4.pyx":3550
+ *                             raise RuntimeError(msg)
+ *                         if numpy.array(fillval).shape != ():
+ *                             fillval = fillval[0]             # <<<<<<<<<<<<<<
+ *                     elif hasattr(self, '_FillValue'):
+ *                         fillval = self._FillValue
  */
-          __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 = 2747; __pyx_clineno = __LINE__; goto __pyx_L22_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 = 2747; __pyx_clineno = __LINE__; goto __pyx_L22_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 = 2747; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
-          if (!__pyx_t_3) {
-          } else {
-            __pyx_t_4 = __pyx_t_3;
-            goto __pyx_L31_bool_binop_done;
+            __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 = 3550; __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_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 = 2747; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
-          __pyx_t_4 = __pyx_t_3;
-          __pyx_L31_bool_binop_done:;
-          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-          __pyx_t_3 = (__pyx_t_4 != 0);
-          if (__pyx_t_3) {
+          __pyx_L52:;
+          goto __pyx_L50;
+        }
 
-            /* "netCDF4.pyx":2748
- *                     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             # <<<<<<<<<<<<<<
+        /* "netCDF4/_netCDF4.pyx":3551
+ *                         if numpy.array(fillval).shape != ():
+ *                             fillval = fillval[0]
+ *                     elif hasattr(self, '_FillValue'):             # <<<<<<<<<<<<<<
+ *                         fillval = self._FillValue
  *                     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 = 2748; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
-            __Pyx_GOTREF(__pyx_t_10);
-            __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_t_10);
-            __pyx_t_10 = 0;
-            goto __pyx_L30;
-          }
-          /*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 = 3551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_8 = (__pyx_t_3 != 0);
+        if (__pyx_t_8) {
 
-            /* "netCDF4.pyx":2750
- *                         msg = 'filling on, default _FillValue of %s ignored\n' % fillval
+          /* "netCDF4/_netCDF4.pyx":3552
+ *                             fillval = fillval[0]
+ *                     elif hasattr(self, '_FillValue'):
+ *                         fillval = self._FillValue             # <<<<<<<<<<<<<<
  *                     else:
- *                         msg = 'filling on, default _FillValue of %s used\n' % fillval             # <<<<<<<<<<<<<<
- *                 ncdump_var.append(msg)
- *             else:
+ *                         fillval = default_fillvals[self.dtype.str[1:]]
  */
-            __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 = 2750; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
-            __Pyx_GOTREF(__pyx_t_10);
-            __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_t_10);
-            __pyx_t_10 = 0;
-          }
-          __pyx_L30:;
-          __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_L21_exception_handled;
+          __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 = 3552; __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;
         }
-        goto __pyx_L22_except_error;
-        __pyx_L22_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_L21_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_L27_try_end:;
-      }
+        /*else*/ {
 
-      /* "netCDF4.pyx":2751
+          /* "netCDF4/_netCDF4.pyx":3554
+ *                         fillval = self._FillValue
  *                     else:
- *                         msg = 'filling on, default _FillValue of %s used\n' % fillval
- *                 ncdump_var.append(msg)             # <<<<<<<<<<<<<<
- *             else:
- *                 ncdump_var.append('filling off\n')
+ *                         fillval = default_fillvals[self.dtype.str[1:]]             # <<<<<<<<<<<<<<
+ *                     data = data.filled(fill_value=fillval)
+ * 
  */
-      __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 = 2751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L19;
-    }
-    /*else*/ {
+          __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3554; __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 = 3554; __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__61, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3554; __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 = 3554; __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":2753
- *                 ncdump_var.append(msg)
- *             else:
- *                 ncdump_var.append('filling off\n')             # <<<<<<<<<<<<<<
- * 
+        /* "netCDF4/_netCDF4.pyx":3555
+ *                     else:
+ *                         fillval = default_fillvals[self.dtype.str[1:]]
+ *                     data = data.filled(fill_value=fillval)             # <<<<<<<<<<<<<<
  * 
+ *         # Fill output array with data chunks.
  */
-      __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 = 2753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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 = 3555; __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 = 3555; __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 = 3555; __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 = 3555; __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_L19:;
-    goto __pyx_L18;
+    __pyx_L46:;
+    goto __pyx_L37;
   }
-  __pyx_L18:;
+  __pyx_L37:;
 
-  /* "netCDF4.pyx":2756
- * 
- * 
- *         return ''.join(ncdump_var)             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":3558
  * 
- *     def _getdims(self):
+ *         # 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_XDECREF(__pyx_r);
-  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__15, __pyx_v_ncdump_var); 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_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  /* "netCDF4.pyx":2706
- *            return unicode(self).encode(default_encoding)
- * 
- *     def __unicode__(self):             # <<<<<<<<<<<<<<
- *         cdef int ierr, no_fill
- *         if not dir(self._grp):
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3558; __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 = 3558; __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 = 3558; __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 = 3558; __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 = 3558; __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 = 3558; __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 = 3558; __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 = 3558; __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 = 3558; __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 = 3558; __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 = 3558; __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 = 3558; __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 = 3558; __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 = 3558; __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 = 3558; __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/_netCDF4.pyx":3559
+ *         # 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 = 3559; __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 = 3559; __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/_netCDF4.pyx":3560
+ *         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 = 3560; __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 = 3560; __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 = 3560; __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/_netCDF4.pyx":3562
+ *             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 = 3562; __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 = 3562; __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 = 3562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    if (__pyx_t_8) {
+
+      /* "netCDF4/_netCDF4.pyx":3563
+ *             # 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 = 3563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_8) {
+
+        /* "netCDF4/_netCDF4.pyx":3564
+ *             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 = 3564; __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 = 3564; __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 = 3564; __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 = 3564; __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/_netCDF4.pyx":3566
+ *                     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 = 3566; __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 = 3566; __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 = 3566; __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 = 3566; __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 = 3566; __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/_netCDF4.pyx":3567
+ *                 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 = 3567; __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 = 3567; __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 = 3567; __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/_netCDF4.pyx":3558
+ * 
+ *         # 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/_netCDF4.pyx":3445
+ *             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_1);
   __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_4);
   __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_7);
   __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_XDECREF(__pyx_t_13);
+  __Pyx_XDECREF(__pyx_t_14);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
   __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_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":2758
- *         return ''.join(ncdump_var)
+/* "netCDF4/_netCDF4.pyx":3570
+ * 
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self.shape[0]
  * 
- *     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;
+static Py_ssize_t __pyx_pw_7netCDF4_8_netCDF4_8Variable_51__len__(PyObject *__pyx_v_self); /*proto*/
+static Py_ssize_t __pyx_pw_7netCDF4_8_netCDF4_8Variable_51__len__(PyObject *__pyx_v_self) {
+  Py_ssize_t __pyx_r;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("_getdims (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_8Variable_8_getdims(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__len__(((struct __pyx_obj_7netCDF4_8_netCDF4_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;
+static Py_ssize_t __pyx_pf_7netCDF4_8_netCDF4_8Variable_50__len__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
+  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_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;
+  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("_getdims", 0);
+  __Pyx_RefNannySetupContext("__len__", 0);
 
-  /* "netCDF4.pyx":2764
- *         cdef int dimids[NC_MAX_DIMS]
- *         # get number of dimensions for this variable.
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
- *         if ierr != NC_NOERR:
+  /* "netCDF4/_netCDF4.pyx":3571
+ * 
+ *     def __len__(self):
+ *         return self.shape[0]             # <<<<<<<<<<<<<<
+ * 
+ * 
  */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
+  __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 = 3571; __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 = 3571; __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 = 3571; __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":2765
- *         # get number of dimensions for this variable.
- *         with nogil:
- *             ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)             # <<<<<<<<<<<<<<
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+  /* "netCDF4/_netCDF4.pyx":3570
+ * 
+ * 
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self.shape[0]
+ * 
  */
-        __pyx_v_ierr = nc_inq_varndims(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_numdims));
-      }
 
-      /* "netCDF4.pyx":2764
- *         cdef int dimids[NC_MAX_DIMS]
- *         # get number of dimensions for this variable.
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
- *         if ierr != NC_NOERR:
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":3574
+ * 
+ * 
+ *     def assignValue(self,val):             # <<<<<<<<<<<<<<
+ *         """
+ * assignValue(self, val)
  */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L5;
-        }
-        __pyx_L5:;
-      }
-  }
 
-  /* "netCDF4.pyx":2766
- *         with nogil:
- *             ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
- *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         # get dimension ids.
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_53assignValue(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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_8_netCDF4_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_8_netCDF4_8Variable_52assignValue(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_val));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_52assignValue(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":3580
+ * 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_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_1) {
+  __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 = 3580; __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 = 3580; __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":2767
- *             ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *         # get dimension ids.
- *         with nogil:
+    /* "netCDF4/_netCDF4.pyx":3581
+ * 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_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 = 2767; __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 = 2767; __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 = 2767; __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 = 2767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3581; __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 = 3581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
 
-  /* "netCDF4.pyx":2769
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         # get dimension ids.
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)
- *         if ierr != NC_NOERR:
- */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
-
-        /* "netCDF4.pyx":2770
- *         # get dimension ids.
- *         with nogil:
- *             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":2769
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         # get dimension ids.
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)
- *         if ierr != NC_NOERR:
- */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L9;
-        }
-        __pyx_L9:;
-      }
-  }
-
-  /* "netCDF4.pyx":2771
- *         with nogil:
- *             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":2772
- *             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 = 2772; __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 = 2772; __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 = 2772; __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 = 2772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-
-  /* "netCDF4.pyx":2774
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         # loop over dimensions, retrieve names.
- *         dimensions = ()             # <<<<<<<<<<<<<<
- *         for nn from 0 <= nn < numdims:
- *             with nogil:
- */
-  __Pyx_INCREF(__pyx_empty_tuple);
-  __pyx_v_dimensions = __pyx_empty_tuple;
-
-  /* "netCDF4.pyx":2775
- *         # loop over dimensions, retrieve names.
- *         dimensions = ()
- *         for nn from 0 <= nn < numdims:             # <<<<<<<<<<<<<<
- *             with nogil:
- *                 ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
- */
-  __pyx_t_5 = __pyx_v_numdims;
-  for (__pyx_v_nn = 0; __pyx_v_nn < __pyx_t_5; __pyx_v_nn++) {
-
-    /* "netCDF4.pyx":2776
- *         dimensions = ()
- *         for nn from 0 <= nn < numdims:
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
- *             if ierr != NC_NOERR:
- */
-    {
-        #ifdef WITH_THREAD
-        PyThreadState *_save;
-        Py_UNBLOCK_THREADS
-        #endif
-        /*try:*/ {
-
-          /* "netCDF4.pyx":2777
- *         for nn from 0 <= nn < numdims:
- *             with nogil:
- *                 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":2776
- *         dimensions = ()
- *         for nn from 0 <= nn < numdims:
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
- *             if ierr != NC_NOERR:
- */
-        /*finally:*/ {
-          /*normal exit:*/{
-            #ifdef WITH_THREAD
-            Py_BLOCK_THREADS
-            #endif
-            goto __pyx_L17;
-          }
-          __pyx_L17:;
-        }
-    }
-
-    /* "netCDF4.pyx":2778
- *             with nogil:
- *                 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":2779
- *                 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 = 2779; __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 = 2779; __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 = 2779; __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 = 2779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-
-    /* "netCDF4.pyx":2780
- *             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 = 2780; __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 = 2780; __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 = 2780; __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 = 2780; __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 = 2780; __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 = 2780; __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":2781
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *             name = namstring.decode(default_encoding,unicode_error)
- *             dimensions = dimensions + (name,)             # <<<<<<<<<<<<<<
- *         return dimensions
+  /* "netCDF4/_netCDF4.pyx":3582
+ *         if len(self.dimensions):
+ *             raise IndexError('to assign values to a non-scalar variable, use a slice')
+ *         self[:]=val             # <<<<<<<<<<<<<<
  * 
+ *     def getValue(self):
  */
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2781; __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 = 2781; __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;
-  }
+  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self), __pyx_v_val, 0, 0, NULL, NULL, &__pyx_slice__63, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "netCDF4.pyx":2782
- *             name = namstring.decode(default_encoding,unicode_error)
- *             dimensions = dimensions + (name,)
- *         return dimensions             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":3574
  * 
- *     def _getname(self):
- */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_dimensions);
-  __pyx_r = __pyx_v_dimensions;
-  goto __pyx_L0;
-
-  /* "netCDF4.pyx":2758
- *         return ''.join(ncdump_var)
  * 
- *     def _getdims(self):             # <<<<<<<<<<<<<<
- *         # Private method to get variables's dimension names
- *         cdef int ierr, numdims, n, nn
+ *     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_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_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.assignValue", __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":2784
- *         return dimensions
+/* "netCDF4/_netCDF4.pyx":3584
+ *         self[:]=val
  * 
- *     def _getname(self):             # <<<<<<<<<<<<<<
- *         # Private method to get name associated with instance
- *         cdef int err, _grpid
+ *     def getValue(self):             # <<<<<<<<<<<<<<
+ *         """
+ * getValue(self)
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_55getValue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_55getValue(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));
+  __Pyx_RefNannySetupContext("getValue (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_54getValue(((struct __pyx_obj_7netCDF4_8_netCDF4_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) {
-  int __pyx_v__grpid;
-  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
-  int __pyx_v_ierr;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_54getValue(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
+  Py_ssize_t __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);
+  __Pyx_RefNannySetupContext("getValue", 0);
 
-  /* "netCDF4.pyx":2788
- *         cdef int err, _grpid
- *         cdef char namstring[NC_MAX_NAME+1]
- *         _grpid = self._grp._grpid             # <<<<<<<<<<<<<<
- *         with nogil:
- *             ierr = nc_inq_varname(_grpid, self._varid, namstring)
+  /* "netCDF4/_netCDF4.pyx":3590
+ * 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(__pyx_v_self->_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 3590; __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 = 2788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v__grpid = __pyx_t_2;
-
-  /* "netCDF4.pyx":2789
- *         cdef char namstring[NC_MAX_NAME+1]
- *         _grpid = self._grp._grpid
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_varname(_grpid, self._varid, namstring)
- *         if ierr != NC_NOERR:
- */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
-
-        /* "netCDF4.pyx":2790
- *         _grpid = self._grp._grpid
- *         with nogil:
- *             ierr = nc_inq_varname(_grpid, self._varid, namstring)             # <<<<<<<<<<<<<<
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- */
-        __pyx_v_ierr = nc_inq_varname(__pyx_v__grpid, __pyx_v_self->_varid, __pyx_v_namstring);
-      }
-
-      /* "netCDF4.pyx":2789
- *         cdef char namstring[NC_MAX_NAME+1]
- *         _grpid = self._grp._grpid
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_varname(_grpid, self._varid, namstring)
- *         if ierr != NC_NOERR:
- */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L5;
-        }
-        __pyx_L5:;
-      }
-  }
-
-  /* "netCDF4.pyx":2791
- *         with nogil:
- *             ierr = nc_inq_varname(_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);
+  __pyx_t_3 = (__pyx_t_2 != 0);
   if (__pyx_t_3) {
 
-    /* "netCDF4.pyx":2792
- *             ierr = nc_inq_varname(_grpid, self._varid, namstring)
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *         return namstring.decode(default_encoding,unicode_error)
+    /* "netCDF4/_netCDF4.pyx":3591
+ * 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_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 = 2792; __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 = 2792; __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 = 2792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__64, NULL); 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);
-    __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 = 2792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
 
-  /* "netCDF4.pyx":2793
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         return namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":3592
+ *         if len(self.dimensions):
+ *             raise IndexError('to retrieve values from a non-scalar variable, use slicing')
+ *         return self[slice(None)]             # <<<<<<<<<<<<<<
  * 
- *     property name:
+ *     def set_auto_maskandscale(self,maskandscale):
  */
   __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 = 2793; __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 = 2793; __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 = 2793; __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 = 2793; __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 = 2793; __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 = 2793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_slice__65); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3592; __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":2784
- *         return dimensions
+  /* "netCDF4/_netCDF4.pyx":3584
+ *         self[:]=val
  * 
- *     def _getname(self):             # <<<<<<<<<<<<<<
- *         # Private method to get name associated with instance
- *         cdef int err, _grpid
+ *     def getValue(self):             # <<<<<<<<<<<<<<
+ *         """
+ * getValue(self)
  */
 
   /* 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_AddTraceback("netCDF4._netCDF4.Variable.getValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -38885,84 +37368,117 @@ static PyObject *__pyx_pf_7netCDF4_8Variable_10_getname(struct __pyx_obj_7netCDF
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":2797
- *     property name:
- *         """string name of Variable instance"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._getname()
- *         def __set__(self,value):
+/* "netCDF4/_netCDF4.pyx":3594
+ *         return self[slice(None)]
+ * 
+ *     def set_auto_maskandscale(self,maskandscale):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_maskandscale(self,maskandscale)
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_57set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_maskandscale); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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 _FillValu [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_57set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_maskandscale) {
   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));
+  __Pyx_RefNannySetupContext("set_auto_maskandscale (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_56set_auto_maskandscale(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_maskandscale));
 
   /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-static PyObject *__pyx_pf_7netCDF4_8Variable_4name___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_56set_auto_maskandscale(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_maskandscale) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_1;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_RefNannySetupContext("set_auto_maskandscale", 0);
 
-  /* "netCDF4.pyx":2798
- *         """string name of Variable instance"""
- *         def __get__(self):
- *             return self._getname()             # <<<<<<<<<<<<<<
- *         def __set__(self,value):
- *             raise AttributeError("name cannot be altered")
+  /* "netCDF4/_netCDF4.pyx":3633
+ * (automatic conversions are performed).
+ *         """
+ *         if maskandscale:             # <<<<<<<<<<<<<<
+ *             self.scale = True
+ *             self.mask = True
  */
-  __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 = 2798; __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);
-    }
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_maskandscale); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4/_netCDF4.pyx":3634
+ *         """
+ *         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/_netCDF4.pyx":3635
+ *         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;
   }
-  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 = 2798; __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 = 2798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  /*else*/ {
+
+    /* "netCDF4/_netCDF4.pyx":3637
+ *             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/_netCDF4.pyx":3638
+ *         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_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;
+  __pyx_L3:;
 
-  /* "netCDF4.pyx":2797
- *     property name:
- *         """string name of Variable instance"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._getname()
- *         def __set__(self,value):
+  /* "netCDF4/_netCDF4.pyx":3594
+ *         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_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_AddTraceback("netCDF4._netCDF4.Variable.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -38970,178 +37486,183 @@ static PyObject *__pyx_pf_7netCDF4_8Variable_4name___get__(struct __pyx_obj_7net
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":2799
- *         def __get__(self):
- *             return self._getname()
- *         def __set__(self,value):             # <<<<<<<<<<<<<<
- *             raise AttributeError("name cannot be altered")
+/* "netCDF4/_netCDF4.pyx":3640
+ *             self.mask = False
  * 
+ *     def set_auto_scale(self,scale):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_scale(self,scale)
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_59set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_scale); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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::\ [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_59set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_scale) {
+  PyObject *__pyx_r = 0;
   __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));
+  __Pyx_RefNannySetupContext("set_auto_scale (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_scale(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_scale));
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_58set_auto_scale(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_scale) {
+  PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_1;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__set__", 0);
+  __Pyx_RefNannySetupContext("set_auto_scale", 0);
 
-  /* "netCDF4.pyx":2800
- *             return self._getname()
- *         def __set__(self,value):
- *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":3668
+ * (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 = 3668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_1) {
+
+    /* "netCDF4/_netCDF4.pyx":3669
+ *         """
+ *         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/_netCDF4.pyx":3671
+ *             self.scale = True
+ *         else:
+ *             self.scale = False             # <<<<<<<<<<<<<<
  * 
- *     property datatype:
+ *     def set_auto_mask(self,mask):
  */
-  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2800; __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 = 2800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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":2799
- *         def __get__(self):
- *             return self._getname()
- *         def __set__(self,value):             # <<<<<<<<<<<<<<
- *             raise AttributeError("name cannot be altered")
+  /* "netCDF4/_netCDF4.pyx":3640
+ *             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_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("netCDF4.Variable.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
+  __Pyx_AddTraceback("netCDF4._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":2804
- *     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
+/* "netCDF4/_netCDF4.pyx":3673
+ *             self.scale = False
+ * 
+ *     def set_auto_mask(self,mask):             # <<<<<<<<<<<<<<
+ *         """
+ * set_auto_mask(self,mask)
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_61set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_mask); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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 a [...]
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_61set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_mask) {
   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));
+  __Pyx_RefNannySetupContext("set_auto_mask (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_mask(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_mask));
 
   /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-static PyObject *__pyx_pf_7netCDF4_8Variable_8datatype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_60set_auto_mask(struct __pyx_obj_7netCDF4_8_netCDF4_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("__get__", 0);
-
-  /* "netCDF4.pyx":2805
- *         """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 = 2805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-
-    /* "netCDF4.pyx":2806
- *         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;
-  }
+  __Pyx_RefNannySetupContext("set_auto_mask", 0);
 
-  /* "netCDF4.pyx":2807
- *             if self._iscompound:
- *                 return self._cmptype
- *             elif self._isvlen:             # <<<<<<<<<<<<<<
- *                 return self._vltype
- *             elif self._isprimitive:
+  /* "netCDF4/_netCDF4.pyx":3693
+ * (automatic conversions are performed).
+ *         """
+ *         if mask:             # <<<<<<<<<<<<<<
+ *             self.mask = True
+ *         else:
  */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_mask); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (__pyx_t_1) {
 
-    /* "netCDF4.pyx":2808
- *                 return self._cmptype
- *             elif self._isvlen:
- *                 return self._vltype             # <<<<<<<<<<<<<<
- *             elif self._isprimitive:
- *                 return self.dtype
+    /* "netCDF4/_netCDF4.pyx":3694
+ *         """
+ *         if mask:
+ *             self.mask = True             # <<<<<<<<<<<<<<
+ *         else:
+ *             self.mask = False
  */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_v_self->_vltype);
-    __pyx_r = __pyx_v_self->_vltype;
-    goto __pyx_L0;
+    __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":2809
- *             elif self._isvlen:
- *                 return self._vltype
- *             elif self._isprimitive:             # <<<<<<<<<<<<<<
- *                 return self.dtype
+    /* "netCDF4/_netCDF4.pyx":3696
+ *             self.mask = True
+ *         else:
+ *             self.mask = False             # <<<<<<<<<<<<<<
  * 
- */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-
-    /* "netCDF4.pyx":2810
- *                 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;
+    __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":2804
- *     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
+  /* "netCDF4/_netCDF4.pyx":3673
+ *             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.datatype.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable.set_auto_mask", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -39149,1388 +37670,1612 @@ static PyObject *__pyx_pf_7netCDF4_8Variable_8datatype___get__(struct __pyx_obj_
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":2814
- *     property shape:
- *         """find current sizes of all variable dimensions"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             shape = ()
- *             for dimname in self._getdims():
+/* "netCDF4/_netCDF4.pyx":3699
+ * 
+ * 
+ *     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_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_7netCDF4_8Variable_5shape_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_63_put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_62_put[] = "Private method to put data into a netCDF variable";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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("__get__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_8Variable_5shape___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+  __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 = 3699; __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 = 3699; __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 = 3699; __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 = 3699; __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 = 3699; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._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_8_netCDF4_ndarray, 1, "data", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_62_put(((struct __pyx_obj_7netCDF4_8_netCDF4_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_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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_62_put(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  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;
+  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("__get__", 0);
+  __Pyx_RefNannySetupContext("_put", 0);
+  __Pyx_INCREF((PyObject *)__pyx_v_data);
 
-  /* "netCDF4.pyx":2815
- *         """find current sizes of all variable dimensions"""
- *         def __get__(self):
- *             shape = ()             # <<<<<<<<<<<<<<
- *             for dimname in self._getdims():
- *                 # look in current group, and parents for dim.
+  /* "netCDF4/_netCDF4.pyx":3712
+ *         cdef nc_vlen_t *vldata
+ *         # rank of variable.
+ *         ndims = len(self.dimensions)             # <<<<<<<<<<<<<<
+ *         # make sure data is contiguous.
+ *         # if not, make a local copy.
  */
-  __Pyx_INCREF(__pyx_empty_tuple);
-  __pyx_v_shape = __pyx_empty_tuple;
+  __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 = 3712; __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 = 3712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_ndims = __pyx_t_2;
 
-  /* "netCDF4.pyx":2816
- *         def __get__(self):
- *             shape = ()
- *             for dimname in self._getdims():             # <<<<<<<<<<<<<<
- *                 # look in current group, and parents for dim.
- *                 dim = _find_dim(self._grp,dimname)
+  /* "netCDF4/_netCDF4.pyx":3715
+ *         # 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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getdims); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2816; __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);
-    }
-  }
+  __pyx_t_3 = ((!(PyArray_ISCONTIGUOUS(__pyx_v_data) != 0)) != 0);
   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 = 2816; __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 = 2816; __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 = 2816; __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 = 2816; __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 = 2816; __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 = 2816; __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 = 2816; __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 = 2816; __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 = 2816; __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":2818
- *             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
+    /* "netCDF4/_netCDF4.pyx":3716
+ *         # if not, make a local copy.
+ *         if not PyArray_ISCONTIGUOUS(data):
+ *             data = data.copy()             # <<<<<<<<<<<<<<
+ *         # fill up startp,countp,stridep.
+ *         totelem = 1
  */
-    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2818; __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_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 = 3716; __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_3, function);
-        __pyx_t_7 = 1;
+        __Pyx_DECREF_SET(__pyx_t_4, function);
       }
     }
-    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2818; __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;
+    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 = 3716; __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 = 3716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __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 = 2818; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3716; __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":2819
- *                 # look in current group, and parents for dim.
- *                 dim = _find_dim(self._grp,dimname)
- *                 shape = shape + (len(dim),)             # <<<<<<<<<<<<<<
- *             return shape
- *         def __set__(self,value):
+  /* "netCDF4/_netCDF4.pyx":3718
+ *             data = data.copy()
+ *         # fill up startp,countp,stridep.
+ *         totelem = 1             # <<<<<<<<<<<<<<
+ *         negstride = 0
+ *         sl = []
  */
-    __pyx_t_7 = PyObject_Length(__pyx_v_dim); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2819; __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 = 2819; __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 = 2819; __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 = 2819; __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;
+  __pyx_v_totelem = 1;
 
-    /* "netCDF4.pyx":2816
- *         def __get__(self):
- *             shape = ()
- *             for dimname in self._getdims():             # <<<<<<<<<<<<<<
- *                 # look in current group, and parents for dim.
- *                 dim = _find_dim(self._grp,dimname)
+  /* "netCDF4/_netCDF4.pyx":3719
+ *         # fill up startp,countp,stridep.
+ *         totelem = 1
+ *         negstride = 0             # <<<<<<<<<<<<<<
+ *         sl = []
+ *         for n from 0 <= n < ndims:
  */
-  }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_negstride = 0;
 
-  /* "netCDF4.pyx":2820
- *                 dim = _find_dim(self._grp,dimname)
- *                 shape = shape + (len(dim),)
- *             return shape             # <<<<<<<<<<<<<<
- *         def __set__(self,value):
- *             raise AttributeError("shape cannot be altered")
+  /* "netCDF4/_netCDF4.pyx":3720
+ *         totelem = 1
+ *         negstride = 0
+ *         sl = []             # <<<<<<<<<<<<<<
+ *         for n from 0 <= n < ndims:
+ *             count[n] = abs(count[n]) # make -1 into +1
  */
-  __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_shape);
-  __pyx_r = __pyx_v_shape;
-  goto __pyx_L0;
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3720; __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":2814
- *     property shape:
- *         """find current sizes of all variable dimensions"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             shape = ()
- *             for dimname in self._getdims():
+  /* "netCDF4/_netCDF4.pyx":3721
+ *         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 = 3721; __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;
 
-  /* 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":2821
- *                 shape = shape + (len(dim),)
- *             return shape
- *         def __set__(self,value):             # <<<<<<<<<<<<<<
- *             raise AttributeError("shape cannot be altered")
- * 
+    /* "netCDF4/_netCDF4.pyx":3722
+ *         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 = 3722; __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 = 3722; __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 = 3722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-/* 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;
-}
+    /* "netCDF4/_netCDF4.pyx":3723
+ *         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 = 3723; __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 = 3723; __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 = 3723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    (__pyx_v_countp[__pyx_t_2]) = __pyx_t_8;
 
-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/_netCDF4.pyx":3725
+ *             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 = 3725; __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 = 3725; __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 = 3725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_3) {
 
-  /* "netCDF4.pyx":2822
- *             return shape
- *         def __set__(self,value):
- *             raise AttributeError("shape cannot be altered")             # <<<<<<<<<<<<<<
- * 
- *     property size:
+      /* "netCDF4/_netCDF4.pyx":3726
+ *             # 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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__64, NULL); 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_Raise(__pyx_t_1, 0, 0, 0);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_v_negstride = 1;
 
-  /* "netCDF4.pyx":2821
- *                 shape = shape + (len(dim),)
- *             return shape
- *         def __set__(self,value):             # <<<<<<<<<<<<<<
- *             raise AttributeError("shape cannot be altered")
- * 
+      /* "netCDF4/_netCDF4.pyx":3727
+ *             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 = 3727; __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 = 3727; __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 = 3727; __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 = 3727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      (__pyx_v_stridep[__pyx_t_2]) = __pyx_t_9;
 
-  /* 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/_netCDF4.pyx":3728
+ *                 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 = 3728; __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 = 3728; __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 = 3728; __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 = 3728; __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 = 3728; __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 = 3728; __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 = 3728; __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 = 3728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      (__pyx_v_startp[__pyx_t_2]) = __pyx_t_8;
 
-/* "netCDF4.pyx":2826
- *     property size:
- *         """Return the number of stored elements."""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return numpy.prod(self.shape)
- * 
+      /* "netCDF4/_netCDF4.pyx":3729
+ *                 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 = 3729; __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 = 3729; __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 = 3729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-/* 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));
+      /* "netCDF4/_netCDF4.pyx":3730
+ *                 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__66); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L6;
+    }
+    /*else*/ {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":3732
+ *                 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 = 3732; __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 = 3732; __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 = 3732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      (__pyx_v_startp[__pyx_t_2]) = __pyx_t_8;
 
-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/_netCDF4.pyx":3733
+ *             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 = 3733; __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 = 3733; __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 = 3733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      (__pyx_v_stridep[__pyx_t_2]) = __pyx_t_9;
 
-  /* "netCDF4.pyx":2827
- *         """Return the number of stored elements."""
- *         def __get__(self):
- *             return numpy.prod(self.shape)             # <<<<<<<<<<<<<<
- * 
- *     property dimensions:
+      /* "netCDF4/_netCDF4.pyx":3734
+ *                 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_XDECREF(__pyx_r);
-  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2827; __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 = 2827; __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 = 2827; __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);
+      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__67); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-  }
-  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 = 2827; __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 = 2827; __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 = 2827; __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;
+    __pyx_L6:;
 
-  /* "netCDF4.pyx":2826
- *     property size:
- *         """Return the number of stored elements."""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return numpy.prod(self.shape)
- * 
+    /* "netCDF4/_netCDF4.pyx":3735
+ *                 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 = 3735; __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 = 3721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-  /* 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/_netCDF4.pyx":3721
+ *         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 = 3721; __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":2831
- *     property dimensions:
- *         """get variables's dimension names"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._getdims()
- *         def __set__(self,value):
+  /* "netCDF4/_netCDF4.pyx":3738
+ *         # 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);
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":3739
+ *         # 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) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":3740
+ *         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__68, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3740; __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 = 3740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-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/_netCDF4.pyx":3741
+ *         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":2832
- *         """get variables's dimension names"""
- *         def __get__(self):
- *             return self._getdims()             # <<<<<<<<<<<<<<
- *         def __set__(self,value):
- *             raise AttributeError("dimensions cannot be altered")
+    /* "netCDF4/_netCDF4.pyx":3743
+ *         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_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 = 2832; __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);
+    __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 = 3743; __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 = 3743; __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 = 3743; __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 = 3743; __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_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_5));
+    __pyx_t_5 = 0;
+    goto __pyx_L8;
   }
-  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 = 2832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_L8:;
+
+  /* "netCDF4/_netCDF4.pyx":3744
+ *             # 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 = 3744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_12) {
   } else {
-    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __pyx_t_12;
+    goto __pyx_L10_bool_binop_done;
   }
-  __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;
+  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __pyx_t_12;
+  __pyx_L10_bool_binop_done:;
+  if (__pyx_t_3) {
 
-  /* "netCDF4.pyx":2831
- *     property dimensions:
- *         """get variables's dimension names"""
- *         def __get__(self):             # <<<<<<<<<<<<<<
- *             return self._getdims()
- *         def __set__(self,value):
+    /* "netCDF4/_netCDF4.pyx":3748
+ *             # 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 = 3748; __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 = 3748; __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 = 3748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_3) {
 
-  /* 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":2833
- *         def __get__(self):
- *             return self._getdims()
- *         def __set__(self,value):             # <<<<<<<<<<<<<<
- *             raise AttributeError("dimensions cannot be altered")
- * 
+      /* "netCDF4/_netCDF4.pyx":3749
+ *             # 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 = 3749; __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 = 3749; __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 = 3749; __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 = 3749; __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_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3749; __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:;
 
-/* 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":2834
- *             return self._getdims()
- *         def __set__(self,value):
- *             raise AttributeError("dimensions cannot be altered")             # <<<<<<<<<<<<<<
- * 
- * 
+    /* "netCDF4/_netCDF4.pyx":3752
+ *             # 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_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__65, NULL); 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_Raise(__pyx_t_1, 0, 0, 0);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3752; __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 = 3752; __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 = 3752; __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 = 3752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_3) {
 
-  /* "netCDF4.pyx":2833
- *         def __get__(self):
- *             return self._getdims()
- *         def __set__(self,value):             # <<<<<<<<<<<<<<
- *             raise AttributeError("dimensions cannot be altered")
- * 
+      /* "netCDF4/_netCDF4.pyx":3753
+ *             # 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 = 3753; __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 = 3753; __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 = 3753; __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 = 3753; __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__13, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3753; __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) {
 
-  /* 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":2837
- * 
- * 
- *     def group(self):             # <<<<<<<<<<<<<<
- *         """
- * group(self)
+        /* "netCDF4/_netCDF4.pyx":3754
+ *             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 = 3754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3754; __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:;
 
-/* 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":2842
- * 
- * return the group that this L{Variable} is a member of."""
- *         return self._grp             # <<<<<<<<<<<<<<
- * 
- *     def ncattrs(self):
+      /* "netCDF4/_netCDF4.pyx":3755
+ *                 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_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_self->_grp);
-  __pyx_r = __pyx_v_self->_grp;
-  goto __pyx_L0;
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3755; __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 = 3755; __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 = 3755; __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 = 3755; __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__12, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3755; __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":2837
- * 
- * 
- *     def group(self):             # <<<<<<<<<<<<<<
- *         """
- * group(self)
+        /* "netCDF4/_netCDF4.pyx":3756
+ *                     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 = 3756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3756; __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:;
 
-  /* function exit code */
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "netCDF4.pyx":2844
- *         return self._grp
- * 
- *     def ncattrs(self):             # <<<<<<<<<<<<<<
- *         """
- * ncattrs(self)
+    /* "netCDF4/_netCDF4.pyx":3757
+ *                 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 = 3757; __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 = 3757; __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 = 3757; __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 = 3757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_3) {
 
-/* 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;
-}
+      /* "netCDF4/_netCDF4.pyx":3758
+ *                     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 = 3758; __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 = 3758; __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 = 3758; __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 = 3758; __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__33, Py_NE)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3758; __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__34, Py_NE)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3758; __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) {
 
-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/_netCDF4.pyx":3759
+ *             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 = 3759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3759; __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":2849
- * 
- * return netCDF attribute names for this L{Variable} in a list."""
- *         return _get_att_names(self._grpid, self._varid)             # <<<<<<<<<<<<<<
- * 
- *     def setncattr(self,name,value):
+      /* "netCDF4/_netCDF4.pyx":3760
+ *                 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_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 = 2849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3760; __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 = 3760; __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 = 3760; __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 = 3760; __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__33, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3760; __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":2844
- *         return self._grp
- * 
- *     def ncattrs(self):             # <<<<<<<<<<<<<<
- *         """
- * ncattrs(self)
+        /* "netCDF4/_netCDF4.pyx":3761
+ *                     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 = 3761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3761; __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:;
 
-  /* 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/_netCDF4.pyx":3762
+ *                 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 = 3762; __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 = 3762; __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 = 3762; __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 = 3762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_3) {
 
-/* "netCDF4.pyx":2851
- *         return _get_att_names(self._grpid, self._varid)
- * 
- *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
- *         """
- * setncattr(self,name,value)
+      /* "netCDF4/_netCDF4.pyx":3763
+ *                     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 = 3763; __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 = 3763; __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 = 3763; __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 = 3763; __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__33, Py_NE)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3763; __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__34, Py_NE)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3763; __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) {
 
-/* 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;
+        /* "netCDF4/_netCDF4.pyx":3764
+ *             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 = 3764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3764; __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;
       }
-      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 = 2851; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
-        }
+      __pyx_L30:;
+
+      /* "netCDF4/_netCDF4.pyx":3765
+ *                 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 = 3765; __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 = 3765; __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;
       }
-      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 = 2851; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      __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 = 3765; __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 = 3765; __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__33, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3765; __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/_netCDF4.pyx":3766
+ *                     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 = 3766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_5);
+        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3766; __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;
       }
-    } 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_L35:;
+      goto __pyx_L29;
     }
-    __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 = 2851; __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);
+    __pyx_L29:;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":3768
+ *                     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 = 3768; __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 = 3768; __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 = 3768; __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 = 3768; __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 = 3768; __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) {
 
-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/_netCDF4.pyx":3769
+ *             # 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":2858
- * 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()
+      /* "netCDF4/_netCDF4.pyx":3772
+ *                                    startp, countp, data.data)
+ *             else:
+ *                 ierr = nc_put_vars(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                    startp, countp, stridep, data.data)
+ *             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 = 2858; __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 = 2858; __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 = 2858; __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);
-      }
+      __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);
     }
-    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 = 2858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L38:;
+
+    /* "netCDF4/_netCDF4.pyx":3774
+ *                 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/_netCDF4.pyx":3775
+ *                                    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 = 3775; __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 = 3775; __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 = 3775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
       __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 = 2858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
+    goto __pyx_L9;
+  }
+
+  /* "netCDF4/_netCDF4.pyx":3776
+ *             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 = 3776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_3) {
+
+    /* "netCDF4/_netCDF4.pyx":3777
+ *                 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 = 3777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __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 = 3777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
+    __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 = 3777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_3) {
 
-  /* "netCDF4.pyx":2859
- * 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()
- * 
+      /* "netCDF4/_netCDF4.pyx":3778
+ *         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_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 = 2859; __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;
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__75, NULL); 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);
+      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-  /* "netCDF4.pyx":2860
- *         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):
+    /* "netCDF4/_netCDF4.pyx":3780
+ *                 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_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 = 2860; __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 = 2860; __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 = 2860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __pyx_t_4 = NULL;
+    __pyx_t_5 = 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)) {
+      __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_4);
+        __Pyx_INCREF(__pyx_t_5);
         __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 = 2860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    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 = 3780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     } else {
-      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __Pyx_GOTREF(__pyx_t_3);
+    __Pyx_GOTREF(__pyx_t_4);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    goto __pyx_L4;
-  }
-  __pyx_L4:;
+    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7netCDF4_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_4));
+    __pyx_t_4 = 0;
 
-  /* "netCDF4.pyx":2851
- *         return _get_att_names(self._grpid, self._varid)
- * 
- *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
- *         """
- * setncattr(self,name,value)
+    /* "netCDF4/_netCDF4.pyx":3781
+ *             # 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 = 3781; __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 = 3781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_3) {
 
-  /* 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/_netCDF4.pyx":3783
+ *             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 = 3783; __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 = 3783; __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 = 3783; __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 = 3783; __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 = 3783; __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 = 3783; __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 = 3783; __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 = 3783; __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 = 3783; __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 = 3783; __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 = 3783; __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":2862
- *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
- * 
- *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
- *         """
- * setncatts(self,attdict)
+        /* "netCDF4/_netCDF4.pyx":3784
+ *                 # 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 = 3784; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_5 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3784; __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 = 3784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-/* 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));
+        /* "netCDF4/_netCDF4.pyx":3783
+ *             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;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":3789
+ *                 # 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)));
 
-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/_netCDF4.pyx":3790
+ *                 # 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":2870
- * 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)
+        /* "netCDF4/_netCDF4.pyx":3791
+ *                 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_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 = 2870; __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 = 2870; __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 = 2870; __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);
+        __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 = 3791; __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 = 3791; __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;
       }
-    }
-    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 = 2870; __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 = 2870; __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":2871
- * 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()
+      /* "netCDF4/_netCDF4.pyx":3793
+ *                     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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attdict, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2871; __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 = 2871; __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 = 2871; __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 = 2871; __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 = 2871; __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 = 2871; __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 = 2871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        #endif
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3793; __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 = 3793; __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 = 3793; __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 = 3793; __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 = 3793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      if (!__pyx_t_12) {
       } 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 = 2871; __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 = 2871; __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 = 2871; __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 = 2871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_3 = __pyx_t_12;
+        goto __pyx_L49_bool_binop_done;
       }
-      #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_t_12 = ((__pyx_v_ndims == 0) != 0);
+      __pyx_t_3 = __pyx_t_12;
+      __pyx_L49_bool_binop_done:;
+      if (__pyx_t_3) {
+
+        /* "netCDF4/_netCDF4.pyx":3794
+ *                 # 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;
       }
-      __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 = 2871; __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 = 2871; __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 = 2871; __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 = 2871; __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 = 2871; __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;
+      /*else*/ {
 
-    /* "netCDF4.pyx":2872
- *         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()
- * 
+        /* "netCDF4/_netCDF4.pyx":3797
+ *                                        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_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 = 2872; __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;
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3797; __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 = 3797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L48:;
 
-    /* "netCDF4.pyx":2871
- * 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()
+      /* "netCDF4/_netCDF4.pyx":3800
+ *                     #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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
 
-  /* "netCDF4.pyx":2873
- *         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):
+        /* "netCDF4/_netCDF4.pyx":3801
+ *                     #                   startp, countp, stridep, strdata)
+ *                 if ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *                 free(strdata)
+ *             else:
  */
-  __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 = 2873; __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 = 2873; __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 = 2873; __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_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 = 3801; __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 = 3801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
         __Pyx_INCREF(__pyx_t_1);
-        __Pyx_INCREF(function);
-        __Pyx_DECREF_SET(__pyx_t_7, function);
+        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 = 3801; __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 = 3801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-    }
-    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 = 2873; __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 = 2873; __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":2862
- *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
- * 
- *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
- *         """
- * setncatts(self,attdict)
+      /* "netCDF4/_netCDF4.pyx":3802
+ *                 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*/ {
 
-  /* 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":2875
- *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
- * 
- *     def getncattr(self,name):             # <<<<<<<<<<<<<<
- *         """
- * getncattr(self,name)
+      /* "netCDF4/_netCDF4.pyx":3807
+ *                 # 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;
 
-/* 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":2882
- * 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):
+      /* "netCDF4/_netCDF4.pyx":3809
+ *                 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_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 = 2882; __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;
+      __pyx_v_vldata = ((nc_vlen_t *)malloc((((size_t)__pyx_v_totelem) * (sizeof(nc_vlen_t)))));
 
-  /* "netCDF4.pyx":2875
- *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
- * 
- *     def getncattr(self,name):             # <<<<<<<<<<<<<<
- *         """
- * getncattr(self,name)
+      /* "netCDF4/_netCDF4.pyx":3810
+ *                 # 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++) {
 
-  /* 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":2884
- *         return _get_att(self._grp, self._varid, name)
- * 
- *     def delncattr(self, name):             # <<<<<<<<<<<<<<
- *         """
- * delncattr(self,name,value)
+        /* "netCDF4/_netCDF4.pyx":3811
+ *                 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]);
 
-/* 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;
-}
+        /* "netCDF4/_netCDF4.pyx":3812
+ *                 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;
 
-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/_netCDF4.pyx":3813
+ *                     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 = 3813; __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 = 3813; __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__77, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3813; __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 = 3813; __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 = 3813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        if (__pyx_t_3) {
 
-  /* "netCDF4.pyx":2892
- * attributes."""
- *         cdef char *attname
- *         bytestr = _strencode(name)             # <<<<<<<<<<<<<<
- *         attname = bytestr
- *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
+          /* "netCDF4/_netCDF4.pyx":3816
+ *                         #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_1 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_bytestr = __pyx_t_1;
-  __pyx_t_1 = 0;
+          __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 = 3816; __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 = 3816; __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 = 3816; __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 = 3816; __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 = 3816; __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 = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
 
-  /* "netCDF4.pyx":2893
- *         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)
+        /* "netCDF4/_netCDF4.pyx":3817
+ *                         # 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_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_attname = __pyx_t_2;
+        (__pyx_v_vldata[__pyx_v_i]).len = PyArray_SIZE(__pyx_v_dataarr);
 
-  /* "netCDF4.pyx":2894
- *         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()
+        /* "netCDF4/_netCDF4.pyx":3818
+ *                         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_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 = 2894; __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 = 2894; __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 = 2894; __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);
+        __pyx_t_14 = __pyx_v_dataarr->data;
+        (__pyx_v_vldata[__pyx_v_i]).p = __pyx_t_14;
+
+        /* "netCDF4/_netCDF4.pyx":3819
+ *                     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]));
       }
-    }
-    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 = 2894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+      /* "netCDF4/_netCDF4.pyx":3821
+ *                     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 = 3821; __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 = 3821; __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 = 3821; __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 = 3821; __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 = 3821; __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 = 2894; __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:;
+      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":2895
- *         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:
+        /* "netCDF4/_netCDF4.pyx":3822
+ *                 # 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_del_att(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_attname);
+        __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":2896
- *         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'))
+        /* "netCDF4/_netCDF4.pyx":3825
+ *                                        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_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 = 2896; __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 = 2896; __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 = 2896; __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);
+        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3825; __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 = 3825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-    }
-    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 = 2896; __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 = 2896; __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:;
+      __pyx_L55:;
 
-  /* "netCDF4.pyx":2897
- *         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'))
- * 
+      /* "netCDF4/_netCDF4.pyx":3828
+ *                     #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) {
+      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_3) {
 
-    /* "netCDF4.pyx":2898
- *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+        /* "netCDF4/_netCDF4.pyx":3829
+ *                     #                   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 = 3829; __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 = 3829; __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 = 3829; __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 = 3829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4/_netCDF4.pyx":3831
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *                 # free the pointer array.
+ *                 free(vldata)             # <<<<<<<<<<<<<<
  * 
- *     def filters(self):
+ *     def _get(self,start,count,stride):
  */
-    __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 = 2898; __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 = 2898; __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 = 2898; __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 = 2898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      free(__pyx_v_vldata);
+    }
+    __pyx_L43:;
+    goto __pyx_L9;
   }
+  __pyx_L9:;
 
-  /* "netCDF4.pyx":2884
- *         return _get_att(self._grp, self._varid, name)
+  /* "netCDF4/_netCDF4.pyx":3699
  * 
- *     def delncattr(self, name):             # <<<<<<<<<<<<<<
- *         """
- * delncattr(self,name,value)
+ * 
+ *     def _put(self,ndarray data,start,count,stride):             # <<<<<<<<<<<<<<
+ *         """Private method to put data into a netCDF variable"""
+ *         cdef int ierr, ndims
  */
 
   /* function exit code */
@@ -40540,9397 +39285,8477 @@ static PyObject *__pyx_pf_7netCDF4_8Variable_22delncattr(struct __pyx_obj_7netCD
   __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_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_bytestr);
+  __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":2900
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+/* "netCDF4/_netCDF4.pyx":3833
+ *                 free(vldata)
  * 
- *     def filters(self):             # <<<<<<<<<<<<<<
- *         """
- * filters(self)
+ *     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_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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_65_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_8Variable_64_get[] = "Private method to retrieve data from a netCDF variable";
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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("filters (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_8Variable_24filters(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+  __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 = 3833; __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 = 3833; __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 = 3833; __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 = 3833; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_64_get(((struct __pyx_obj_7netCDF4_8_netCDF4_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_24filters(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_64_get(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_count, PyObject *__pyx_v_stride) {
   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;
+  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;
-  int __pyx_t_2;
-  int __pyx_t_3;
-  char *__pyx_t_4;
-  PyObject *__pyx_t_5 = 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("filters", 0);
+  __Pyx_RefNannySetupContext("_get", 0);
 
-  /* "netCDF4.pyx":2906
- * 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
- *         with nogil:
+  /* "netCDF4/_netCDF4.pyx":3846
+ *         # 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_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2906; __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 = 2906; __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 = 2906; __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 = 2906; __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 = 2906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_filtdict = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
+  __Pyx_INCREF(__pyx_empty_tuple);
+  __pyx_v_shapeout = __pyx_empty_tuple;
 
-  /* "netCDF4.pyx":2907
- *         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             # <<<<<<<<<<<<<<
- *         with nogil:
- *             ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
+  /* "netCDF4/_netCDF4.pyx":3847
+ *         # should be 'squeezed' to remove the singleton dimension.
+ *         shapeout = ()
+ *         squeeze_out = False             # <<<<<<<<<<<<<<
+ *         for lendim in count:
+ *             if lendim == -1:
  */
-  __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 = 2907; __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 = 2907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_3) {
+  __pyx_v_squeeze_out = 0;
+
+  /* "netCDF4/_netCDF4.pyx":3848
+ *         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 = __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 = 2907; __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;
+    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3848; __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 = 3848; __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 = 3848; __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 = 3848; __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 = 3848; __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 = 3848; __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 = 3848; __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":2908
- *         filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False}
- *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
- *         if ierr != NC_NOERR:
+    /* "netCDF4/_netCDF4.pyx":3849
+ *         squeeze_out = False
+ *         for lendim in count:
+ *             if lendim == -1:             # <<<<<<<<<<<<<<
+ *                 shapeout = shapeout + (1,)
+ *                 squeeze_out = True
  */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
+    __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 = 3849; __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 = 3849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_5) {
 
-        /* "netCDF4.pyx":2909
- *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
- *         with nogil:
- *             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'))
+      /* "netCDF4/_netCDF4.pyx":3850
+ *         for lendim in count:
+ *             if lendim == -1:
+ *                 shapeout = shapeout + (1,)             # <<<<<<<<<<<<<<
+ *                 squeeze_out = True
+ *             else:
  */
-        __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));
-      }
+      __pyx_t_4 = PyNumber_Add(__pyx_v_shapeout, __pyx_tuple__79); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3850; __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":2908
- *         filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False}
- *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
- *         if ierr != NC_NOERR:
+      /* "netCDF4/_netCDF4.pyx":3851
+ *             if lendim == -1:
+ *                 shapeout = shapeout + (1,)
+ *                 squeeze_out = True             # <<<<<<<<<<<<<<
+ *             else:
+ *                 shapeout = shapeout + (lendim,)
  */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L8;
-        }
-        __pyx_L8:;
-      }
-  }
+      __pyx_v_squeeze_out = 1;
+      goto __pyx_L5;
+    }
+    /*else*/ {
 
-  /* "netCDF4.pyx":2910
- *         with nogil:
- *             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'))
- *         with nogil:
+      /* "netCDF4/_netCDF4.pyx":3853
+ *                 squeeze_out = True
+ *             else:
+ *                 shapeout = shapeout + (lendim,)             # <<<<<<<<<<<<<<
+ *         # rank of variable.
+ *         ndims = len(self.dimensions)
  */
-  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_3) {
-
-    /* "netCDF4.pyx":2911
- *             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'))             # <<<<<<<<<<<<<<
- *         with nogil:
- *             ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
+      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3853; __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 = 3853; __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/_netCDF4.pyx":3848
+ *         shapeout = ()
+ *         squeeze_out = False
+ *         for lendim in count:             # <<<<<<<<<<<<<<
+ *             if lendim == -1:
+ *                 shapeout = shapeout + (1,)
  */
-    __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 = 2911; __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 = 2911; __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 = 2911; __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 = 2911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":2912
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
- *         if ierr != NC_NOERR:
+  /* "netCDF4/_netCDF4.pyx":3855
+ *                 shapeout = shapeout + (lendim,)
+ *         # rank of variable.
+ *         ndims = len(self.dimensions)             # <<<<<<<<<<<<<<
+ *         # fill up startp,countp,stridep.
+ *         negstride = 0
  */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
+  __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 = 3855; __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 = 3855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_ndims = __pyx_t_2;
 
-        /* "netCDF4.pyx":2913
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         with nogil:
- *             ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)             # <<<<<<<<<<<<<<
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+  /* "netCDF4/_netCDF4.pyx":3857
+ *         ndims = len(self.dimensions)
+ *         # fill up startp,countp,stridep.
+ *         negstride = 0             # <<<<<<<<<<<<<<
+ *         sl = []
+ *         for n from 0 <= n < ndims:
  */
-        __pyx_v_ierr = nc_inq_var_fletcher32(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_ifletcher32));
-      }
+  __pyx_v_negstride = 0;
 
-      /* "netCDF4.pyx":2912
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
- *         if ierr != NC_NOERR:
+  /* "netCDF4/_netCDF4.pyx":3858
+ *         # fill up startp,countp,stridep.
+ *         negstride = 0
+ *         sl = []             # <<<<<<<<<<<<<<
+ *         for n from 0 <= n < ndims:
+ *             count[n] = abs(count[n]) # make -1 into +1
  */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L12;
-        }
-        __pyx_L12:;
-      }
-  }
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3858; __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":2914
- *         with nogil:
- *             ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
- *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         if ideflate:
+  /* "netCDF4/_netCDF4.pyx":3859
+ *         negstride = 0
+ *         sl = []
+ *         for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
+ *             count[n] = abs(count[n]) # make -1 into +1
+ *             countp[n] = count[n]
  */
-  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_3) {
+  __pyx_t_7 = __pyx_v_ndims;
+  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_7; __pyx_v_n++) {
 
-    /* "netCDF4.pyx":2915
- *             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
+    /* "netCDF4/_netCDF4.pyx":3860
+ *         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_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 = 2915; __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 = 2915; __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 = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3860; __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_t_6 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-
-  /* "netCDF4.pyx":2916
- *         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) {
+    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 = 3860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-    /* "netCDF4.pyx":2917
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         if ideflate:
- *             filtdict['zlib']=True             # <<<<<<<<<<<<<<
- *             filtdict['complevel']=ideflate_level
- *         if ishuffle:
+    /* "netCDF4/_netCDF4.pyx":3861
+ *         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:
  */
-    if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_zlib, Py_True) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3861; __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 = 3861; __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":2918
- *         if ideflate:
- *             filtdict['zlib']=True
- *             filtdict['complevel']=ideflate_level             # <<<<<<<<<<<<<<
- *         if ishuffle:
- *             filtdict['shuffle']=True
+    /* "netCDF4/_netCDF4.pyx":3863
+ *             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_1 = __Pyx_PyInt_From_int(__pyx_v_ideflate_level); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2918; __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 = 2918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 3863; __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 = 3863; __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 = 3863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    goto __pyx_L14;
-  }
-  __pyx_L14:;
+    if (__pyx_t_5) {
 
-  /* "netCDF4.pyx":2919
- *             filtdict['zlib']=True
- *             filtdict['complevel']=ideflate_level
- *         if ishuffle:             # <<<<<<<<<<<<<<
- *             filtdict['shuffle']=True
- *         if ifletcher32:
+      /* "netCDF4/_netCDF4.pyx":3864
+ *             # 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_t_3 = (__pyx_v_ishuffle != 0);
-  if (__pyx_t_3) {
+      __pyx_v_negstride = 1;
 
-    /* "netCDF4.pyx":2920
- *             filtdict['complevel']=ideflate_level
- *         if ishuffle:
- *             filtdict['shuffle']=True             # <<<<<<<<<<<<<<
- *         if ifletcher32:
- *             filtdict['fletcher32']=True
+      /* "netCDF4/_netCDF4.pyx":3865
+ *             if stride[n] < 0:
+ *                 negstride = 1
+ *                 stridep[n] = -stride[n]             # <<<<<<<<<<<<<<
+ *                 startp[n] = start[n]+stride[n]*(count[n]-1)
+ *                 stride[n] = -stride[n]
  */
-    if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_shuffle, Py_True) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L15;
-  }
-  __pyx_L15:;
+      __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 = 3865; __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 = 3865; __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 = 3865; __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":2921
- *         if ishuffle:
- *             filtdict['shuffle']=True
- *         if ifletcher32:             # <<<<<<<<<<<<<<
- *             filtdict['fletcher32']=True
- *         return filtdict
+      /* "netCDF4/_netCDF4.pyx":3866
+ *                 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_3 = (__pyx_v_ifletcher32 != 0);
-  if (__pyx_t_3) {
+      __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 = 3866; __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 = 3866; __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 = 3866; __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 = 3866; __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 = 3866; __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 = 3866; __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 = 3866; __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":2922
- *             filtdict['shuffle']=True
- *         if ifletcher32:
- *             filtdict['fletcher32']=True             # <<<<<<<<<<<<<<
- *         return filtdict
- * 
+      /* "netCDF4/_netCDF4.pyx":3867
+ *                 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:
  */
-    if (unlikely(PyDict_SetItem(__pyx_v_filtdict, __pyx_n_s_fletcher32, Py_True) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    goto __pyx_L16;
-  }
-  __pyx_L16:;
+      __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 = 3867; __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 = 3867; __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 = 3867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-  /* "netCDF4.pyx":2923
- *         if ifletcher32:
- *             filtdict['fletcher32']=True
- *         return filtdict             # <<<<<<<<<<<<<<
- * 
- *     def endian(self):
+      /* "netCDF4/_netCDF4.pyx":3868
+ *                 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_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_filtdict);
-  __pyx_r = __pyx_v_filtdict;
-  goto __pyx_L0;
+      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__80); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L8;
+    }
+    /*else*/ {
 
-  /* "netCDF4.pyx":2900
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- * 
- *     def filters(self):             # <<<<<<<<<<<<<<
- *         """
- * filters(self)
+      /* "netCDF4/_netCDF4.pyx":3870
+ *                 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 = 3870; __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 = 3870; __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;
 
-  /* 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":2925
- *         return filtdict
- * 
- *     def endian(self):             # <<<<<<<<<<<<<<
- *         """
- * endian(self)
+      /* "netCDF4/_netCDF4.pyx":3871
+ *             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 = 3871; __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 = 3871; __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;
 
-/* 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":2931
- * 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'
- *         with nogil:
+      /* "netCDF4/_netCDF4.pyx":3872
+ *                 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_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 = 2931; __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 = 2931; __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_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__81); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __pyx_L8:;
   }
-  __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 = 2931; __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":2932
- *         cdef int ierr, iendian
- *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
- *             return 'native'             # <<<<<<<<<<<<<<
- *         with nogil:
- *             ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
+  /* "netCDF4/_netCDF4.pyx":3873
+ *                 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_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_n_s_native);
-    __pyx_r = __pyx_n_s_native;
-    goto __pyx_L0;
+  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3873; __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 = 3873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __pyx_t_12;
+  __pyx_L10_bool_binop_done:;
+  if (__pyx_t_5) {
 
-  /* "netCDF4.pyx":2933
- *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
- *             return 'native'
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
- *         if ierr != NC_NOERR:
+    /* "netCDF4/_netCDF4.pyx":3874
+ *                 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:
  */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
+    __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __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 = 3874; __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 = 3874; __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 = 3874; __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_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_data = ((PyArrayObject *)__pyx_t_4);
+    __pyx_t_4 = 0;
 
-        /* "netCDF4.pyx":2934
- *             return 'native'
- *         with nogil:
- *             ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)             # <<<<<<<<<<<<<<
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    /* "netCDF4/_netCDF4.pyx":3876
+ *             data = numpy.empty(shapeout, self.dtype)
+ *             # strides all 1 or scalar variable, use get_vara (faster)
+ *             if sum(stride) == ndims or ndims == 0:             # <<<<<<<<<<<<<<
+ *                 with nogil:
+ *                     ierr = nc_get_vara(self._grpid, self._varid,
  */
-        __pyx_v_ierr = nc_inq_var_endian(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_iendian));
-      }
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3876; __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 = 3876; __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 = 3876; __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 = 3876; __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 = 3876; __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":2933
- *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
- *             return 'native'
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
- *         if ierr != NC_NOERR:
+      /* "netCDF4/_netCDF4.pyx":3877
+ *             # strides all 1 or scalar variable, use get_vara (faster)
+ *             if sum(stride) == ndims or ndims == 0:
+ *                 with nogil:             # <<<<<<<<<<<<<<
+ *                     ierr = nc_get_vara(self._grpid, self._varid,
+ *                                        startp, countp, data.data)
  */
-      /*finally:*/ {
-        /*normal exit:*/{
+      {
           #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
           #endif
-          goto __pyx_L8;
-        }
-        __pyx_L8:;
-      }
-  }
+          /*try:*/ {
 
-  /* "netCDF4.pyx":2935
- *         with nogil:
- *             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:
+            /* "netCDF4/_netCDF4.pyx":3878
+ *             if sum(stride) == ndims or ndims == 0:
+ *                 with nogil:
+ *                     ierr = nc_get_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                        startp, countp, data.data)
+ *             else:
  */
-  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_3) {
+            __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_data->data);
+          }
 
-    /* "netCDF4.pyx":2936
- *             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'
+          /* "netCDF4/_netCDF4.pyx":3877
+ *             # strides all 1 or scalar variable, use get_vara (faster)
+ *             if sum(stride) == ndims or ndims == 0:
+ *                 with nogil:             # <<<<<<<<<<<<<<
+ *                     ierr = nc_get_vara(self._grpid, self._varid,
+ *                                        startp, countp, data.data)
  */
-    __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 = 2936; __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 = 2936; __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 = 2936; __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 = 2936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L17;
+            }
+            __pyx_L17:;
+          }
+      }
+      goto __pyx_L12;
+    }
+    /*else*/ {
 
-  /* "netCDF4.pyx":2939
- *         if iendian == NC_ENDIAN_LITTLE:
- *             return 'little'
- *         elif iendian == NC_ENDIAN_BIG:             # <<<<<<<<<<<<<<
- *             return 'big'
- *         else:
- */
-  switch (__pyx_v_iendian) {
-
-    /* "netCDF4.pyx":2937
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         if iendian == NC_ENDIAN_LITTLE:             # <<<<<<<<<<<<<<
- *             return 'little'
- *         elif iendian == NC_ENDIAN_BIG:
+      /* "netCDF4/_netCDF4.pyx":3881
+ *                                        startp, countp, data.data)
+ *             else:
+ *                 with nogil:             # <<<<<<<<<<<<<<
+ *                     ierr = nc_get_vars(self._grpid, self._varid,
+ *                                        startp, countp, stridep, data.data)
  */
-    case NC_ENDIAN_LITTLE:
+      {
+          #ifdef WITH_THREAD
+          PyThreadState *_save;
+          Py_UNBLOCK_THREADS
+          #endif
+          /*try:*/ {
 
-    /* "netCDF4.pyx":2938
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         if iendian == NC_ENDIAN_LITTLE:
- *             return 'little'             # <<<<<<<<<<<<<<
- *         elif iendian == NC_ENDIAN_BIG:
- *             return 'big'
+            /* "netCDF4/_netCDF4.pyx":3882
+ *             else:
+ *                 with nogil:
+ *                     ierr = nc_get_vars(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                        startp, countp, stridep, data.data)
+ *             if ierr == NC_EINVALCOORDS:
  */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_n_s_little);
-    __pyx_r = __pyx_n_s_little;
-    goto __pyx_L0;
-    break;
+            __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);
+          }
 
-    /* "netCDF4.pyx":2939
- *         if iendian == NC_ENDIAN_LITTLE:
- *             return 'little'
- *         elif iendian == NC_ENDIAN_BIG:             # <<<<<<<<<<<<<<
- *             return 'big'
- *         else:
+          /* "netCDF4/_netCDF4.pyx":3881
+ *                                        startp, countp, data.data)
+ *             else:
+ *                 with nogil:             # <<<<<<<<<<<<<<
+ *                     ierr = nc_get_vars(self._grpid, self._varid,
+ *                                        startp, countp, stridep, data.data)
  */
-    case NC_ENDIAN_BIG:
+          /*finally:*/ {
+            /*normal exit:*/{
+              #ifdef WITH_THREAD
+              Py_BLOCK_THREADS
+              #endif
+              goto __pyx_L20;
+            }
+            __pyx_L20:;
+          }
+      }
+    }
+    __pyx_L12:;
 
-    /* "netCDF4.pyx":2940
- *             return 'little'
- *         elif iendian == NC_ENDIAN_BIG:
- *             return 'big'             # <<<<<<<<<<<<<<
- *         else:
- *             return 'native'
+    /* "netCDF4/_netCDF4.pyx":3884
+ *                     ierr = nc_get_vars(self._grpid, self._varid,
+ *                                        startp, countp, stridep, data.data)
+ *             if ierr == NC_EINVALCOORDS:             # <<<<<<<<<<<<<<
+ *                 raise IndexError
+ *             elif ierr != NC_NOERR:
  */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_n_s_big);
-    __pyx_r = __pyx_n_s_big;
-    goto __pyx_L0;
-    break;
-    default:
+    __pyx_t_5 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0);
+    if (__pyx_t_5) {
 
-    /* "netCDF4.pyx":2942
- *             return 'big'
- *         else:
- *             return 'native'             # <<<<<<<<<<<<<<
- * 
- *     def chunking(self):
+      /* "netCDF4/_netCDF4.pyx":3885
+ *                                        startp, countp, stridep, data.data)
+ *             if ierr == NC_EINVALCOORDS:
+ *                 raise IndexError             # <<<<<<<<<<<<<<
+ *             elif ierr != NC_NOERR:
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-    __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_n_s_native);
-    __pyx_r = __pyx_n_s_native;
-    goto __pyx_L0;
-    break;
-  }
+      __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-  /* "netCDF4.pyx":2925
- *         return filtdict
- * 
- *     def endian(self):             # <<<<<<<<<<<<<<
- *         """
- * endian(self)
+    /* "netCDF4/_netCDF4.pyx":3886
+ *             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) {
 
-  /* 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":2944
- *             return 'native'
- * 
- *     def chunking(self):             # <<<<<<<<<<<<<<
- *         """
- * chunking(self)
+      /* "netCDF4/_netCDF4.pyx":3887
+ *                 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 = 3887; __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 = 3887; __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 = 3887; __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 = 3887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    goto __pyx_L9;
+  }
 
-/* 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;
-}
+  /* "netCDF4/_netCDF4.pyx":3888
+ *             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 = 3888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_t_5) {
 
-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/_netCDF4.pyx":3890
+ *         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 = 3890; __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 = 3890; __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 = 3890; __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 = 3890; __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_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_data = ((PyArrayObject *)__pyx_t_1);
+    __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":2954
- *         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)
+    /* "netCDF4/_netCDF4.pyx":3892
+ *             data = numpy.empty(shapeout, 'O')
+ *             # flatten data array.
+ *             data = data.flatten()             # <<<<<<<<<<<<<<
+ *             totelem = PyArray_SIZE(data)
+ *             if self.dtype == str:
  */
-  __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 = 2954; __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 = 2954; __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 = 2954; __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;
-  }
+    __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 = 3892; __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 = 3892; __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 = 3892; __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_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_1));
+    __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":2955
- *         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)
- *         with nogil:
+    /* "netCDF4/_netCDF4.pyx":3893
+ *             # flatten data array.
+ *             data = data.flatten()
+ *             totelem = PyArray_SIZE(data)             # <<<<<<<<<<<<<<
+ *             if self.dtype == str:
+ *                 # vlen string (NC_STRING)
  */
-  __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 = 2955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_ndims = __pyx_t_4;
+    __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 = 3893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_v_totelem = __pyx_t_1;
+    __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":2956
- *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None
- *         ndims = self.ndim
- *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)             # <<<<<<<<<<<<<<
- *         with nogil:
- *             ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
+    /* "netCDF4/_netCDF4.pyx":3894
+ *             data = data.flatten()
+ *             totelem = PyArray_SIZE(data)
+ *             if self.dtype == str:             # <<<<<<<<<<<<<<
+ *                 # vlen string (NC_STRING)
+ *                 # allocate pointer array to hold string data.
  */
-  __pyx_v_chunksizesp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims)));
+    __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 = 3894; __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 = 3894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_5) {
 
-  /* "netCDF4.pyx":2957
- *         ndims = self.ndim
- *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
- *         if ierr != NC_NOERR:
+      /* "netCDF4/_netCDF4.pyx":3897
+ *                 # 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:
  */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
+      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(char *))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __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 = 3897; __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 = 3897; __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":2958
- *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
- *         with nogil:
- *             ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)             # <<<<<<<<<<<<<<
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+      /* "netCDF4/_netCDF4.pyx":3899
+ *                 strdata = <char **>malloc(sizeof(char *) * totelem)
+ *                 # strides all 1 or scalar variable, use get_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:             # <<<<<<<<<<<<<<
+ *                     with nogil:
+ *                         ierr = nc_get_vara(self._grpid, self._varid,
  */
-        __pyx_v_ierr = nc_inq_var_chunking(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_icontiguous), __pyx_v_chunksizesp);
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3899; __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 = 3899; __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 = 3899; __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 = 3899; __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 = 3899; __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_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":2957
- *         ndims = self.ndim
- *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
- *         if ierr != NC_NOERR:
+        /* "netCDF4/_netCDF4.pyx":3900
+ *                 # strides all 1 or scalar variable, use get_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:
+ *                     with nogil:             # <<<<<<<<<<<<<<
+ *                         ierr = nc_get_vara(self._grpid, self._varid,
+ *                                            startp, countp, strdata)
  */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L8;
-        }
-        __pyx_L8:;
-      }
-  }
+        {
+            #ifdef WITH_THREAD
+            PyThreadState *_save;
+            Py_UNBLOCK_THREADS
+            #endif
+            /*try:*/ {
 
-  /* "netCDF4.pyx":2959
- *         with nogil:
- *             ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
- *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         chunksizes=[]
+              /* "netCDF4/_netCDF4.pyx":3901
+ *                 if sum(stride) == ndims or ndims == 0:
+ *                     with nogil:
+ *                         ierr = nc_get_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
+ *                                            startp, countp, strdata)
+ *                 else:
  */
-  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-  if (__pyx_t_3) {
+              __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_strdata);
+            }
 
-    /* "netCDF4.pyx":2960
- *             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:
+            /* "netCDF4/_netCDF4.pyx":3900
+ *                 # strides all 1 or scalar variable, use get_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:
+ *                     with nogil:             # <<<<<<<<<<<<<<
+ *                         ierr = nc_get_vara(self._grpid, self._varid,
+ *                                            startp, countp, strdata)
  */
-    __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 = 2960; __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 = 2960; __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 = 2960; __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 = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+            /*finally:*/ {
+              /*normal exit:*/{
+                #ifdef WITH_THREAD
+                Py_BLOCK_THREADS
+                #endif
+                goto __pyx_L28;
+              }
+              __pyx_L28:;
+            }
+        }
+        goto __pyx_L23;
+      }
+      /*else*/ {
 
-  /* "netCDF4.pyx":2961
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         chunksizes=[]             # <<<<<<<<<<<<<<
- *         for n from 0 <= n < ndims:
- *             chunksizes.append(chunksizesp[n])
+        /* "netCDF4/_netCDF4.pyx":3905
+ *                 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_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_chunksizes = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
+        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3905; __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 = 3905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L23:;
 
-  /* "netCDF4.pyx":2962
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         chunksizes=[]
- *         for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
- *             chunksizes.append(chunksizesp[n])
- *         free(chunksizesp)
+      /* "netCDF4/_netCDF4.pyx":3908
+ *                     #ierr = nc_get_vars(self._grpid, self._varid,
+ *                     #                   startp, countp, stridep, strdata)
+ *                 if ierr == NC_EINVALCOORDS:             # <<<<<<<<<<<<<<
+ *                     raise IndexError
+ *                 elif ierr != NC_NOERR:
  */
-  __pyx_t_4 = __pyx_v_ndims;
-  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {
+      __pyx_t_5 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0);
+      if (__pyx_t_5) {
 
-    /* "netCDF4.pyx":2963
- *         chunksizes=[]
- *         for n from 0 <= n < ndims:
- *             chunksizes.append(chunksizesp[n])             # <<<<<<<<<<<<<<
- *         free(chunksizesp)
- *         if icontiguous:
+        /* "netCDF4/_netCDF4.pyx":3909
+ *                     #                   startp, countp, stridep, strdata)
+ *                 if ierr == NC_EINVALCOORDS:
+ *                     raise IndexError             # <<<<<<<<<<<<<<
+ *                 elif ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-    __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 = 2963; __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 = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  }
+        __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
 
-  /* "netCDF4.pyx":2964
- *         for n from 0 <= n < ndims:
- *             chunksizes.append(chunksizesp[n])
- *         free(chunksizesp)             # <<<<<<<<<<<<<<
- *         if icontiguous:
- *             return 'contiguous'
+      /* "netCDF4/_netCDF4.pyx":3910
+ *                 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
  */
-  free(__pyx_v_chunksizesp);
+      __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_5) {
 
-  /* "netCDF4.pyx":2965
- *             chunksizes.append(chunksizesp[n])
- *         free(chunksizesp)
- *         if icontiguous:             # <<<<<<<<<<<<<<
- *             return 'contiguous'
- *         else:
+        /* "netCDF4/_netCDF4.pyx":3911
+ *                     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_3 = (__pyx_v_icontiguous != 0);
-  if (__pyx_t_3) {
+        __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 = 3911; __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 = 3911; __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 = 3911; __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 = 3911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
 
-    /* "netCDF4.pyx":2966
- *         free(chunksizesp)
- *         if icontiguous:
- *             return 'contiguous'             # <<<<<<<<<<<<<<
- *         else:
- *             return chunksizes
+      /* "netCDF4/_netCDF4.pyx":3914
+ *                 # 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_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_n_s_contiguous);
-    __pyx_r = __pyx_n_s_contiguous;
-    goto __pyx_L0;
-  }
-  /*else*/ {
+      __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 = 3914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {
 
-    /* "netCDF4.pyx":2968
- *             return 'contiguous'
+        /* "netCDF4/_netCDF4.pyx":3915
+ *                 # 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 = 3915; __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 = 3915; __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 = 3915; __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 = 3915; __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 = 3915; __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 = 3915; __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 = 3915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+      }
+
+      /* "netCDF4/_netCDF4.pyx":3917
+ *                     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 = 3917; __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 = 3917; __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 = 3917; __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 = 3917; __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_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_10));
+      __pyx_t_10 = 0;
+
+      /* "netCDF4/_netCDF4.pyx":3918
+ *                 # reshape the output array
+ *                 data = numpy.reshape(data, shapeout)
+ *                 free(strdata)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 # regular vlen
+ */
+      free(__pyx_v_strdata);
+      goto __pyx_L22;
+    }
+    /*else*/ {
+
+      /* "netCDF4/_netCDF4.pyx":3922
+ *                 # 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 = 3922; __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 = 3922; __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 = 3922; __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/_netCDF4.pyx":3924
+ *                 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:             # <<<<<<<<<<<<<<
+ *                     with nogil:
+ *                         ierr = nc_get_vara(self._grpid, self._varid,
+ */
+      __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3924; __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 = 3924; __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 = 3924; __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 = 3924; __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 = 3924; __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_L33_bool_binop_done;
+      }
+      __pyx_t_12 = ((__pyx_v_ndims == 0) != 0);
+      __pyx_t_5 = __pyx_t_12;
+      __pyx_L33_bool_binop_done:;
+      if (__pyx_t_5) {
+
+        /* "netCDF4/_netCDF4.pyx":3925
+ *                 # strides all 1 or scalar variable, use get_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:
+ *                     with nogil:             # <<<<<<<<<<<<<<
+ *                         ierr = nc_get_vara(self._grpid, self._varid,
+ *                                            startp, countp, vldata)
+ */
+        {
+            #ifdef WITH_THREAD
+            PyThreadState *_save;
+            Py_UNBLOCK_THREADS
+            #endif
+            /*try:*/ {
+
+              /* "netCDF4/_netCDF4.pyx":3926
+ *                 if sum(stride) == ndims or ndims == 0:
+ *                     with nogil:
+ *                         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);
+            }
+
+            /* "netCDF4/_netCDF4.pyx":3925
+ *                 # strides all 1 or scalar variable, use get_vara (faster)
+ *                 if sum(stride) == ndims or ndims == 0:
+ *                     with nogil:             # <<<<<<<<<<<<<<
+ *                         ierr = nc_get_vara(self._grpid, self._varid,
+ *                                            startp, countp, vldata)
+ */
+            /*finally:*/ {
+              /*normal exit:*/{
+                #ifdef WITH_THREAD
+                Py_BLOCK_THREADS
+                #endif
+                goto __pyx_L37;
+              }
+              __pyx_L37:;
+            }
+        }
+        goto __pyx_L32;
+      }
+      /*else*/ {
+
+        /* "netCDF4/_netCDF4.pyx":3929
+ *                                            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__83, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3929; __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 = 3929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+      __pyx_L32:;
+
+      /* "netCDF4/_netCDF4.pyx":3932
+ *                     #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/_netCDF4.pyx":3933
+ *                     #                   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 = 3933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4/_netCDF4.pyx":3934
+ *                 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/_netCDF4.pyx":3935
+ *                     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 = 3935; __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 = 3935; __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 = 3935; __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 = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4/_netCDF4.pyx":3938
+ *                 # 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 = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {
+
+        /* "netCDF4/_netCDF4.pyx":3939
+ *                 # 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/_netCDF4.pyx":3940
+ *                 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 = 3940; __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 = 3940; __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 = 3940; __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 = 3940; __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 = 3940; __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_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_XDECREF_SET(__pyx_v_dataarr, ((PyArrayObject *)__pyx_t_6));
+        __pyx_t_6 = 0;
+
+        /* "netCDF4/_netCDF4.pyx":3941
+ *                     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/_netCDF4.pyx":3942
+ *                     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 = 3942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      }
+
+      /* "netCDF4/_netCDF4.pyx":3944
+ *                     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 = 3944; __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 = 3944; __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 = 3944; __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 = 3944; __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_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_6));
+      __pyx_t_6 = 0;
+
+      /* "netCDF4/_netCDF4.pyx":3946
+ *                 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_L22:;
+    goto __pyx_L9;
+  }
+  __pyx_L9:;
+
+  /* "netCDF4/_netCDF4.pyx":3947
+ *                 # 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/_netCDF4.pyx":3949
+ *         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 = 3949; __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 = 3949; __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 = 3949; __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 = 3949; __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 = 3949; __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_8_netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_6));
+    __pyx_t_6 = 0;
+    goto __pyx_L41;
+  }
+  __pyx_L41:;
+
+  /* "netCDF4/_netCDF4.pyx":3950
+ *             # 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 = 3950; __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 = 3950; __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/_netCDF4.pyx":3951
+ *             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 = 3951; __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 = 3951; __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/_netCDF4.pyx":3952
+ *         if not self.dimensions:
+ *             return data[0] # a scalar
+ *         elif squeeze_out:             # <<<<<<<<<<<<<<
+ *             return numpy.squeeze(data)
  *         else:
- *             return chunksizes             # <<<<<<<<<<<<<<
+ */
+  __pyx_t_12 = (__pyx_v_squeeze_out != 0);
+  if (__pyx_t_12) {
+
+    /* "netCDF4/_netCDF4.pyx":3953
+ *             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 = 3953; __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 = 3953; __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 = 3953; __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 = 3953; __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 = 3953; __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 = 3953; __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/_netCDF4.pyx":3955
+ *             return numpy.squeeze(data)
+ *         else:
+ *             return data             # <<<<<<<<<<<<<<
  * 
- *     def get_var_chunk_cache(self):
+ * # Compound datatype support.
  */
     __Pyx_XDECREF(__pyx_r);
-    __Pyx_INCREF(__pyx_v_chunksizes);
-    __pyx_r = __pyx_v_chunksizes;
+    if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __Pyx_INCREF(((PyObject *)__pyx_v_data));
+    __pyx_r = ((PyObject *)__pyx_v_data);
     goto __pyx_L0;
   }
 
-  /* "netCDF4.pyx":2944
- *             return 'native'
+  /* "netCDF4/_netCDF4.pyx":3833
+ *                 free(vldata)
  * 
- *     def chunking(self):             # <<<<<<<<<<<<<<
- *         """
- * chunking(self)
+ *     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_AddTraceback("netCDF4.Variable.chunking", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_XDECREF(__pyx_t_15);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_chunksizes);
+  __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":2970
- *             return chunksizes
- * 
- *     def get_var_chunk_cache(self):             # <<<<<<<<<<<<<<
- *         """
- * get_var_chunk_cache(self)
+/* "netCDF4/_netCDF4.pyx":2567
+ * that are 1d arrays or lists slice along each dimension independently.  This
+ * behavior is similar to Fortran or Matlab, but different than numpy."""
+ *     cdef public int _varid, _grpid, _nunlimdim             # <<<<<<<<<<<<<<
+ *     cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\
+ *     _isvlen, _grp, _cmptype, _vltype, __orthogonal_indexing__
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_6_varid_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_6_varid_1__get__(PyObject *__pyx_v_self) {
   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));
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_6_varid___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6_varid___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
   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;
+  PyObject *__pyx_t_1 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("get_var_chunk_cache", 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 = 2567; __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":2980
- *         cdef size_t sizep, nelemsp
- *         cdef float preemptionp
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
- *                    &nelemsp, &preemptionp)
- */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable._varid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-        /* "netCDF4.pyx":2981
- *         cdef float preemptionp
- *         with nogil:
- *             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));
-      }
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_6_varid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_6_varid_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-      /* "netCDF4.pyx":2980
- *         cdef size_t sizep, nelemsp
- *         cdef float preemptionp
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
- *                    &nelemsp, &preemptionp)
- */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L5;
-        }
-        __pyx_L5:;
-      }
-  }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":2983
- *             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) {
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_6_varid_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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 = 2567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->_varid = __pyx_t_1;
 
-    /* "netCDF4.pyx":2984
- *                    &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 = 2984; __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 = 2984; __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 = 2984; __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 = 2984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  /* function exit code */
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable._varid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":2985
- *         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 = 2985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_v_preemption = __pyx_t_3;
-  __pyx_t_3 = 0;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_6_grpid_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_6_grpid___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-  /* "netCDF4.pyx":2986
- *             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):
- */
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_6_grpid___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2986; __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 = 2986; __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 = 2986; __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;
+  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2567; __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":2970
- *             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_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4.Variable._grpid.__get__", __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":2988
- *         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;
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_6_grpid_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_6_grpid_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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 = 2567; __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._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_8_netCDF4_8Variable_10_nunlimdim_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_10_nunlimdim_1__get__(PyObject *__pyx_v_self) {
   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 = 2988; __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 = 2988; __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);
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_10_nunlimdim___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_10_nunlimdim___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  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":2999
- *         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 = 2999; __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 = 2999; __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 = 2999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  __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 = 2567; __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 = 2999; __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 = 2999; __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 = 2999; __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 = 2999; __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 = 2999; __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 = 2999; __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 = 2999; __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":3000
- *         # 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":3001
- *         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 = 3001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_sizep = __pyx_t_9;
-    goto __pyx_L5;
-  }
-  /*else*/ {
-
-    /* "netCDF4.pyx":3003
- *             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 = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_sizep = __pyx_t_9;
-  }
-  __pyx_L5:;
-
-  /* "netCDF4.pyx":3004
- *         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":3005
- *             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 = 3005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_nelemsp = __pyx_t_9;
-    goto __pyx_L6;
-  }
-  /*else*/ {
-
-    /* "netCDF4.pyx":3007
- *             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 = 3007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_nelemsp = __pyx_t_9;
-  }
-  __pyx_L6:;
-
-  /* "netCDF4.pyx":3008
- *         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":3009
- *             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 = 3009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_preemptionp = __pyx_t_10;
-    goto __pyx_L7;
-  }
-  /*else*/ {
-
-    /* "netCDF4.pyx":3011
- *             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 = 3011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_preemptionp = __pyx_t_10;
-  }
-  __pyx_L7:;
-
-  /* "netCDF4.pyx":3012
- *         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":3014
- *         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":3015
- *                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 = 3015; __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 = 3015; __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 = 3015; __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 = 3015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-
-  /* "netCDF4.pyx":2988
- *         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)
- */
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
 
   /* 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_AddTraceback("netCDF4._netCDF4.Variable._nunlimdim.__get__", __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":3017
- *             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) {
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_10_nunlimdim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_10_nunlimdim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
   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));
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_10_nunlimdim_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
   /* 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) {
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_10_nunlimdim_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, 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;
-  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_1;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__delattr__", 0);
-
-  /* "netCDF4.pyx":3019
- *     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 = 3019; __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 = 3019; __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":3020
- *         # 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 = 3020; __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 = 3020; __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 = 3020; __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 = 3020; __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":3023
- *         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 = 3023; __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 = 3023; __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 = 3023; __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 = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-    /* "netCDF4.pyx":3022
- *             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 = 3022; __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 = 3022; __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 = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L3:;
-
-  /* "netCDF4.pyx":3017
- *             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:
- */
+  __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 = 2567; __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_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_AddTraceback("netCDF4._netCDF4.Variable._nunlimdim.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = -1;
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":3025
- *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
+/* "netCDF4/_netCDF4.pyx":2568
+ * behavior is similar to Fortran or Matlab, but different than numpy."""
+ *     cdef public int _varid, _grpid, _nunlimdim
+ *     cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\             # <<<<<<<<<<<<<<
+ *     _isvlen, _grp, _cmptype, _vltype, __orthogonal_indexing__
  * 
- *     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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_5_name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_5_name___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5_name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_5_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_5_name_3__set__(PyObject *__pyx_v_self, 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));
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_5_name_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((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;
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5_name_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, 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);
+  __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;
 
-  /* "netCDF4.pyx":3028
- *         # 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 = 3028; __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 = 3028; __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":3031
- *             # 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 = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_3) {
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":3032
- *             # 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 = 3032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_v_msg = __pyx_t_1;
-      __pyx_t_1 = 0;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_5_name_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_5_name_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_5_name_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-      /* "netCDF4.pyx":3034
- *                 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 = 3034; __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 = 3034; __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 = 3034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3041
- *                 #    "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 = 3041; __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 = 3041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = __pyx_t_2;
-    __pyx_L5_bool_binop_done:;
-    if (__pyx_t_3) {
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5_name_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-      /* "netCDF4.pyx":3042
- *                 #    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 = 3042; __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 = 3042; __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 = 3042; __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 = 3042; __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:;
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3043
- *             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 = 3043; __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 = 3043; __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 = 3043; __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;
-  }
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_4ndim_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_4ndim___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-  /* "netCDF4.pyx":3044
- *                 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 = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __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 = 3044; __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) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3045
- *             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 = 3045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = (__pyx_t_2 != 0);
-    if (__pyx_t_3) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4ndim___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-      /* "netCDF4.pyx":3047
- *             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 = 3047; __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 = 3047; __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 = 3047; __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 = 3047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":3046
- *         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 = 3046; __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 = 3046; __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 = 3046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    /*else*/ {
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_4ndim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_4ndim_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-      /* "netCDF4.pyx":3049
- *                 "'%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 = 3049; __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 = 3049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    }
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3025
- *             "'%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.
- */
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4ndim_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  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":3051
- *                 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 int __pyx_pw_7netCDF4_8_netCDF4_8Variable_4ndim_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_4ndim_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_4ndim_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4ndim_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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_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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_5dtype_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_5dtype_1__get__(PyObject *__pyx_v_self) {
   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));
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_5dtype___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5dtype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
   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":3054
- *         # 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 = 3054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3054; __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 = 3054; __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 = 3054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3054; __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 = 3054; __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) {
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->dtype);
+  __pyx_r = __pyx_v_self->dtype;
+  goto __pyx_L0;
 
-    /* "netCDF4.pyx":3056
- *         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 = 3056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_1) {
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":3057
- *             # 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 = 3057; __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 = 3057; __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 = 3057; __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;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_5dtype_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-      /* "netCDF4.pyx":3058
- *             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 = 3058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __pyx_v_values = ((PyObject*)__pyx_t_2);
-      __pyx_t_2 = 0;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":3059
- *                 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 = 3059; __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 = 3059; __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 = 3059; __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 = 3059; __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 = 3059; __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 = 3059; __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 = 3059; __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;
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5dtype_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-        /* "netCDF4.pyx":3060
- *                 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 = 3060; __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 = 3060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-        /* "netCDF4.pyx":3059
- *                 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;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_5dtype_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_5dtype_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_5dtype_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-      /* "netCDF4.pyx":3061
- *                 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 = 3061; __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 = 3061; __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 = 3061; __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 = 3061; __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 = 3061; __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 = 3061; __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 = 3061; __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*/ {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":3063
- *                 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 = 3063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-  }
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5dtype_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-  /* "netCDF4.pyx":3064
- *             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 = 3064; __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 = 3064; __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) {
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3065
- *                 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 = 3065; __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 = 3065; __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*/ {
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_4mask_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_4mask_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_4mask___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-    /* "netCDF4.pyx":3067
- *             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 = 3067; __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 = 3067; __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 = 3067; __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 = 3067; __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;
-  }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3051
- *                 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.
- */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4mask___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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_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":3069
- *             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;
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_4mask_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_4mask_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
   __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 = 3069; __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 = 3069; __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 = 3069; __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);
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_4mask_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
   /* 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;
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4mask_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
   __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);
+  __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;
 
-  /* "netCDF4.pyx":3077
- *         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 = 3077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_bytestr = __pyx_t_1;
-  __pyx_t_1 = 0;
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3078
- *         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 = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_oldnamec = __pyx_t_2;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_4mask_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_4mask_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_4mask_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-  /* "netCDF4.pyx":3079
- *         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 = 3079; __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;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3080
- *         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 = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_newnamec = __pyx_t_2;
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4mask_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-  /* "netCDF4.pyx":3081
- *         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);
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3082
- *         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) {
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_5scale_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_5scale_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_5scale___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-    /* "netCDF4.pyx":3083
- *         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 = 3083; __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 = 3083; __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 = 3083; __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 = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3069
- *             return self.getncattr(name)
- * 
- *     def renameAttribute(self, oldname, newname):             # <<<<<<<<<<<<<<
- *         """
- * renameAttribute(self, oldname, newname)
- */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_5scale___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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_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":3085
- *             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;
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+  int __pyx_r;
   __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));
+  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_5scale_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
   /* 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;
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5scale_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_5scale_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_5scale_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_5scale_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_5scale_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_12_isprimitive_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_12_isprimitive___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_12_isprimitive___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  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);
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_isprimitive);
+  __pyx_r = __pyx_v_self->_isprimitive;
+  goto __pyx_L0;
 
-  /* "netCDF4.pyx":3091
- *         # 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 = 3091; __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 = 3091; __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 = 3091; __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 = 3091; __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 = 3091; __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 = 3091; __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 = 3091; __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 = 3091; __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 = 3091; __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;
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3092
- *         # 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 = 3092; __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 = 3092; __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 = 3092; __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 = 3092; __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;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_12_isprimitive_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_12_isprimitive_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-  /* "netCDF4.pyx":3093
- *         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 = 3093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_9) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3094
- *         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 = 3094; __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 = 3094; __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 = 3094; __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 = 3094; __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 = 3094; __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 = 3094; __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*/ {
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_12_isprimitive_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-    /* "netCDF4.pyx":3096
- *             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 = 3096; __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 = 3096; __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 = 3096; __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 = 3096; __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 = 3096; __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 = 3096; __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:;
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3102
- *         # 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 = 3102; __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 = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_INCREF(__pyx_slice__69);
-  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_slice__69);
-  __Pyx_GIVEREF(__pyx_slice__69);
-  __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __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;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_12_isprimitive_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_12_isprimitive_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_12_isprimitive_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-  /* "netCDF4.pyx":3103
- *         # 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 = 3103; __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__70, 0, 1, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __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 = 3103; __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 = 3103; __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 = 3103; __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 = 3103; __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 = 3103; __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 = 3103; __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 = 3103; __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 = 3103; __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;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3104
- *         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 = 3104; __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 = 3104; __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 = 3104; __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 = 3104; __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 = 3104; __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 = 3104; __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 = 3104; __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 = 3104; __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 = 3104; __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 = 3104; __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) {
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_12_isprimitive_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-      /* "netCDF4.pyx":3105
- *         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 = 3105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L8;
-    }
-    __pyx_L8:;
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3103
- *         # 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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_11_iscompound_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_11_iscompound___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-  /* "netCDF4.pyx":3108
- * 
- *         # 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 = 3108; __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 = 3108; __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 = 3108; __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 = 3108; __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 = 3108; __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 = 3108; __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 = 3108; __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;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3109
- *         # 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 = 3109; __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 = 3109; __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 = 3109; __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 = 3109; __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 = 3109; __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 = 3109; __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 = 3109; __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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_11_iscompound___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-  /* "netCDF4.pyx":3110
- *         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 = 3110; __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 = 3110; __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 = 3110; __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 = 3110; __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 = 3110; __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 = 3110; __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 = 3110; __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;
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3111
- *         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 = 3111; __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 = 3111; __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 = 3111; __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 = 3111; __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 = 3111; __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 = 3111; __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 = 3111; __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;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_11_iscompound_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_11_iscompound_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-  /* "netCDF4.pyx":3114
- * 
- *         # 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 = 3114; __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 = 3114; __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 = 3114; __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 = 3114; __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 = 3114; __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 = 3114; __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 = 3114; __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 = 3114; __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 = 3114; __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 = 3114; __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 = 3114; __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 = 3114; __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 = 3114; __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 = 3114; __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 = 3114; __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;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3115
- *         # 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 = 3115; __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 = 3115; __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 = 3115; __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;
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_11_iscompound_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-    /* "netCDF4.pyx":3116
- *         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 = 3116; __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 = 3116; __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 = 3116; __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 = 3116; __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 = 3116; __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) {
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":3117
- *             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*/ {
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_11_iscompound_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_11_iscompound_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_11_iscompound_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_11_iscompound_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-      /* "netCDF4.pyx":3119
- *                 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 = 3119; __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 = 3119; __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 = 3119; __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;
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":3120
- *             else:
- *                 shape = getattr(data[tuple(i)], 'shape', ())
- *                 data[tuple(i)] = datout.reshape(shape)             # <<<<<<<<<<<<<<
+/* "netCDF4/_netCDF4.pyx":2569
+ *     cdef public int _varid, _grpid, _nunlimdim
+ *     cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\
+ *     _isvlen, _grp, _cmptype, _vltype, __orthogonal_indexing__             # <<<<<<<<<<<<<<
  * 
- *         # Remove extra singleton dimensions.
+ *     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,
  */
-      __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 = 3120; __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 = 3120; __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 = 3120; __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 = 3120; __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 = 3120; __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 = 3120; __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":3114
- * 
- *         # 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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_7_isvlen_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_7_isvlen___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-  /* "netCDF4.pyx":3123
- * 
- *         # 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 = 3123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_14 = (__pyx_t_9 != 0);
-  if (__pyx_t_14) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3124
- *         # 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 = 3124; __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 = 3124; __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:;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_7_isvlen___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-  /* "netCDF4.pyx":3125
- *         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 = 3125; __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 = 3125; __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 = 3125; __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) {
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3128
- *             # 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 = 3128; __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 = 3128; __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 = 3128; __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 = 3128; __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:;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_7_isvlen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_7_isvlen_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-  /* "netCDF4.pyx":3138
- *         # 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:*/ {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":3139
- *         # 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 = 3139; __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 = 3139; __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 = 3139; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        goto __pyx_L39;
-      }
-      __pyx_L39:;
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_7_isvlen_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-      /* "netCDF4.pyx":3140
- *         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 = 3140; __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 = 3140; __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 = 3140; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        goto __pyx_L40;
-      }
-      __pyx_L40:;
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":3141
- *             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;
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_7_isvlen_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_7_isvlen_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_7_isvlen_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-    /* "netCDF4.pyx":3142
- *             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 = 3142; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_GOTREF(__pyx_t_4);
-      __Pyx_GOTREF(__pyx_t_7);
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":3143
- *             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;
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_7_isvlen_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-      /* "netCDF4.pyx":3144
- *         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 = 3144; __pyx_clineno = __LINE__; goto __pyx_L33_except_error;}
-      if (__pyx_t_14) {
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-        /* "netCDF4.pyx":3145
- *             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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_4_grp_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_4_grp___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-        /* "netCDF4.pyx":3146
- *             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 = 3146; __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 = 3146; __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 = 3146; __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 = 3146; __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 = 3146; __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:;
-  }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3147
- *                 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 = 3147; __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 = 3147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_14 = __pyx_t_11;
-  __pyx_L45_bool_binop_done:;
-  if (__pyx_t_14) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_4_grp___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-    /* "netCDF4.pyx":3148
- *                 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 = 3148; __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 = 3148; __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 = 3148; __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 = 3148; __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:;
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3149
- *         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 = 3149; __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 = 3149; __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) {
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_4_grp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_4_grp_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-    /* "netCDF4.pyx":3151
- *         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 = 3151; __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 = 3151; __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;
-    }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3152
- *             # 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 = 3152; __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 = 3152; __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 = 3152; __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 = 3152; __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 = 3152; __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 = 3152; __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) {
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4_grp_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-      /* "netCDF4.pyx":3153
- *             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 = 3153; __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 = 3153; __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 = 3153; __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 = 3153; __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;
-    }
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3155
- *                 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 = 3155; __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 = 3155; __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 = 3155; __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 = 3155; __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) {
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_4_grp_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_4_grp_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_4_grp_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_4_grp_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-      /* "netCDF4.pyx":3156
- *             # 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 = 3156; __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 = 3156; __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;
-    }
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3158
- *                 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 = 3158; __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 = 3158; __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 = 3158; __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 = 3158; __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) {
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_8_cmptype_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_8_cmptype___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-      /* "netCDF4.pyx":3159
- *             # 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 = 3159; __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 = 3159; __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:;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3160
- *             elif hasattr(self, 'add_offset') and self.add_offset != 0.0:
- *                 data += self.add_offset
- *         return data             # <<<<<<<<<<<<<<
- * 
- *     def _toma(self,data):
- */
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_8_cmptype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
   __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_data);
-  __pyx_r = __pyx_v_data;
+  __Pyx_INCREF(__pyx_v_self->_cmptype);
+  __pyx_r = __pyx_v_self->_cmptype;
   goto __pyx_L0;
 
-  /* "netCDF4.pyx":3085
- *             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":3162
- *         return data
- * 
- *     def _toma(self,data):             # <<<<<<<<<<<<<<
- *         cdef int ierr, no_fill
- *         # private function for creating a masked array, masking missing_values
- */
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_8_cmptype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_8_cmptype_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_8_cmptype_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_8_cmptype_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_8_cmptype_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_8_cmptype_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_8_cmptype_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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_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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_7_vltype_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_7_vltype_1__get__(PyObject *__pyx_v_self) {
   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));
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_7_vltype___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_7_vltype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
-  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);
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->_vltype);
+  __pyx_r = __pyx_v_self->_vltype;
+  goto __pyx_L0;
 
-  /* "netCDF4.pyx":3166
- *         # 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 = 3166; __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 = 3166; __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 = 3166; __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 = 3166; __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 = 3166; __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 = 3166; __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 = 3166; __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;
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":3167
- *         # 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)
- */
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_7_vltype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_7_vltype_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_7_vltype_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_8Variable_7_vltype_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_7_vltype_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_7_vltype_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_7_vltype_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__", 0);
   __Pyx_INCREF(Py_None);
-  __pyx_v_fill_value = Py_None;
+  __Pyx_GIVEREF(Py_None);
+  __Pyx_GOTREF(__pyx_v_self->_vltype);
+  __Pyx_DECREF(__pyx_v_self->_vltype);
+  __pyx_v_self->_vltype = Py_None;
 
-  /* "netCDF4.pyx":3168
- *         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 = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_9 = (__pyx_t_8 != 0);
-  if (__pyx_t_9) {
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3169
- *         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 = 3169; __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 = 3169; __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 = 3169; __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 = 3169; __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 = 3169; __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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing_____get__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
 
-    /* "netCDF4.pyx":3170
- *         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 = 3170; __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 = 3170; __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 = 3170; __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 = 3170; __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 = 3170; __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 = 3170; __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:;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3171
- *             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 = 3171; __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 = 3171; __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 = 3171; __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 = 3171; __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 = 3171; __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 = 3171; __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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing_____get__(struct __pyx_obj_7netCDF4_8_netCDF4_Variable *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__", 0);
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_self->__orthogonal_indexing__);
+  __pyx_r = __pyx_v_self->__orthogonal_indexing__;
+  goto __pyx_L0;
 
-      /* "netCDF4.pyx":3172
- *             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 = 3172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3172; __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:;
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-    /* "netCDF4.pyx":3173
- *                (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 = 3173; __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 = 3173; __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 = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (__pyx_t_9) {
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___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_8_netCDF4_8Variable_23__orthogonal_indexing___2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));
 
-      /* "netCDF4.pyx":3174
- *                 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 = 3174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_v_hasmval = __pyx_t_1;
-      __pyx_t_1 = 0;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":3176
- *                 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:*/ {
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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->__orthogonal_indexing__);
+  __Pyx_DECREF(__pyx_v_self->__orthogonal_indexing__);
+  __pyx_v_self->__orthogonal_indexing__ = __pyx_v_value;
+
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":3177
- *                 # 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 = 3177; __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 = 3177; __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 = 3177; __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 = 3177; __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 = 3177; __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;
+static int __pyx_pf_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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->__orthogonal_indexing__);
+  __Pyx_DECREF(__pyx_v_self->__orthogonal_indexing__);
+  __pyx_v_self->__orthogonal_indexing__ = Py_None;
 
-        /* "netCDF4.pyx":3178
- *                 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 = 3178; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
-          __Pyx_GOTREF(__pyx_t_1);
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_GOTREF(__pyx_t_3);
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":3179
- *                     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)
+/* "netCDF4/_netCDF4.pyx":3999
+ *     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)
  */
-          __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":3181
- *                     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 = 3181; __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 = 3181; __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 = 3181; __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 = 3181; __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 = 3181; __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;
-        }
+/* Python wrapper */
+static int __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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,&__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;
       }
-      __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3181; __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;
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grp)) != 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 = 3999; __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 = 3999; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        }
       }
-      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 = 3181; __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":3182
- *             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 = 3182; __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 = 3182; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 3999; __pyx_clineno = __LINE__; goto __pyx_L3_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 = 3182; __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 = 3182; __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 = 3182; __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 = 3182; __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 = 3182; __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;
+    } 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 = 3999; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("netCDF4._netCDF4.CompoundType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(((struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)__pyx_v_self), __pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name, __pyx_v_kwargs);
 
-        /* "netCDF4.pyx":3183
- *                 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 = 3183; __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 = 3183; __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 = 3183; __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 = 3183; __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 = 3183; __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;
+  /* function exit code */
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-        /* "netCDF4.pyx":3184
- *                 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 = 3184; __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 = 3184; __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;
+static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType___init__(struct __pyx_obj_7netCDF4_8_netCDF4_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":3182
- *             else: # mval a vector.
- *                 hasmval = numpy.zeros(data.shape, numpy.bool)
- *                 for m in mval:             # <<<<<<<<<<<<<<
- *                     m =  numpy.array(m)
- *                     hasmval += data == m
+  /* "netCDF4/_netCDF4.pyx":4001
+ *     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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    }
-    __pyx_L9:;
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4001; __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 = 4001; __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 = 4001; __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 = 4001; __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 = 4001; __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 = 4001; __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":3185
- *                     m =  numpy.array(m)
- *                     hasmval += data == m
- *             if mval.shape == () and mvalisnan:             # <<<<<<<<<<<<<<
- *                 mask = numpy.isnan(data)
- *             elif hasmval.any():
+  /* "netCDF4/_netCDF4.pyx":4002
+ *         cdef nc_type xtype
+ *         dt = numpy.dtype(dt,align=True)
+ *         if 'typeid' in kwargs:             # <<<<<<<<<<<<<<
+ *             xtype = kwargs['typeid']
+ *         else:
  */
-    __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 = 3185; __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 = 3185; __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 = 3185; __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 = 3185; __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 = 3185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_9 = __pyx_t_8;
-    __pyx_L23_bool_binop_done:;
-    if (__pyx_t_9) {
+  __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 = 4002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = (__pyx_t_5 != 0);
+  if (__pyx_t_6) {
 
-      /* "netCDF4.pyx":3186
- *                     hasmval += data == m
- *             if mval.shape == () and mvalisnan:
- *                 mask = numpy.isnan(data)             # <<<<<<<<<<<<<<
- *             elif hasmval.any():
- *                 mask = hasmval
+    /* "netCDF4/_netCDF4.pyx":4003
+ *         dt = numpy.dtype(dt,align=True)
+ *         if 'typeid' in kwargs:
+ *             xtype = kwargs['typeid']             # <<<<<<<<<<<<<<
+ *         else:
+ *             xtype = _def_compound(grp, dt, dtype_name)
  */
-      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3186; __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 = 3186; __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 = 3186; __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 = 3186; __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 = 3186; __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;
-    }
+    __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 = 4003; __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 = 4003; __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":3187
- *             if mval.shape == () and mvalisnan:
- *                 mask = numpy.isnan(data)
- *             elif hasmval.any():             # <<<<<<<<<<<<<<
- *                 mask = hasmval
- *             else:
+    /* "netCDF4/_netCDF4.pyx":4005
+ *             xtype = kwargs['typeid']
+ *         else:
+ *             xtype = _def_compound(grp, dt, dtype_name)             # <<<<<<<<<<<<<<
+ *         self._nc_type = xtype
+ *         self.dtype = dt
  */
-    __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 = 3187; __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 = 3187; __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 = 3187; __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 = 3187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    if (__pyx_t_9) {
+    __pyx_t_4 = __pyx_f_7netCDF4_8_netCDF4__def_compound(__pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4005; __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 = 4005; __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":3188
- *                 mask = numpy.isnan(data)
- *             elif hasmval.any():
- *                 mask = hasmval             # <<<<<<<<<<<<<<
- *             else:
- *                 mask = None
+  /* "netCDF4/_netCDF4.pyx":4006
+ *         else:
+ *             xtype = _def_compound(grp, dt, dtype_name)
+ *         self._nc_type = xtype             # <<<<<<<<<<<<<<
+ *         self.dtype = dt
+ *         self.name = dtype_name
  */
-      __Pyx_INCREF(__pyx_v_hasmval);
-      __pyx_v_mask = __pyx_v_hasmval;
-      goto __pyx_L22;
-    }
-    /*else*/ {
+  __pyx_v_self->_nc_type = __pyx_v_xtype;
 
-      /* "netCDF4.pyx":3190
- *                 mask = hasmval
- *             else:
- *                 mask = None             # <<<<<<<<<<<<<<
- *             if mask is not None:
- *                 fill_value = mval
+  /* "netCDF4/_netCDF4.pyx":4007
+ *             xtype = _def_compound(grp, dt, dtype_name)
+ *         self._nc_type = xtype
+ *         self.dtype = dt             # <<<<<<<<<<<<<<
+ *         self.name = dtype_name
+ * 
  */
-      __Pyx_INCREF(Py_None);
-      __pyx_v_mask = Py_None;
-    }
-    __pyx_L22:;
+  __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":3191
- *             else:
- *                 mask = None
- *             if mask is not None:             # <<<<<<<<<<<<<<
- *                 fill_value = mval
- *                 totalmask += mask
+  /* "netCDF4/_netCDF4.pyx":4008
+ *         self._nc_type = xtype
+ *         self.dtype = dt
+ *         self.name = dtype_name             # <<<<<<<<<<<<<<
+ * 
+ *     def __repr__(self):
  */
-    __pyx_t_9 = (__pyx_v_mask != Py_None);
-    __pyx_t_8 = (__pyx_t_9 != 0);
-    if (__pyx_t_8) {
+  __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":3192
- *                 mask = None
- *             if mask is not None:
- *                 fill_value = mval             # <<<<<<<<<<<<<<
- *                 totalmask += mask
- *         if hasattr(self, '_FillValue'):
+  /* "netCDF4/_netCDF4.pyx":3999
+ *     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)
  */
-      __Pyx_INCREF(__pyx_v_mval);
-      __Pyx_DECREF_SET(__pyx_v_fill_value, __pyx_v_mval);
 
-      /* "netCDF4.pyx":3193
- *             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 = 3193; __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:;
+  /* 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._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":3194
- *                 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
+/* "netCDF4/_netCDF4.pyx":4010
+ *         self.name = dtype_name
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *             return self.__unicode__()
  */
-  __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 = 3194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_9 = (__pyx_t_8 != 0);
-  if (__pyx_t_9) {
 
-    /* "netCDF4.pyx":3195
- *                 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.
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_12CompoundType_3__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_12CompoundType_3__repr__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(((struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_2__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":4011
+ * 
+ *     def __repr__(self):
+ *         if python3:             # <<<<<<<<<<<<<<
+ *             return self.__unicode__()
+ *         else:
  */
-    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3195; __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 = 3195; __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 = 3195; __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 = 3195; __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 = 3195; __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;
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4011; __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 = 4011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
 
-    /* "netCDF4.pyx":3198
- *             # 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)
+    /* "netCDF4/_netCDF4.pyx":4012
+ *     def __repr__(self):
+ *         if python3:
+ *             return self.__unicode__()             # <<<<<<<<<<<<<<
+ *         else:
+ *             return unicode(self).encode(default_encoding)
  */
-    __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_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 = 4012; __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 (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_2);
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
         __Pyx_INCREF(__pyx_t_4);
         __Pyx_INCREF(function);
-        __Pyx_DECREF_SET(__pyx_t_2, function);
+        __Pyx_DECREF_SET(__pyx_t_3, 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 = 3198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4012; __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 = 3198; __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 = 3198; __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 = 3198; __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 = 3198; __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_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_L29_next_or:;
+    __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":3199
- *             # 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?
+    /* "netCDF4/_netCDF4.pyx":4014
+ *             return self.__unicode__()
+ *         else:
+ *             return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
+ * 
+ *     def __unicode__(self):
  */
-    __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 = 3199; __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_XDECREF(__pyx_r);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4014; __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 = 4014; __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 = 4014; __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 = 4014; __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_2, function);
+        __Pyx_DECREF_SET(__pyx_t_3, 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 = 3199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    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 = 4014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_GOTREF(__pyx_t_1);
     } else {
-      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); 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_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 = 3199; __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_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4014; __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 = 4014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     }
-    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); 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_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3199; __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) {
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
+
+  /* "netCDF4/_netCDF4.pyx":4010
+ *         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._netCDF4.CompoundType.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":4016
+ *             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_8_netCDF4_12CompoundType_5__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_12CompoundType_4__unicode__(((struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":4017
+ * 
+ *     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 = 4017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+
+  /* "netCDF4/_netCDF4.pyx":4018
+ *     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 = 4018; __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/_netCDF4.pyx":4017
+ * 
+ *     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 = 4017; __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 = 4017; __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/_netCDF4.pyx":4016
+ *             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._netCDF4.CompoundType.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":3997
+ * @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_8_netCDF4_12CompoundType_8_nc_type_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_12CompoundType_8_nc_type___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_8_nc_type___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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 = 3997; __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._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_8_netCDF4_12CompoundType_8_nc_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_12CompoundType_8_nc_type_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_8_nc_type_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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 = 3997; __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._netCDF4.CompoundType._nc_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":3998
+ * """
+ *     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_8_netCDF4_12CompoundType_5dtype_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_12CompoundType_5dtype_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_5dtype___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_5dtype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_12CompoundType_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_12CompoundType_5dtype_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_5dtype_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_12CompoundType_5dtype_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_5dtype_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_5dtype_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_5dtype_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_12CompoundType_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_12CompoundType_4name_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4name___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_12CompoundType_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_12CompoundType_4name_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4name_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_12CompoundType_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_4name_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4name_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_12CompoundType_4name_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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":3200
- *             if (self.endian() == 'big' and is_native_little) or\
- *                (self.endian() == 'little' and is_native_big):
- *                 fval.byteswap(True)             # <<<<<<<<<<<<<<
- *             # is _FillValue a NaN?
- *             try:
+/* "netCDF4/_netCDF4.pyx":4020
+ *         (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__.
  */
-      __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 = 3200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
-      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3200; __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":3202
- *                 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:*/ {
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__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":3203
- *             # is _FillValue a NaN?
- *             try:
- *                 fvalisnan = numpy.isnan(fval)             # <<<<<<<<<<<<<<
- *             except TypeError: # isnan fails on some dtypes (issue 202)
- *                 fvalisnan = False
+  /* "netCDF4/_netCDF4.pyx":4029
+ *     cdef char *nested_namstring
+ *     cdef int dim_sizes[NC_MAX_DIMS]
+ *     bytestr = _strencode(dtype_name)             # <<<<<<<<<<<<<<
+ *     namstring = bytestr
+ *     size = dt.itemsize
  */
-        __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_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 = 3203; __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 = 3203; __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 = 3203; __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 = 3203; __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;
+  __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_dtype_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_bytestr = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-      /* "netCDF4.pyx":3204
- *             try:
- *                 fvalisnan = numpy.isnan(fval)
- *             except TypeError: # isnan fails on some dtypes (issue 202)             # <<<<<<<<<<<<<<
- *                 fvalisnan = False
- *             if fvalisnan:
+  /* "netCDF4/_netCDF4.pyx":4030
+ *     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_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 = 3204; __pyx_clineno = __LINE__; goto __pyx_L34_except_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_GOTREF(__pyx_t_4);
-        __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_namstring = __pyx_t_2;
 
-        /* "netCDF4.pyx":3205
- *                 fvalisnan = numpy.isnan(fval)
- *             except TypeError: # isnan fails on some dtypes (issue 202)
- *                 fvalisnan = False             # <<<<<<<<<<<<<<
- *             if fvalisnan:
- *                 mask = numpy.isnan(data)
+  /* "netCDF4/_netCDF4.pyx":4031
+ *     bytestr = _strencode(dtype_name)
+ *     namstring = bytestr
+ *     size = dt.itemsize             # <<<<<<<<<<<<<<
+ *     ierr = nc_def_compound(grp._grpid, size, namstring, &xtype)
+ *     if ierr != NC_NOERR:
  */
-        __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:;
-    }
+  __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 = 4031; __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 = 4031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_size = __pyx_t_3;
 
-    /* "netCDF4.pyx":3206
- *             except TypeError: # isnan fails on some dtypes (issue 202)
- *                 fvalisnan = False
- *             if fvalisnan:             # <<<<<<<<<<<<<<
- *                 mask = numpy.isnan(data)
- *             elif (data == fval).any():
+  /* "netCDF4/_netCDF4.pyx":4032
+ *     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_9 = __Pyx_PyObject_IsTrue(__pyx_v_fvalisnan); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_9) {
+  __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 = 4032; __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 = 4032; __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":3207
- *                 fvalisnan = False
- *             if fvalisnan:
- *                 mask = numpy.isnan(data)             # <<<<<<<<<<<<<<
- *             elif (data == fval).any():
- *                 mask = data==fval
+  /* "netCDF4/_netCDF4.pyx":4033
+ *     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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3207; __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 = 3207; __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 = 3207; __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 = 3207; __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 = 3207; __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;
-    }
+  __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_5) {
 
-    /* "netCDF4.pyx":3208
- *             if fvalisnan:
- *                 mask = numpy.isnan(data)
- *             elif (data == fval).any():             # <<<<<<<<<<<<<<
- *                 mask = data==fval
- *             else:
+    /* "netCDF4/_netCDF4.pyx":4034
+ *     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 = 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 = 3208; __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 = 3208; __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 = 3208; __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 = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+    __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 = 4034; __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 = 3208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4034; __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;
-    if (__pyx_t_9) {
+    __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 = 4034; __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 = 4034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-      /* "netCDF4.pyx":3209
- *                 mask = numpy.isnan(data)
- *             elif (data == fval).any():
- *                 mask = data==fval             # <<<<<<<<<<<<<<
- *             else:
- *                 mask = None
+  /* "netCDF4/_netCDF4.pyx":4035
+ *     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_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 = 3209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_XDECREF_SET(__pyx_v_mask, __pyx_t_1);
-      __pyx_t_1 = 0;
-      goto __pyx_L42;
+  __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 = 4035; __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 = 4035; __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);
     }
-    /*else*/ {
+  }
+  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 = 4035; __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 = 4035; __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 = 4035; __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":3211
- *                 mask = data==fval
- *             else:
- *                 mask = None             # <<<<<<<<<<<<<<
- *             if mask is not None:
- *                 if fill_value is None:
+  /* "netCDF4/_netCDF4.pyx":4036
+ *         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_INCREF(Py_None);
-      __Pyx_XDECREF_SET(__pyx_v_mask, Py_None);
+  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4036; __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 = 4036; __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 = 4036; __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);
     }
-    __pyx_L42:;
-
-    /* "netCDF4.pyx":3212
- *             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":3213
- *                 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":3214
- *             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;
+  }
+  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 = 4036; __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 = 4036; __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 = 4036; __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 = 4036; __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 = 4036; __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 = 4036; __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 = 4036; __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 = 4036; __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 = 4036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
       }
-      __pyx_L44:;
-
-      /* "netCDF4.pyx":3215
- *                 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 = 3215; __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;
+    __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 = 4036; __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 = 4036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
-  /*else*/ {
+  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __pyx_v_formats = __pyx_t_7;
+  __pyx_t_7 = 0;
 
-    /* "netCDF4.pyx":3219
- * 	# is disabled.
- *         else:
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
- *             if ierr != NC_NOERR:
+  /* "netCDF4/_netCDF4.pyx":4037
+ *     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)
  */
-    {
-        #ifdef WITH_THREAD
-        PyThreadState *_save;
-        Py_UNBLOCK_THREADS
+  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4037; __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 = 4037; __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 = 4037; __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 = 4037; __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 = 4037; __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 = 4037; __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 = 4037; __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 = 4037; __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 = 4037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
-        /*try:*/ {
-
-          /* "netCDF4.pyx":3220
- *         else:
- *             with nogil:
- *                 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);
+      } 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 = 4037; __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 = 4037; __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 = 4037; __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 = 4037; __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 = 4037; __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":3219
- * 	# is disabled.
- *         else:
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
- *             if ierr != NC_NOERR:
+  /* "netCDF4/_netCDF4.pyx":4040
+ *     # 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()
  */
-        /*finally:*/ {
-          /*normal exit:*/{
-            #ifdef WITH_THREAD
-            Py_BLOCK_THREADS
-            #endif
-            goto __pyx_L47;
-          }
-          __pyx_L47:;
-        }
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4040; __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 = 4040; __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 = 4040; __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":3221
- *             with nogil:
- *                 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":3222
- *                 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
+  /* "netCDF4/_netCDF4.pyx":4041
+ *     # (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_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 = 3222; __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 = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4041; __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);
-      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 = 3222; __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 = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 4041; __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 = 4041; __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":3235
- *             # 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
+  /* "netCDF4/_netCDF4.pyx":4042
+ *     names = _sortbylist(names, offsets)
+ *     formats = _sortbylist(formats, offsets)
+ *     offsets.sort()             # <<<<<<<<<<<<<<
+ *     for name, format, offset in zip(names, formats, offsets):
+ *         bytestr = _strencode(name)
  */
-    __pyx_t_8 = ((__pyx_v_no_fill != 1) != 0);
-    if (__pyx_t_8) {
-    } else {
-      __pyx_t_9 = __pyx_t_8;
-      goto __pyx_L50_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 = 3235; __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__73, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __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 = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    if (__pyx_t_16) {
-    } else {
-      __pyx_t_8 = __pyx_t_16;
-      goto __pyx_L52_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 = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_8 = __pyx_t_16;
-    __pyx_L52_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_L50_bool_binop_done:;
-    if (__pyx_t_9) {
+  __pyx_t_11 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-      /* "netCDF4.pyx":3236
- *             # 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.
+  /* "netCDF4/_netCDF4.pyx":4043
+ *     formats = _sortbylist(formats, offsets)
+ *     offsets.sort()
+ *     for name, format, offset in zip(names, formats, offsets):             # <<<<<<<<<<<<<<
+ *         bytestr = _strencode(name)
+ *         namstring = bytestr
  */
-      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3236; __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 = 3236; __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 = 3236; __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 = 3236; __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__74, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3236; __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 = 3236; __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 = 3236; __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_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4043; __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 = 4043; __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 = 4043; __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 = 4043; __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 = 4043; __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 = 4043; __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 = 4043; __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 = 4043; __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 = 4043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
       }
-      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 = 3236; __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":3239
- *                 # 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 = 3239; __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);
+    } 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 = 4043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
+        break;
       }
-      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 = 3239; __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 = 3239; __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 = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (!__pyx_t_16) {
-        goto __pyx_L56_next_or;
-      } else {
+      __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 = 4043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; __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 = 3239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (!__pyx_t_16) {
+      #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_9 = __pyx_t_16;
-        goto __pyx_L55_bool_binop_done;
+        __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_L56_next_or:;
+      __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 = 4043; __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 = 4043; __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 = 4043; __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 = 4043; __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 = 4043; __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 = 4043; __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 = 4043; __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":3240
- *                 # 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
+    /* "netCDF4/_netCDF4.pyx":4044
+ *     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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __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 = 3240; __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 = 3240; __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 = 3240; __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_L55_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 = 3240; __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 = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __pyx_t_9 = __pyx_t_16;
-      __pyx_L55_bool_binop_done:;
-      if (__pyx_t_9) {
+    __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4044; __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":3241
- *                 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.
+    /* "netCDF4/_netCDF4.pyx":4045
+ *     for name, format, offset in zip(names, formats, offsets):
+ *         bytestr = _strencode(name)
+ *         namstring = bytestr             # <<<<<<<<<<<<<<
+ *         if format.kind != 'V': # scalar primitive type
+ *             try:
  */
-        __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 = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __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_L54;
-      }
-      __pyx_L54:;
+    __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_namstring = __pyx_t_2;
 
-      /* "netCDF4.pyx":3242
- *                    (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.
+    /* "netCDF4/_netCDF4.pyx":4046
+ *         bytestr = _strencode(name)
+ *         namstring = bytestr
+ *         if format.kind != 'V': # scalar primitive type             # <<<<<<<<<<<<<<
+ *             try:
+ *                 xtype_tmp = _nptonctype[format.str[1:]]
  */
-      __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 = 3242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_v_has_fillval = __pyx_t_2;
-      __pyx_t_2 = 0;
+    __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 = 4046; __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 = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    if (__pyx_t_5) {
 
-      /* "netCDF4.pyx":3245
- *                 # 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
+      /* "netCDF4/_netCDF4.pyx":4047
+ *         namstring = bytestr
+ *         if format.kind != 'V': # scalar primitive type
+ *             try:             # <<<<<<<<<<<<<<
+ *                 xtype_tmp = _nptonctype[format.str[1:]]
+ *             except KeyError:
  */
-      __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 = 3245; __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 = 3245; __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 = 3245; __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 = 3245; __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 = 3245; __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 = 3245; __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 = 3245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      {
+        __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/_netCDF4.pyx":4048
+ *         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 = 4048; __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 = 4048; __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__84, 1, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4048; __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 = 4048; __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 = 4048; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+          __pyx_v_xtype_tmp = __pyx_t_18;
         }
-        __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_L59;
-      }
-      __pyx_L59:;
+        __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":3246
- *                 # 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:
+        /* "netCDF4/_netCDF4.pyx":4049
+ *             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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_has_fillval, __pyx_n_s_any); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __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);
+        __pyx_t_4 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+        if (__pyx_t_4) {
+          __Pyx_AddTraceback("netCDF4._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 = 4049; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
+          __Pyx_GOTREF(__pyx_t_12);
+          __Pyx_GOTREF(__pyx_t_8);
+          __Pyx_GOTREF(__pyx_t_7);
+
+          /* "netCDF4/_netCDF4.pyx":4050
+ *                 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__85, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4050; __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 = 4050; __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:;
       }
-      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 = 3246; __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 = 3246; __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 = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (__pyx_t_9) {
 
-        /* "netCDF4.pyx":3247
- *                 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
+      /* "netCDF4/_netCDF4.pyx":4051
+ *             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_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 = 3247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_XDECREF_SET(__pyx_v_mask, __pyx_t_2);
-        __pyx_t_2 = 0;
+      __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 = 4051; __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 = 4051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-        /* "netCDF4.pyx":3248
- *                 if has_fillval.any():
- *                     mask=data==fillval
- *                     if fill_value is None:             # <<<<<<<<<<<<<<
- *                         fill_value = fillval
- *                     totalmask += mask
+      /* "netCDF4/_netCDF4.pyx":4052
+ *                 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_t_9 = (__pyx_v_fill_value == Py_None);
-        __pyx_t_16 = (__pyx_t_9 != 0);
-        if (__pyx_t_16) {
+      __pyx_v_ierr = nc_insert_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_namstring, __pyx_v_offset, __pyx_v_xtype_tmp);
 
-          /* "netCDF4.pyx":3249
- *                     mask=data==fillval
- *                     if fill_value is None:
- *                         fill_value = fillval             # <<<<<<<<<<<<<<
- *                     totalmask += mask
- *         # all values where data == missing_value or _FillValue are
+      /* "netCDF4/_netCDF4.pyx":4053
+ *             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_INCREF(__pyx_v_fillval);
-          __Pyx_DECREF_SET(__pyx_v_fill_value, __pyx_v_fillval);
-          goto __pyx_L61;
-        }
-        __pyx_L61:;
+      __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_5) {
 
-        /* "netCDF4.pyx":3250
- *                     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,
+        /* "netCDF4/_netCDF4.pyx":4054
+ *                                       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 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __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_L60;
+        __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 = 4054; __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 = 4054; __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 = 4054; __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 = 4054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-      __pyx_L60:;
-      goto __pyx_L49;
+      goto __pyx_L12;
     }
-    __pyx_L49:;
-  }
-  __pyx_L26:;
-
-  /* "netCDF4.pyx":3254
- *         # 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) {
+    /*else*/ {
 
-    /* "netCDF4.pyx":3255
- *         # otherwise _FillValue.
- *         if fill_value is not None:
- *             data = ma.masked_array(data,mask=totalmask,fill_value=fill_value)             # <<<<<<<<<<<<<<
- *         return data
- * 
+      /* "netCDF4/_netCDF4.pyx":4056
+ *                 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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3255; __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 = 3255; __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 = 3255; __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 = 3255; __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 = 3255; __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 = 3255; __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 = 3255; __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_L62;
-  }
-  __pyx_L62:;
+      __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 = 4056; __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 = 4056; __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 = 4056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      if (__pyx_t_5) {
 
-  /* "netCDF4.pyx":3256
- *         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):
+        /* "netCDF4/_netCDF4.pyx":4058
+ *             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_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_data);
-  __pyx_r = __pyx_v_data;
-  goto __pyx_L0;
+        __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__find_cmptype(__pyx_v_grp, __pyx_v_format); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4058; __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 = 4058; __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":3162
- *         return data
- * 
- *     def _toma(self,data):             # <<<<<<<<<<<<<<
- *         cdef int ierr, no_fill
- *         # private function for creating a masked array, masking missing_values
+        /* "netCDF4/_netCDF4.pyx":4059
+ *                 # 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_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4059; __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;
 
-  /* 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":3258
- *         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]
+        /* "netCDF4/_netCDF4.pyx":4060
+ *                 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 = 4060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_v_nested_namstring = __pyx_t_2;
 
-/* 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 = 3258; __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 = 3258; __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 = 3258; __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":3266
- *         cdef char **strdata
- *         cdef ndarray data2
- *         if not self._isvlen:             # <<<<<<<<<<<<<<
- *             raise TypeError('_assign_vlen method only for use with VLEN variables')
- *         ndims = self.ndim
+        /* "netCDF4/_netCDF4.pyx":4061
+ *                 bytestr = _strencode(name)
+ *                 nested_namstring = bytestr
+ *                 ierr = nc_insert_compound(grp._grpid, xtype,\             # <<<<<<<<<<<<<<
+ *                                           nested_namstring,\
+ *                                           offset, xtype_tmp)
  */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = ((!__pyx_t_1) != 0);
-  if (__pyx_t_2) {
+        __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 = 4061; __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 = 4061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-    /* "netCDF4.pyx":3267
- *         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"
+        /* "netCDF4/_netCDF4.pyx":4063
+ *                 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_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __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 = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+        __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":3268
- *         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.
+        /* "netCDF4/_netCDF4.pyx":4064
+ *                                           nested_namstring,\
+ *                                           offset, xtype_tmp)
+ *                 if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *             else: # array compound element
  */
-  __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 = 3268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_ndims = __pyx_t_4;
+        __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+        if (__pyx_t_5) {
 
-  /* "netCDF4.pyx":3269
- *             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.
+          /* "netCDF4/_netCDF4.pyx":4065
+ *                                           offset, xtype_tmp)
+ *                 if ierr != NC_NOERR:
+ *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+ *             else: # array compound element
+ *                 ndims = len(format.shape)
  */
-  __Pyx_INCREF(__pyx_kp_s_single_element_VLEN_slices_must);
-  __pyx_v_msg = __pyx_kp_s_single_element_VLEN_slices_must;
+          __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 = 4065; __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 = 4065; __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 = 4065; __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 = 4065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        goto __pyx_L24;
+      }
+      /*else*/ {
 
-  /* "netCDF4.pyx":3272
- *         # check to see that elem is a tuple of integers.
- *         # handle negative integers.
- *         if isinstance(elem, int):             # <<<<<<<<<<<<<<
- *             if ndims > 1:
- *                 raise IndexError(msg)
+        /* "netCDF4/_netCDF4.pyx":4067
+ *                     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_2 = PyInt_Check(__pyx_v_elem); 
-  __pyx_t_1 = (__pyx_t_2 != 0);
-  if (__pyx_t_1) {
+        __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 = 4067; __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 = 4067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        __pyx_v_ndims = __pyx_t_19;
 
-    /* "netCDF4.pyx":3273
- *         # handle negative integers.
- *         if isinstance(elem, int):
- *             if ndims > 1:             # <<<<<<<<<<<<<<
- *                 raise IndexError(msg)
- *             if elem < 0:
+        /* "netCDF4/_netCDF4.pyx":4068
+ *             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_1 = ((__pyx_v_ndims > 1) != 0);
-    if (__pyx_t_1) {
+        __pyx_t_4 = __pyx_v_ndims;
+        for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {
 
-      /* "netCDF4.pyx":3274
- *         if isinstance(elem, int):
- *             if ndims > 1:
- *                 raise IndexError(msg)             # <<<<<<<<<<<<<<
- *             if elem < 0:
- *                 if self.shape[0]+elem >= 0:
+          /* "netCDF4/_netCDF4.pyx":4069
+ *                 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_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __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 = 3274; __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 = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+          __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 = 4069; __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 = 4069; __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 = 4069; __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":3275
- *             if ndims > 1:
- *                 raise IndexError(msg)
- *             if elem < 0:             # <<<<<<<<<<<<<<
- *                 if self.shape[0]+elem >= 0:
- *                     elem = self.shape[0]+elem
+        /* "netCDF4/_netCDF4.pyx":4070
+ *                 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_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 = 3275; __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 = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-    if (__pyx_t_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 = 4070; __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 = 4070; __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 = 4070; __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 = 4070; __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 = 4070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+        if (__pyx_t_5) {
 
-      /* "netCDF4.pyx":3276
- *                 raise IndexError(msg)
- *             if elem < 0:
- *                 if self.shape[0]+elem >= 0:             # <<<<<<<<<<<<<<
- *                     elem = self.shape[0]+elem
- *                 else:
+          /* "netCDF4/_netCDF4.pyx":4071
+ *                     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_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 = 3276; __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 = 3276; __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 = 3276; __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 = 3276; __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 = 3276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-      if (__pyx_t_1) {
+          {
+            __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":3277
- *             if elem < 0:
- *                 if self.shape[0]+elem >= 0:
- *                     elem = self.shape[0]+elem             # <<<<<<<<<<<<<<
- *                 else:
- *                     raise IndexError("Illegal index")
+              /* "netCDF4/_netCDF4.pyx":4072
+ *                 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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3277; __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 = 3277; __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 = 3277; __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*/ {
+              __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4072; __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 = 4072; __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 = 4072; __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 = 4072; __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__86, 1, 0, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4072; __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 = 4072; __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 = 4072; __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":3279
- *                     elem = self.shape[0]+elem
- *                 else:
- *                     raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
- *         elif isinstance(elem, tuple):
- *             if len(elem) != ndims:
+            /* "netCDF4/_netCDF4.pyx":4073
+ *                     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_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3279; __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 = 3279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      __pyx_L7:;
-      goto __pyx_L6;
-    }
-    __pyx_L6:;
-    goto __pyx_L4;
-  }
+            __pyx_t_4 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+            if (__pyx_t_4) {
+              __Pyx_AddTraceback("netCDF4._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 = 4073; __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":3280
- *                 else:
- *                     raise IndexError("Illegal index")
- *         elif isinstance(elem, tuple):             # <<<<<<<<<<<<<<
- *             if len(elem) != ndims:
- *                 raise IndexError("Illegal index")
+              /* "netCDF4/_netCDF4.pyx":4074
+ *                         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 = PyTuple_Check(__pyx_v_elem); 
-  __pyx_t_2 = (__pyx_t_1 != 0);
-  if (__pyx_t_2) {
+              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4074; __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 = 4074; __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":3281
- *                     raise IndexError("Illegal index")
- *         elif isinstance(elem, tuple):
- *             if len(elem) != ndims:             # <<<<<<<<<<<<<<
- *                 raise IndexError("Illegal index")
- *             elemnew = []
+          /* "netCDF4/_netCDF4.pyx":4075
+ *                     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_6 = PyObject_Length(__pyx_v_elem); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_2 = ((__pyx_t_6 != __pyx_v_ndims) != 0);
-    if (__pyx_t_2) {
+          __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 = 4075; __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 = 4075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
-      /* "netCDF4.pyx":3282
- *         elif isinstance(elem, tuple):
- *             if len(elem) != ndims:
- *                 raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
- *             elemnew = []
- *             for n,e in enumerate(elem):
+          /* "netCDF4/_netCDF4.pyx":4076
+ *                         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_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3282; __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 = 3282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+          __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":3283
- *             if len(elem) != ndims:
- *                 raise IndexError("Illegal index")
- *             elemnew = []             # <<<<<<<<<<<<<<
- *             for n,e in enumerate(elem):
- *                 if not isinstance(e, int):
+          /* "netCDF4/_netCDF4.pyx":4077
+ *                     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_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __pyx_v_elemnew = ((PyObject*)__pyx_t_3);
-    __pyx_t_3 = 0;
+          __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+          if (__pyx_t_5) {
 
-    /* "netCDF4.pyx":3284
- *                 raise IndexError("Illegal index")
- *             elemnew = []
- *             for n,e in enumerate(elem):             # <<<<<<<<<<<<<<
- *                 if not isinstance(e, int):
- *                     raise IndexError(msg)
+            /* "netCDF4/_netCDF4.pyx":4078
+ *                            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_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 = 3284; __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 = 3284; __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 = 3284; __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 = 3284; __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 = 3284; __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 = 3284; __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 = 3284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+            __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 = 4078; __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 = 4078; __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 = 4078; __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 = 4078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           }
-          break;
+          goto __pyx_L28;
         }
-        __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":3285
- *             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":3286
- *             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 = 3286; __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 = 3286; __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 = 3286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
+        /*else*/ {
 
-      /* "netCDF4.pyx":3287
- *                 if not isinstance(e, int):
- *                     raise IndexError(msg)
- *                 elif e < 0:             # <<<<<<<<<<<<<<
- *                     enew = self.shape[n]+e
- *                     if enew < 0:
+          /* "netCDF4/_netCDF4.pyx":4081
+ *                 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 = 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 = 3287; __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 = 3287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      if (__pyx_t_1) {
+          __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 = 4081; __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 = 4081; __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_8_netCDF4__find_cmptype(__pyx_v_grp, __pyx_t_12); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4081; __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 = 4081; __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":3288
- *                     raise IndexError(msg)
- *                 elif e < 0:
- *                     enew = self.shape[n]+e             # <<<<<<<<<<<<<<
- *                     if enew < 0:
- *                         raise IndexError("Illegal index")
+          /* "netCDF4/_netCDF4.pyx":4082
+ *                     # 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_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3288; __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 = 3288; __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 = 3288; __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;
+          __pyx_t_8 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4082; __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":3289
- *                 elif e < 0:
- *                     enew = self.shape[n]+e
- *                     if enew < 0:             # <<<<<<<<<<<<<<
- *                         raise IndexError("Illegal index")
- *                     else:
+          /* "netCDF4/_netCDF4.pyx":4083
+ *                     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_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 = 3289; __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 = 3289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        if (__pyx_t_1) {
+          __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_v_nested_namstring = __pyx_t_2;
 
-          /* "netCDF4.pyx":3290
- *                     enew = self.shape[n]+e
- *                     if enew < 0:
- *                         raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
- *                     else:
- *                         elemnew.append(self.shape[n]+e)
+          /* "netCDF4/_netCDF4.pyx":4084
+ *                     bytestr = _strencode(name)
+ *                     nested_namstring = bytestr
+ *                     ierr = nc_insert_array_compound(grp._grpid,xtype,\             # <<<<<<<<<<<<<<
+ *                                                     nested_namstring,\
+ *                                                     offset,xtype_tmp,\
  */
-          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __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 = 4084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_GOTREF(__pyx_t_8);
-          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+          __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 = 4084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        /*else*/ {
 
-          /* "netCDF4.pyx":3292
- *                         raise IndexError("Illegal index")
- *                     else:
- *                         elemnew.append(self.shape[n]+e)             # <<<<<<<<<<<<<<
- *                 else:
- *                     elemnew.append(e)
+          /* "netCDF4/_netCDF4.pyx":4087
+ *                                                     nested_namstring,\
+ *                                                     offset,xtype_tmp,\
+ *                                                     ndims,dim_sizes)             # <<<<<<<<<<<<<<
+ *                     if ierr != NC_NOERR:
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-          __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 = 3292; __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 = 3292; __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 = 3292; __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 = 3292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        }
-        goto __pyx_L11;
-      }
-      /*else*/ {
+          __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":3294
- *                         elemnew.append(self.shape[n]+e)
- *                 else:
- *                     elemnew.append(e)             # <<<<<<<<<<<<<<
- *             elem = tuple(elemnew)
- *         else:
+          /* "netCDF4/_netCDF4.pyx":4088
+ *                                                     offset,xtype_tmp,\
+ *                                                     ndims,dim_sizes)
+ *                     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     return xtype
  */
-        __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 = 3294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      __pyx_L11:;
+          __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+          if (__pyx_t_5) {
 
-      /* "netCDF4.pyx":3284
- *                 raise IndexError("Illegal index")
- *             elemnew = []
- *             for n,e in enumerate(elem):             # <<<<<<<<<<<<<<
- *                 if not isinstance(e, int):
- *                     raise IndexError(msg)
+            /* "netCDF4/_netCDF4.pyx":4089
+ *                                                     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 = 4089; __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 = 4089; __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 = 4089; __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 = 4089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+        }
+        __pyx_L28:;
+      }
+      __pyx_L24:;
     }
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_L12:;
 
-    /* "netCDF4.pyx":3295
- *                 else:
- *                     elemnew.append(e)
- *             elem = tuple(elemnew)             # <<<<<<<<<<<<<<
- *         else:
- *             raise IndexError(msg)
+    /* "netCDF4/_netCDF4.pyx":4043
+ *     formats = _sortbylist(formats, offsets)
+ *     offsets.sort()
+ *     for name, format, offset in zip(names, formats, offsets):             # <<<<<<<<<<<<<<
+ *         bytestr = _strencode(name)
+ *         namstring = bytestr
  */
-    __pyx_t_3 = PyList_AsTuple(__pyx_v_elemnew); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __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*/ {
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-    /* "netCDF4.pyx":3297
- *             elem = tuple(elemnew)
- *         else:
- *             raise IndexError(msg)             # <<<<<<<<<<<<<<
- *         # set start, count
- *         if isinstance(elem, tuple):
+  /* "netCDF4/_netCDF4.pyx":4090
+ *                     if ierr != NC_NOERR:
+ *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *     return xtype             # <<<<<<<<<<<<<<
+ * 
+ * cdef _find_cmptype(grp, dtype):
  */
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3297; __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 = 3297; __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 = 3297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_L4:;
+  __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 = 4090; __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":3299
- *             raise IndexError(msg)
- *         # set start, count
- *         if isinstance(elem, tuple):             # <<<<<<<<<<<<<<
- *             start = list(elem)
- *         else:
+  /* "netCDF4/_netCDF4.pyx":4020
+ *         (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__.
  */
-  __pyx_t_1 = PyTuple_Check(__pyx_v_elem); 
-  __pyx_t_2 = (__pyx_t_1 != 0);
-  if (__pyx_t_2) {
 
-    /* "netCDF4.pyx":3300
- *         # set start, count
- *         if isinstance(elem, tuple):
- *             start = list(elem)             # <<<<<<<<<<<<<<
- *         else:
- *             start = [elem]
+  /* 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._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/_netCDF4.pyx":4092
+ *     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.
  */
-    __pyx_t_8 = PySequence_List(__pyx_v_elem); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3300; __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":3302
- *             start = list(elem)
- *         else:
- *             start = [elem]             # <<<<<<<<<<<<<<
- *         count = [1]*ndims
- *         for n from 0 <= n < ndims:
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__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/_netCDF4.pyx":4096
+ *     # 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_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; __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:;
+  __pyx_v_match = 0;
 
-  /* "netCDF4.pyx":3303
- *         else:
- *             start = [elem]
- *         count = [1]*ndims             # <<<<<<<<<<<<<<
- *         for n from 0 <= n < ndims:
- *             startp[n] = start[n]
+  /* "netCDF4/_netCDF4.pyx":4097
+ *     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_8 = PyList_New(1 * ((__pyx_v_ndims<0) ? 0:__pyx_v_ndims)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; __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_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_cmptypes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __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 = 4097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L6_unpacking_done:;
     }
-  }
-  __pyx_v_count = ((PyObject*)__pyx_t_8);
-  __pyx_t_8 = 0;
-
-  /* "netCDF4.pyx":3304
- *             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":3305
- *         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 = 3305; __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 = 3305; __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":3306
- *         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 = 3306; __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 = 3306; __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;
-  }
+    __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":3307
- *             startp[n] = start[n]
- *             countp[n] = count[n]
- *         if self.dtype == str: # VLEN string             # <<<<<<<<<<<<<<
- *             strdata = <char **>malloc(sizeof(char *))
- *             bytestr = _strencode(data)
+    /* "netCDF4/_netCDF4.pyx":4098
+ *     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_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 = 3307; __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 = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-  if (__pyx_t_2) {
+    __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 = 4098; __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 = 4098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_xtype = __pyx_t_9;
 
-    /* "netCDF4.pyx":3308
- *             countp[n] = count[n]
- *         if self.dtype == str: # VLEN string
- *             strdata = <char **>malloc(sizeof(char *))             # <<<<<<<<<<<<<<
- *             bytestr = _strencode(data)
- *             strdata[0] = bytestr
+    /* "netCDF4/_netCDF4.pyx":4099
+ *     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_v_strdata = ((char **)malloc((sizeof(char *))));
+    __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 = 4099; __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 = 4099; __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 = 4099; __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":3309
- *         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,
+    /* "netCDF4/_netCDF4.pyx":4100
+ *         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_8 = __pyx_f_7netCDF4__strencode(__pyx_v_data, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_8);
-    __pyx_v_bytestr = __pyx_t_8;
-    __pyx_t_8 = 0;
+    __pyx_t_6 = PyList_New(0); 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_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4100; __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 = 4100; __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 = 4100; __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 = 4100; __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 = 4100; __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 = 4100; __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 = 4100; __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 = 4100; __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 = 4100; __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 = 4100; __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 = 4100; __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 = 4100; __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 = 4100; __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":3310
- *             strdata = <char **>malloc(sizeof(char *))
- *             bytestr = _strencode(data)
- *             strdata[0] = bytestr             # <<<<<<<<<<<<<<
- *             ierr = nc_put_vara(self._grpid, self._varid,
- *                                startp, countp, strdata)
+    /* "netCDF4/_netCDF4.pyx":4101
+ *         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_11 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    (__pyx_v_strdata[0]) = __pyx_t_11;
+    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4101; __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 = 4101; __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 = 4101; __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 = 4101; __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 = 4101; __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 = 4101; __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 = 4101; __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 = 4101; __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 = 4101; __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 = 4101; __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 = 4101; __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 = 4101; __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 = 4101; __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 = 4101; __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 = 4101; __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":3311
- *             bytestr = _strencode(data)
- *             strdata[0] = bytestr
- *             ierr = nc_put_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
- *                                startp, countp, strdata)
- *             if ierr != NC_NOERR:
+    /* "netCDF4/_netCDF4.pyx":4104
+ *         # match names, formats, but not offsets (they may be changed
+ *         # by netcdf lib).
+ *         if names1==names2 and formats1==formats2:             # <<<<<<<<<<<<<<
+ *             match = True
+ *             break
  */
-    __pyx_v_ierr = nc_put_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_strdata);
+    __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 = 4104; __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 = 4104; __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 = 4104; __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 = 4104; __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":3313
- *             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)
+      /* "netCDF4/_netCDF4.pyx":4105
+ *         # by netcdf lib).
+ *         if names1==names2 and formats1==formats2:
+ *             match = True             # <<<<<<<<<<<<<<
+ *             break
+ *     if not match:
  */
-    __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
-    if (__pyx_t_2) {
+      __pyx_v_match = 1;
 
-      /* "netCDF4.pyx":3314
- *                                startp, countp, strdata)
- *             if ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *             free(strdata)
- *         else: # regular VLEN
+      /* "netCDF4/_netCDF4.pyx":4106
+ *         if names1==names2 and formats1==formats2:
+ *             match = True
+ *             break             # <<<<<<<<<<<<<<
+ *     if not match:
+ *         try:
  */
-      __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 = 3314; __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 = 3314; __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 = 3314; __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 = 3314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L4_break;
     }
 
-    /* "netCDF4.pyx":3315
- *             if ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *             free(strdata)             # <<<<<<<<<<<<<<
- *         else: # regular VLEN
- *             if data.dtype != self.dtype:
+    /* "netCDF4/_netCDF4.pyx":4097
+ *     cdef nc_type xtype
+ *     match = False
+ *     for cmpname, cmpdt in grp.cmptypes.items():             # <<<<<<<<<<<<<<
+ *         xtype = cmpdt._nc_type
+ *         names1 = dtype.names; names2 = cmpdt.dtype.names
  */
-    free(__pyx_v_strdata);
-    goto __pyx_L16;
   }
-  /*else*/ {
-
-    /* "netCDF4.pyx":3317
- *             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 = 3317; __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 = 3317; __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 = 3317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    if (__pyx_t_2) {
+  __pyx_L4_break:;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-      /* "netCDF4.pyx":3318
- *         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))
+  /* "netCDF4/_netCDF4.pyx":4107
+ *             match = True
+ *             break
+ *     if not match:             # <<<<<<<<<<<<<<
+ *         try:
+ *             parent_grp = grp.parent
  */
-      __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 = 3318; __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 = 3318; __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 = 3318; __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 = 3318; __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 = 3318; __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 = 3318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+  __pyx_t_12 = ((!(__pyx_v_match != 0)) != 0);
+  if (__pyx_t_12) {
 
-    /* "netCDF4.pyx":3319
- *             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)
+    /* "netCDF4/_netCDF4.pyx":4108
+ *             break
+ *     if not match:
+ *         try:             # <<<<<<<<<<<<<<
+ *             parent_grp = grp.parent
+ *         except AttributeError:
  */
-    if (!(likely(((__pyx_v_data) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_data, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3319; __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;
+    {
+      __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":3320
- *                 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
+        /* "netCDF4/_netCDF4.pyx":4109
+ *     if not match:
+ *         try:
+ *             parent_grp = grp.parent             # <<<<<<<<<<<<<<
+ *         except AttributeError:
+ *             raise ValueError("cannot find compound type in this group or parent groups")
  */
-    __pyx_v_vldata = ((nc_vlen_t *)malloc((sizeof(nc_vlen_t))));
+        __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 = 4109; __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":3321
- *             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,
+      /* "netCDF4/_netCDF4.pyx":4110
+ *         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_v_vldata[0]).len = PyArray_SIZE(__pyx_v_data2);
+      __pyx_t_17 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
+      if (__pyx_t_17) {
+        __Pyx_AddTraceback("netCDF4._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 = 4110; __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":3322
- *             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)
+        /* "netCDF4/_netCDF4.pyx":4111
+ *             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_11 = __pyx_v_data2->data;
-    (__pyx_v_vldata[0]).p = __pyx_t_11;
+        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4111; __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 = 4111; __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":3323
- *             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:
+    /* "netCDF4/_netCDF4.pyx":4112
+ *         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_v_ierr = nc_put_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_vldata);
+    __pyx_t_12 = (__pyx_v_parent_grp == Py_None);
+    __pyx_t_13 = (__pyx_t_12 != 0);
+    if (__pyx_t_13) {
 
-    /* "netCDF4.pyx":3325
- *             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)
+      /* "netCDF4/_netCDF4.pyx":4113
+ *             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_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
-    if (__pyx_t_2) {
+      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4113; __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 = 4113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    /*else*/ {
 
-      /* "netCDF4.pyx":3326
- *                                startp, countp, vldata)
- *             if ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *             free(vldata)
+      /* "netCDF4/_netCDF4.pyx":4115
+ *             raise ValueError("cannot find compound type in this group or parent groups")
+ *         else:
+ *             xtype = _find_cmptype(parent_grp,dtype)             # <<<<<<<<<<<<<<
+ *     return xtype
  * 
  */
-      __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 = 3326; __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 = 3326; __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 = 3326; __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 = 3326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__find_cmptype(__pyx_v_parent_grp, __pyx_v_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4115; __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 = 4115; __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":3327
- *             if ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *             free(vldata)             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":4116
+ *         else:
+ *             xtype = _find_cmptype(parent_grp,dtype)
+ *     return xtype             # <<<<<<<<<<<<<<
  * 
- *     def __setitem__(self, elem, data):
+ * cdef _read_compound(group, nc_type xtype, endian=None):
  */
-    free(__pyx_v_vldata);
-  }
-  __pyx_L16:;
+  __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 = 4116; __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":3258
- *         return data
+  /* "netCDF4/_netCDF4.pyx":4092
+ *     return xtype
  * 
- *     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 _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_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_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_XDECREF(__pyx_t_6);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("netCDF4._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":3329
- *             free(vldata)
+/* "netCDF4/_netCDF4.pyx":4118
+ *     return xtype
  * 
- *     def __setitem__(self, elem, data):             # <<<<<<<<<<<<<<
- *         # This special method is used to assign to the netCDF variable
- *         # using "extended slice syntax". The extended slice syntax
+ * cdef _read_compound(group, nc_type xtype, endian=None):             # <<<<<<<<<<<<<<
+ *     # read a compound data type id from an existing file,
+ *     # construct a corresponding numpy dtype instance,
  */
 
-/* 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;
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_compound(PyObject *__pyx_v_group, nc_type __pyx_v_xtype, struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound *__pyx_optional_args) {
+  PyObject *__pyx_v_endian = ((PyObject *)Py_None);
+  int __pyx_v_ierr;
+  int __pyx_v_nf;
+  int __pyx_v_numdims;
+  int __pyx_v_ndim;
+  int __pyx_v_classp;
+  int __pyx_v__grpid;
+  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_format = NULL;
+  PyObject *__pyx_v_dtype_dict = NULL;
+  PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
-  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
   int __pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
+  char *__pyx_t_4;
   PyObject *__pyx_t_5 = NULL;
-  Py_ssize_t __pyx_t_6;
+  PyObject *__pyx_t_6 = NULL;
   PyObject *__pyx_t_7 = NULL;
-  int __pyx_t_8;
-  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_8 = NULL;
+  Py_ssize_t __pyx_t_9;
   PyObject *__pyx_t_10 = NULL;
-  PyObject *(*__pyx_t_11)(PyObject *);
-  Py_ssize_t __pyx_t_12;
+  size_t __pyx_t_11;
+  int __pyx_t_12;
   PyObject *__pyx_t_13 = NULL;
   PyObject *__pyx_t_14 = NULL;
-  PyObject *(*__pyx_t_15)(PyObject *);
+  PyObject *__pyx_t_15 = NULL;
+  int __pyx_t_16;
+  struct __pyx_opt_args_7netCDF4_8_netCDF4__read_compound __pyx_t_17;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__setitem__", 0);
-  __Pyx_INCREF(__pyx_v_data);
+  __Pyx_RefNannySetupContext("_read_compound", 0);
+  if (__pyx_optional_args) {
+    if (__pyx_optional_args->__pyx_n > 0) {
+      __pyx_v_endian = __pyx_optional_args->endian;
+    }
+  }
 
-  /* "netCDF4.pyx":3336
- *         # 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
+  /* "netCDF4/_netCDF4.pyx":4131
+ *     cdef char cmp_namstring[NC_MAX_NAME+1]
+ *     # get name and number of fields.
+ *     _grpid = group._grpid             # <<<<<<<<<<<<<<
+ *     with nogil:
+ *         ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields)
  */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
+  __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 = 4131; __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 = 4131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v__grpid = __pyx_t_2;
 
-    /* "netCDF4.pyx":3337
- * 
- *         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
+  /* "netCDF4/_netCDF4.pyx":4132
+ *     # get name and number of fields.
+ *     _grpid = group._grpid
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields)
+ *     if ierr != NC_NOERR:
  */
-    __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 = 3337; __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 = 3337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (__pyx_t_1) {
+  {
+      #ifdef WITH_THREAD
+      PyThreadState *_save;
+      Py_UNBLOCK_THREADS
+      #endif
+      /*try:*/ {
 
-      /* "netCDF4.pyx":3341
- *                 # 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
+        /* "netCDF4/_netCDF4.pyx":4133
+ *     _grpid = group._grpid
+ *     with nogil:
+ *         ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields)             # <<<<<<<<<<<<<<
+ *     if ierr != NC_NOERR:
+ *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  */
-      __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 = 3341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0);
-      if (__pyx_t_3) {
+        __pyx_v_ierr = nc_inq_compound(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_cmp_namstring, NULL, (&__pyx_v_nfields));
+      }
 
-        /* "netCDF4.pyx":3342
- *                 # 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']:
+      /* "netCDF4/_netCDF4.pyx":4132
+ *     # get name and number of fields.
+ *     _grpid = group._grpid
+ *     with nogil:             # <<<<<<<<<<<<<<
+ *         ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields)
+ *     if ierr != NC_NOERR:
  */
-        __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 = 3342; __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 = 3342; __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;
+      /*finally:*/ {
+        /*normal exit:*/{
+          #ifdef WITH_THREAD
+          Py_BLOCK_THREADS
+          #endif
+          goto __pyx_L5;
         }
-        __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 = 3342; __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;
+        __pyx_L5:;
+      }
+  }
 
-        /* "netCDF4.pyx":3343
- *                 if not hasattr(data,'ndim'):
- *                     self._assign_vlen(elem, data)
- *                     return             # <<<<<<<<<<<<<<
- *                 elif data.dtype.kind in ['S', 'U']:
- *                     data = data.astype(object)
+  /* "netCDF4/_netCDF4.pyx":4134
+ *     with nogil:
+ *         ierr = nc_inq_compound(_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_r = 0;
-        goto __pyx_L0;
-      }
+  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+  if (__pyx_t_3) {
 
-      /* "netCDF4.pyx":3344
- *                     self._assign_vlen(elem, data)
- *                     return
- *                 elif data.dtype.kind in ['S', 'U']:             # <<<<<<<<<<<<<<
- *                     data = data.astype(object)
- *                 elif data.dtype.kind != 'O':
+    /* "netCDF4/_netCDF4.pyx":4135
+ *         ierr = nc_inq_compound(_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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3344; __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 = 3344; __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 = 3344; __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 = 3344; __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) {
+    __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 = 4135; __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 = 4135; __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 = 4135; __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 = 4135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-        /* "netCDF4.pyx":3345
- *                     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 '
+  /* "netCDF4/_netCDF4.pyx":4136
+ *     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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); 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);
-        __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);
-          }
+  __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_cmp_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4136; __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 = 4136; __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 = 4136; __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 = 4136; __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 = 4136; __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 = 4136; __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/_netCDF4.pyx":4138
+ *     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 = 4138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_names = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4139
+ *     # 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 = 4139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_formats = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4140
+ *     names = []
+ *     formats = []
+ *     offsets = []             # <<<<<<<<<<<<<<
+ *     for nf from 0 <= nf < nfields:
+ *         with nogil:
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_offsets = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4141
+ *     formats = []
+ *     offsets = []
+ *     for nf from 0 <= nf < nfields:             # <<<<<<<<<<<<<<
+ *         with nogil:
+ *             ierr = nc_inq_compound_field(_grpid,
+ */
+  __pyx_t_11 = __pyx_v_nfields;
+  for (__pyx_v_nf = 0; __pyx_v_nf < __pyx_t_11; __pyx_v_nf++) {
+
+    /* "netCDF4/_netCDF4.pyx":4142
+ *     offsets = []
+ *     for nf from 0 <= nf < nfields:
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_compound_field(_grpid,
+ *                                          xtype,
+ */
+    {
+        #ifdef WITH_THREAD
+        PyThreadState *_save;
+        Py_UNBLOCK_THREADS
+        #endif
+        /*try:*/ {
+
+          /* "netCDF4/_netCDF4.pyx":4143
+ *     for nf from 0 <= nf < nfields:
+ *         with nogil:
+ *             ierr = nc_inq_compound_field(_grpid,             # <<<<<<<<<<<<<<
+ *                                          xtype,
+ *                                          nf,
+ */
+          __pyx_v_ierr = nc_inq_compound_field(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_nf, __pyx_v_field_namstring, (&__pyx_v_offset), (&__pyx_v_field_typeid), (&__pyx_v_numdims), __pyx_v_dim_sizes);
         }
-        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 = 3345; __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 = 3345; __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 = 3345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_4);
-          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+        /* "netCDF4/_netCDF4.pyx":4142
+ *     offsets = []
+ *     for nf from 0 <= nf < nfields:
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_compound_field(_grpid,
+ *                                          xtype,
+ */
+        /*finally:*/ {
+          /*normal exit:*/{
+            #ifdef WITH_THREAD
+            Py_BLOCK_THREADS
+            #endif
+            goto __pyx_L13;
+          }
+          __pyx_L13:;
         }
-        __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":3346
- *                 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')
+    /* "netCDF4/_netCDF4.pyx":4151
+ *                                          &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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3346; __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 = 3346; __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 = 3346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (__pyx_t_1) {
+    __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_3) {
 
-        /* "netCDF4.pyx":3347
- *                     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)
+      /* "netCDF4/_netCDF4.pyx":4152
+ *                                          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_INCREF(__pyx_kp_s_only_numpy_string_unicode_or_obj);
-        __pyx_v_msg = __pyx_kp_s_only_numpy_string_unicode_or_obj;
+      __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 = 4152; __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 = 4152; __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 = 4152; __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 = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-        /* "netCDF4.pyx":3349
- *                     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
+    /* "netCDF4/_netCDF4.pyx":4153
+ *         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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3349; __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 = 3349; __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 = 3349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = __Pyx_PyObject_FromString(__pyx_v_field_namstring); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4153; __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 = 4153; __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 = 4153; __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 = 4153; __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_L5:;
-      goto __pyx_L4;
     }
-    /*else*/ {
+    __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4153; __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 = 4153; __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":3354
- *                 # 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
+    /* "netCDF4/_netCDF4.pyx":4154
+ *             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_3 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3354; __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 = 3354; __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 = 3354; __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 = 3354; __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) {
+    __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 = 4154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "netCDF4/_netCDF4.pyx":4155
+ *         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 = 4155; __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 = 4155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":4157
+ *         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/_netCDF4.pyx":4158
+ *         # 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":3355
- *                 # of the vlen var.
- *                 if not hasattr(data,'ndim') or data.dtype.kind != 'O':
- *                     self._assign_vlen(elem, data)             # <<<<<<<<<<<<<<
- *                     return
- * 
+      /* "netCDF4/_netCDF4.pyx":4159
+ *         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_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 = 3355; __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 = 3355; __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 = 3355; __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;
+      __pyx_t_2 = __pyx_v_numdims;
+      for (__pyx_v_ndim = 0; __pyx_v_ndim < __pyx_t_2; __pyx_v_ndim++) {
 
-        /* "netCDF4.pyx":3356
- *                 if not hasattr(data,'ndim') or data.dtype.kind != 'O':
- *                     self._assign_vlen(elem, data)
- *                     return             # <<<<<<<<<<<<<<
- * 
- *         # A numpy array is needed. Convert if necessary.
+        /* "netCDF4/_netCDF4.pyx":4160
+ *         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_r = 0;
-        goto __pyx_L0;
+        __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 = 4160; __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 = 4160; __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 = 4160; __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_L15;
     }
-    __pyx_L4:;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
+    __pyx_L15:;
 
-  /* "netCDF4.pyx":3360
- *         # 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 \
+    /* "netCDF4/_netCDF4.pyx":4162
+ *                 field_shape = field_shape + (dim_sizes[ndim],)
+ *         # check to see if this field is a nested compound type.
+ *         try:             # <<<<<<<<<<<<<<
+ *             field_type =  _nctonptype[field_typeid]
+ *             if endian is not None:
  */
-  __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 = 3360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_8 = ((!(__pyx_t_1 != 0)) != 0);
-  if (__pyx_t_8) {
+    {
+      __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":3362
- *         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)
+        /* "netCDF4/_netCDF4.pyx":4163
+ *         # check to see if this field is a nested compound type.
+ *         try:
+ *             field_type =  _nctonptype[field_typeid]             # <<<<<<<<<<<<<<
+ *             if endian is not None:
+ *                 format = endian + format
  */
-    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __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 = 3362; __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 = 3362; __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 {
-    }
+        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4163; __pyx_clineno = __LINE__; goto __pyx_L18_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 = 4163; __pyx_clineno = __LINE__; goto __pyx_L18_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;
 
-    /* "netCDF4.pyx":3363
- *             # 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:
+        /* "netCDF4/_netCDF4.pyx":4164
+ *         try:
+ *             field_type =  _nctonptype[field_typeid]
+ *             if endian is not None:             # <<<<<<<<<<<<<<
+ *                 format = endian + format
+ *         except KeyError:
  */
-    __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 = 3363; __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 = 3363; __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) {
+        __pyx_t_3 = (__pyx_v_endian != Py_None);
+        __pyx_t_16 = (__pyx_t_3 != 0);
+        if (__pyx_t_16) {
 
-      /* "netCDF4.pyx":3364
- *             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)
+          /* "netCDF4/_netCDF4.pyx":4165
+ *             field_type =  _nctonptype[field_typeid]
+ *             if endian is not None:
+ *                 format = endian + format             # <<<<<<<<<<<<<<
+ *         except KeyError:
+ *             with nogil:
  */
-      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3364; __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 = 3364; __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 = 3364; __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 = 3364; __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;
+          if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4165; __pyx_clineno = __LINE__; goto __pyx_L18_error;} }
+          __pyx_t_10 = PyNumber_Add(__pyx_v_endian, __pyx_v_format); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4165; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
+          __Pyx_GOTREF(__pyx_t_10);
+          __Pyx_XDECREF_SET(__pyx_v_format, __pyx_t_10);
+          __pyx_t_10 = 0;
+          goto __pyx_L26;
         }
+        __pyx_L26:;
       }
-      __pyx_t_9 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3364; __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 = 3364; __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*/ {
+      __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_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_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":3366
- *                 data = numpy.array(data,numpy.float)
- *             else:
- *                 data = numpy.array(data,self.dtype)             # <<<<<<<<<<<<<<
- * 
- *         start, count, stride, put_ind =\
+      /* "netCDF4/_netCDF4.pyx":4166
+ *             if endian is not None:
+ *                 format = endian + format
+ *         except KeyError:             # <<<<<<<<<<<<<<
+ *             with nogil:
+ *                 ierr = nc_inq_user_type(_grpid,
  */
-      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3366; __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 = 3366; __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 = 3366; __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:;
+      __pyx_t_2 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+      if (__pyx_t_2) {
+        __Pyx_AddTraceback("netCDF4._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 = 4166; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_GOTREF(__pyx_t_8);
 
-  /* "netCDF4.pyx":3369
- * 
- *         start, count, stride, put_ind =\
- *         _StartCountStride(elem,self.shape,self.dimensions,self._grp,datashape=data.shape,put=True)             # <<<<<<<<<<<<<<
- *         datashape = _out_array_shape(count)
- * 
+        /* "netCDF4/_netCDF4.pyx":4167
+ *                 format = endian + format
+ *         except KeyError:
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_user_type(_grpid,
+ *                        field_typeid,NULL,NULL,NULL,NULL,&classp)
  */
-  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3369; __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 = 3369; __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 = 3369; __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 = 3369; __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 = 3369; __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 = 3369; __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 = 3369; __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 = 3369; __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 = 3369; __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 = 3368; __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 = 3368; __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 = 3368; __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 = 3368; __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 = 3368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_L18_unpacking_done:;
-  }
+        {
+            #ifdef WITH_THREAD
+            PyThreadState *_save;
+            Py_UNBLOCK_THREADS
+            #endif
+            /*try:*/ {
 
-  /* "netCDF4.pyx":3368
- *                 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)
+              /* "netCDF4/_netCDF4.pyx":4168
+ *         except KeyError:
+ *             with nogil:
+ *                 ierr = nc_inq_user_type(_grpid,             # <<<<<<<<<<<<<<
+ *                        field_typeid,NULL,NULL,NULL,NULL,&classp)
+ *             if classp == NC_COMPOUND: # a compound type
  */
-  __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;
+              __pyx_v_ierr = nc_inq_user_type(__pyx_v__grpid, __pyx_v_field_typeid, NULL, NULL, NULL, NULL, (&__pyx_v_classp));
+            }
 
-  /* "netCDF4.pyx":3370
- *         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
+            /* "netCDF4/_netCDF4.pyx":4167
+ *                 format = endian + format
+ *         except KeyError:
+ *             with nogil:             # <<<<<<<<<<<<<<
+ *                 ierr = nc_inq_user_type(_grpid,
+ *                        field_typeid,NULL,NULL,NULL,NULL,&classp)
  */
-  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); 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);
-  __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 = 3370; __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 = 3370; __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 = 3370; __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;
+            /*finally:*/ {
+              /*normal exit:*/{
+                #ifdef WITH_THREAD
+                Py_BLOCK_THREADS
+                #endif
+                goto __pyx_L33;
+              }
+              __pyx_L33:;
+            }
+        }
 
-  /* "netCDF4.pyx":3374
- *         # 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
+        /* "netCDF4/_netCDF4.pyx":4170
+ *                 ierr = nc_inq_user_type(_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, endian=endian)
  */
-  __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 = 3374; __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 = 3374; __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 = 3374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-  if (__pyx_t_8) {
+        __pyx_t_16 = ((__pyx_v_classp == NC_COMPOUND) != 0);
+        if (__pyx_t_16) {
 
-    /* "netCDF4.pyx":3375
- *         # 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.
+          /* "netCDF4/_netCDF4.pyx":4172
+ *             if classp == NC_COMPOUND: # a compound type
+ *                 # recursively call this function?
+ *                 field_type = _read_compound(group, field_typeid, endian=endian)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 raise KeyError('compound field of an unsupported data type')
  */
-    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3375; __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 = 3375; __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 = 3375; __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 = 3375; __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:;
+          __pyx_t_17.__pyx_n = 1;
+          __pyx_t_17.endian = __pyx_v_endian;
+          __pyx_t_7 = __pyx_f_7netCDF4_8_netCDF4__read_compound(__pyx_v_group, __pyx_v_field_typeid, &__pyx_t_17); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4172; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_XDECREF_SET(__pyx_v_field_type, __pyx_t_7);
+          __pyx_t_7 = 0;
+          goto __pyx_L34;
+        }
+        /*else*/ {
 
-  /* "netCDF4.pyx":3378
- *         # 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()
+          /* "netCDF4/_netCDF4.pyx":4174
+ *                 field_type = _read_compound(group, field_typeid, endian=endian)
+ *             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__90, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4174; __pyx_clineno = __LINE__; goto __pyx_L20_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 = 4174; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
+        }
+        __pyx_L34:;
+        __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_L19_exception_handled;
+      }
+      goto __pyx_L20_except_error;
+      __pyx_L20_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_L19_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_L25_try_end:;
+    }
+
+    /* "netCDF4/_netCDF4.pyx":4175
+ *             else:
+ *                 raise KeyError('compound field of an unsupported data type')
+ *         if field_shape != ():             # <<<<<<<<<<<<<<
+ *             formats.append((field_type,field_shape))
+ *         else:
  */
-  __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 = 3378; __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 = 3378; __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 = 3378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_8 = ((__pyx_t_6 != __pyx_t_12) != 0);
-  if (__pyx_t_8) {
+    __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 = 4175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    if (__pyx_t_16) {
 
-    /* "netCDF4.pyx":3380
- *         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)
- * 
+      /* "netCDF4/_netCDF4.pyx":4176
+ *                 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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_view); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3380; __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 = 3380; __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 = 3380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4176; __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 = 4176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+      goto __pyx_L35;
     }
-    __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;
+    /*else*/ {
 
-    /* "netCDF4.pyx":3381
- *             # 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.
+      /* "netCDF4/_netCDF4.pyx":4178
+ *             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_4 = PySequence_Tuple(__pyx_v_datashape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3381; __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 = 3381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    goto __pyx_L20;
+      __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 = 4178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __pyx_L35:;
   }
-  __pyx_L20:;
 
-  /* "netCDF4.pyx":3384
- * 
- *         # 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))
+  /* "netCDF4/_netCDF4.pyx":4180
+ *             formats.append(field_type)
+ *     # make sure entries in lists sorted by offset.
+ *     names = _sortbylist(names, offsets)             # <<<<<<<<<<<<<<
+ *     formats = _sortbylist(formats, offsets)
+ *     offsets.sort()
  */
-  __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 = 3384; __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 = 3384; __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 = 3384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __pyx_t_2 = __pyx_t_9;
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_10 = NULL;
   __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 = 3384; __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);
+  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_7, function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+      __pyx_t_9 = 1;
     }
   }
-  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 = 3384; __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 = 3384; __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 = 3384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4180; __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 = 4180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_8);
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_4);
-  __pyx_t_4 = 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":3385
- *         # 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))
+  /* "netCDF4/_netCDF4.pyx":4181
+ *     # 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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3385; __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 = 3385; __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 = 3385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_9);
-  __pyx_t_5 = __pyx_t_9;
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_7 = NULL;
   __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 = 3385; __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);
+  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_7, function);
+      __Pyx_DECREF_SET(__pyx_t_1, function);
+      __pyx_t_9 = 1;
     }
   }
-  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 = 3385; __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 = 3385; __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 = 3385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4181; __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __Pyx_DECREF_SET(__pyx_v_count, __pyx_t_4);
-  __pyx_t_4 = 0;
+  __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 = 4181; __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":3386
- *         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))
+  /* "netCDF4/_netCDF4.pyx":4182
+ *     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 = 4182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4/_netCDF4.pyx":4184
+ *     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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3386; __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 = 3386; __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 = 3386; __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 = 3386; __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);
+  __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4184; __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 = 4184; __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 = 4184; __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 = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_dtype_dict = ((PyObject*)__pyx_t_8);
+  __pyx_t_8 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4185
+ *     # 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 = 4185; __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 = 4185; __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 = 4185; __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 = 4185; __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_8_netCDF4_CompoundType)), __pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __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/_netCDF4.pyx":4118
+ *     return xtype
+ * 
+ * cdef _read_compound(group, nc_type xtype, endian=None):             # <<<<<<<<<<<<<<
+ *     # 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._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_format);
+  __Pyx_XDECREF(__pyx_v_dtype_dict);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":4223
+ *     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_8_netCDF4_6VLType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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,&__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)) != 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 = 4223; __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 = 4223; __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 = 4223; __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];
   }
-  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 = 3386; __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 = 3386; __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 = 3386; __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;
+  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 = 4223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+  __Pyx_AddTraceback("netCDF4._netCDF4.VLType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return -1;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(((struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)__pyx_v_self), __pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name, __pyx_v_kwargs);
 
-  /* "netCDF4.pyx":3387
- *         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():
+  /* function exit code */
+  __Pyx_XDECREF(__pyx_v_kwargs);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_6VLType___init__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":4225
+ *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
+ *         cdef nc_type xtype
+ *         if 'typeid' in kwargs:             # <<<<<<<<<<<<<<
+ *             xtype = kwargs['typeid']
+ *         else:
  */
-  __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 = 3387; __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 = 3387; __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_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 = 4225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
+
+    /* "netCDF4/_netCDF4.pyx":4226
+ *         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 = 4226; __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 = 4226; __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;
   }
-  __pyx_t_9 = __Pyx_PyInt_From_long(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3387; __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 = 3387; __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);
+  /*else*/ {
+
+    /* "netCDF4/_netCDF4.pyx":4228
+ *             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_8_netCDF4__def_vlen(__pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4228; __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 = 4228; __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(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 = 3387; __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 = 3387; __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 = 3387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_4);
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __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 = 4228; __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 = 4228; __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 = 4228; __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 = 4228; __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 = 4228; __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 = 4228; __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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __Pyx_DECREF_SET(__pyx_v_put_ind, __pyx_t_4);
-  __pyx_t_4 = 0;
+  __pyx_L3:;
 
-  /* "netCDF4.pyx":3389
- *         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
+  /* "netCDF4/_netCDF4.pyx":4229
+ *         else:
+ *             xtype, dt = _def_vlen(grp, dt, dtype_name)
+ *         self._nc_type = xtype             # <<<<<<<<<<<<<<
+ *         self.dtype = dt
+ *         if dt == str:
  */
-  __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 = 3389; __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);
-    }
-  }
+  __pyx_v_self->_nc_type = __pyx_v_xtype;
+
+  /* "netCDF4/_netCDF4.pyx":4230
+ *             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/_netCDF4.pyx":4231
+ *         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 = 4231; __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 = 4231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   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 = 3389; __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 = 3389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "netCDF4/_netCDF4.pyx":4232
+ *         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;
   }
-  __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 = 3389; __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) {
+  /*else*/ {
 
-    /* "netCDF4.pyx":3390
+    /* "netCDF4/_netCDF4.pyx":4234
+ *             self.name = None
+ *         else:
+ *             self.name = dtype_name             # <<<<<<<<<<<<<<
  * 
- *         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),
+ *     def __repr__(self):
  */
-    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_quantize); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3390; __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 = 3390; __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 = 3390; __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 = 3390; __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_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_L29:;
+  __pyx_L6:;
 
-  /* "netCDF4.pyx":3399
- *         # 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.
+  /* "netCDF4/_netCDF4.pyx":4223
+ *     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:
  */
-  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3399; __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 = 3399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_1 = __pyx_t_8;
-  __pyx_L31_bool_binop_done:;
-  if (__pyx_t_1) {
 
-    /* "netCDF4.pyx":3402
- *             # 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)
+  /* 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._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/_netCDF4.pyx":4236
+ *             self.name = dtype_name
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *             return self.__unicode__()
  */
-    __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 = 3402; __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 = 3402; __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":3404
- *             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
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6VLType_3__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6VLType_3__repr__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(((struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_2__repr__(struct __pyx_obj_7netCDF4_8_netCDF4_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/_netCDF4.pyx":4237
+ * 
+ *     def __repr__(self):
+ *         if python3:             # <<<<<<<<<<<<<<
+ *             return self.__unicode__()
+ *         else:
  */
-      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __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 = 3404; __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 = 3404; __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 = 3404; __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 = 3404; __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_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4237; __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 = 4237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
+
+    /* "netCDF4/_netCDF4.pyx":4238
+ *     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 = 4238; __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);
       }
-      __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 = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    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 = 4238; __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 = 3404; __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 = 3404; __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 = 3404; __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 = 3404; __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;
+    } else {
+      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __pyx_L33:;
-    goto __pyx_L30;
-  }
-  __pyx_L30:;
-
-  /* "netCDF4.pyx":3405
- *                 # 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 = 3405; __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_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;
   }
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_8 = __pyx_t_1;
-  __pyx_L38_bool_binop_done:;
-  if (__pyx_t_8) {
+  /*else*/ {
 
-    /* "netCDF4.pyx":3407
- *         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)
+    /* "netCDF4/_netCDF4.pyx":4240
+ *             return self.__unicode__()
+ *         else:
+ *             return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
+ * 
+ *     def __unicode__(self):
  */
-    __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 = 3407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_3 = (__pyx_t_1 != 0);
-    if (__pyx_t_3) {
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4240; __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 = 4240; __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 = 4240; __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 = 4240; __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 = 4240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_GOTREF(__pyx_t_1);
     } else {
-      __pyx_t_8 = __pyx_t_3;
-      goto __pyx_L41_bool_binop_done;
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4240; __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 = 4240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
     }
-    __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 = 3407; __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) {
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
 
-      /* "netCDF4.pyx":3408
- *             # 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'):
+  /* "netCDF4/_netCDF4.pyx":4236
+ *             self.name = dtype_name
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         if python3:
+ *             return self.__unicode__()
  */
-      __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 = 3408; __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 = 3408; __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 = 3408; __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 = 3408; __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":3409
- *             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 = 3409; __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 = 3409; __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 = 3409; __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 = 3409; __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 = 3409; __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 = 3409; __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 = 3409; __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;
-    }
+  /* 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._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":3410
- *                 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)
+/* "netCDF4/_netCDF4.pyx":4242
+ *             return unicode(self).encode(default_encoding)
+ * 
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         if self.dtype == str:
+ *             return repr(type(self))+': string type'
  */
-    __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 = 3410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_1 = (__pyx_t_8 != 0);
-    if (__pyx_t_1) {
 
-      /* "netCDF4.pyx":3411
- *                 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 = 3411; __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 = 3411; __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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6VLType_5__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_6VLType_4__unicode__(((struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)__pyx_v_self));
 
-      /* "netCDF4.pyx":3412
- *             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 = 3412; __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 = 3412; __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 = 3412; __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 = 3412; __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 = 3412; __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 = 3412; __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 = 3412; __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;
-    }
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4__unicode__(struct __pyx_obj_7netCDF4_8_netCDF4_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":3413
- *                 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)
+  /* "netCDF4/_netCDF4.pyx":4243
+ * 
+ *     def __unicode__(self):
+ *         if self.dtype == str:             # <<<<<<<<<<<<<<
+ *             return repr(type(self))+': string type'
+ *         else:
  */
-    __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 = 3413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_8 = (__pyx_t_1 != 0);
-    if (__pyx_t_8) {
+  __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 = 4243; __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 = 4243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
 
-      /* "netCDF4.pyx":3414
- *                 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):
+    /* "netCDF4/_netCDF4.pyx":4244
+ *     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_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 = 3414; __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 = 3414; __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;
+    __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 = 4244; __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 = 4244; __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":3415
- *             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
+    /* "netCDF4/_netCDF4.pyx":4246
+ *             return repr(type(self))+': string type'
+ *         else:
+ *             return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\             # <<<<<<<<<<<<<<
+ *             (self.name, self.dtype)
+ * 
  */
-      __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 = 3415; __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 = 3415; __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 = 3415; __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 = 3415; __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 = 3415; __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 = 3415; __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 = 3415; __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:;
+    __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 = 4246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
 
-    /* "netCDF4.pyx":3416
- *                 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 -
+    /* "netCDF4/_netCDF4.pyx":4247
+ *         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 = 4247; __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/_netCDF4.pyx":4246
+ *             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_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 4246; __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 = 3416; __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_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4246; __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_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 = 3416; __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 = 3416; __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 = 3416; __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 = 3416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (__pyx_t_8) {
+    __pyx_r = __pyx_t_1;
+    __pyx_t_1 = 0;
+    goto __pyx_L0;
+  }
 
-      /* "netCDF4.pyx":3420
- *                 # 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
+  /* "netCDF4/_netCDF4.pyx":4242
+ *             return unicode(self).encode(default_encoding)
+ * 
+ *     def __unicode__(self):             # <<<<<<<<<<<<<<
+ *         if self.dtype == str:
+ *             return repr(type(self))+': string type'
  */
-      __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 = 3420; __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":3421
- *                 # 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 = 3421; __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 = 3421; __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 = 3421; __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 = 3421; __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 = 3421; __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 = 3421; __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 = 3421; __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 = 3421; __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 = 3421; __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 = 3421; __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 = 3421; __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 = 3421; __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 = 3421; __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 = 3421; __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) {
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_AddTraceback("netCDF4._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":3422
- *                 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'):
+/* "netCDF4/_netCDF4.pyx":4221
+ * @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):
  */
-        __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 = 3422; __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":3424
- *                     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 = 3424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_3 = (__pyx_t_8 != 0);
-        if (__pyx_t_3) {
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6VLType_8_nc_type_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_6VLType_8_nc_type___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)__pyx_v_self));
 
-          /* "netCDF4.pyx":3428
- *                         # 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 = 3428; __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 = 3428; __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 = 3428; __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 = 3428; __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 = 3428; __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 = 3428; __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 = 3428; __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 = 3428; __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 = 3428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-          if (__pyx_t_3) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-            /* "netCDF4.pyx":3429
- *                         # 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"
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_8_nc_type___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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 = 4221; __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._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_8_netCDF4_6VLType_8_nc_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_6VLType_8_nc_type_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_8_nc_type_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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 = 4221; __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._netCDF4.VLType._nc_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = -1;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":4222
+ * """
+ *     cdef public nc_type _nc_type
+ *     cdef public dtype, name             # <<<<<<<<<<<<<<
+ *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
+ *         cdef nc_type xtype
  */
-            __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 = 3429; __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":3431
- *                             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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6VLType_5dtype_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6VLType_5dtype_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_6VLType_5dtype___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_5dtype___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_6VLType_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_6VLType_5dtype_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_5dtype_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_6VLType_5dtype_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_6VLType_5dtype_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_6VLType_5dtype_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_5dtype_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_6VLType_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6VLType_4name_1__get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_6VLType_4name___get__(((struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6VLType_4name___get__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_6VLType_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_6VLType_4name_2__set__(((struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_4name_2__set__(struct __pyx_obj_7netCDF4_8_netCDF4_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_8_netCDF4_6VLType_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pw_7netCDF4_8_netCDF4_6VLType_4name_5__del__(PyObject *__pyx_v_self) {
+  int __pyx_r;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_6VLType_4name_4__del__(((struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static int __pyx_pf_7netCDF4_8_netCDF4_6VLType_4name_4__del__(struct __pyx_obj_7netCDF4_8_netCDF4_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;
 
-            /* "netCDF4.pyx":3432
- *                         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 = 3432; __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 = 3432; __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 = 3432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          __pyx_L51:;
+  /* function exit code */
+  __pyx_r = 0;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":3433
- *                             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'):
+/* "netCDF4/_netCDF4.pyx":4249
+ *             (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__.
  */
-          __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3433; __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 = 3433; __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 = 3433; __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 = 3433; __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 = 3433; __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 = 3433; __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 = 3433; __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 = 3433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-          if (__pyx_t_3) {
 
-            /* "netCDF4.pyx":3434
- *                             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 = 3434; __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;
-        }
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__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":3435
- *                         if numpy.array(fillval).shape != ():
- *                             fillval = fillval[0]
- *                     elif hasattr(self, '_FillValue'):             # <<<<<<<<<<<<<<
- *                         fillval = self._FillValue
- *                     else:
+  /* "netCDF4/_netCDF4.pyx":4258
+ *     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_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_t_8 = (__pyx_t_3 != 0);
-        if (__pyx_t_8) {
+  __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 = 4258; __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 = 4258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
 
-          /* "netCDF4.pyx":3436
- *                             fillval = fillval[0]
- *                     elif hasattr(self, '_FillValue'):
- *                         fillval = self._FillValue             # <<<<<<<<<<<<<<
- *                     else:
- *                         fillval = default_fillvals[self.dtype.str[1:]]
+    /* "netCDF4/_netCDF4.pyx":4259
+ *     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_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 = 3436; __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*/ {
+    __pyx_v_xtype = NC_STRING;
+    goto __pyx_L3;
+  }
+  /*else*/ {
 
-          /* "netCDF4.pyx":3438
- *                         fillval = self._FillValue
- *                     else:
- *                         fillval = default_fillvals[self.dtype.str[1:]]             # <<<<<<<<<<<<<<
- *                     data = data.filled(fill_value=fillval)
- * 
+    /* "netCDF4/_netCDF4.pyx":4262
+ *         # dtype_name ignored
+ *     else: # numpy datatype
+ *         bytestr = _strencode(dtype_name)             # <<<<<<<<<<<<<<
+ *         namstring = bytestr
+ *         dt = numpy.dtype(dt) # convert to numpy datatype.
  */
-          __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3438; __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 = 3438; __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__80, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3438; __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 = 3438; __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:;
+    __pyx_t_1 = __pyx_f_7netCDF4_8_netCDF4__strencode(__pyx_v_dtype_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_v_bytestr = __pyx_t_1;
+    __pyx_t_1 = 0;
 
-        /* "netCDF4.pyx":3439
- *                     else:
- *                         fillval = default_fillvals[self.dtype.str[1:]]
- *                     data = data.filled(fill_value=fillval)             # <<<<<<<<<<<<<<
- * 
- *         # Fill output array with data chunks.
+    /* "netCDF4/_netCDF4.pyx":4263
+ *     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_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_filled); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3439; __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 = 3439; __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 = 3439; __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 = 3439; __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:;
+    __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_namstring = __pyx_t_3;
 
-  /* "netCDF4.pyx":3442
- * 
- *         # 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
+    /* "netCDF4/_netCDF4.pyx":4264
+ *         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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3442; __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 = 3442; __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 = 3442; __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 = 3442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4264; __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 = 4264; __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 = 3442; __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 = 3442; __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 = 3442; __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 = 3442; __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 = 3442; __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 = 3442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        break;
+    __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);
       }
-      __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 = 3442; __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 = 3442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(item);
-          *(temps[i]) = item;
-        }
-      }
-      #endif
-      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+    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 = 4264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
     } 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 = 3442; __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 = 3442; __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 = 3442; __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":3443
- *         # 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 = 3443; __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 = 3443; __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":3444
- *         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 = 3444; __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 = 3444; __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 = 3444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
-    if (__pyx_t_8) {
-      goto __pyx_L53_continue;
+      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4264; __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 = 4264; __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":3446
- *             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')
+    /* "netCDF4/_netCDF4.pyx":4265
+ *         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_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_shape); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3446; __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 = 3446; __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 = 3446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    if (__pyx_t_8) {
+    __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 = 4265; __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__91, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4265; __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 = 4265; __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 = 4265; __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":3447
- *             # convert array scalar to regular array with one element.
- *             if dataput.shape == ():
- *                 if self._isvlen:             # <<<<<<<<<<<<<<
- *                     dataput=numpy.array(dataput,'O')
- *                 else:
+      /* "netCDF4/_netCDF4.pyx":4268
+ *             # 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_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_8) {
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4268; __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 = 4268; __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__92, 1, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4268; __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 = 4268; __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 = 4268; __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":3448
- *             if dataput.shape == ():
- *                 if self._isvlen:
- *                     dataput=numpy.array(dataput,'O')             # <<<<<<<<<<<<<<
- *                 else:
- *                     dataput=numpy.array(dataput,dataput.dtype)
+      /* "netCDF4/_netCDF4.pyx":4269
+ *             # 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_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3448; __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 = 3448; __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 = 3448; __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 = 3448; __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*/ {
+      __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 = 4269; __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 = 4269; __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":3450
- *                     dataput=numpy.array(dataput,'O')
- *                 else:
- *                     dataput=numpy.array(dataput,dataput.dtype)             # <<<<<<<<<<<<<<
- *             self._put(dataput,a,b,c)
- * 
+      /* "netCDF4/_netCDF4.pyx":4270
+ *             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_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3450; __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 = 3450; __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 = 3450; __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 = 3450; __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 = 3450; __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_t_7 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      if (__pyx_t_7) {
+
+        /* "netCDF4/_netCDF4.pyx":4271
+ *             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 = 4271; __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 = 4271; __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 = 4271; __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 = 4271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
-      __pyx_L59:;
-      goto __pyx_L58;
+      goto __pyx_L4;
     }
-    __pyx_L58:;
+    /*else*/ {
 
-    /* "netCDF4.pyx":3451
- *                 else:
- *                     dataput=numpy.array(dataput,dataput.dtype)
- *             self._put(dataput,a,b,c)             # <<<<<<<<<<<<<<
- * 
+      /* "netCDF4/_netCDF4.pyx":4273
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         else:
+ *             raise KeyError("unsupported datatype specified for VLEN")             # <<<<<<<<<<<<<<
+ *     return xtype, dt
  * 
  */
-    __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 = 3451; __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 = 3451; __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_t_5 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4273; __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 = 4273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __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 = 3451; __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;
+    __pyx_L4:;
+  }
+  __pyx_L3:;
 
-    /* "netCDF4.pyx":3442
+  /* "netCDF4/_netCDF4.pyx":4274
+ *         else:
+ *             raise KeyError("unsupported datatype specified for VLEN")
+ *     return xtype, dt             # <<<<<<<<<<<<<<
  * 
- *         # 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
+ * cdef _read_vlen(group, nc_type xtype, endian=None):
  */
-    __pyx_L53_continue:;
-  }
-  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __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 = 4274; __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 = 4274; __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":3329
- *             free(vldata)
+  /* "netCDF4/_netCDF4.pyx":4249
+ *             (self.name, self.dtype)
  * 
- *     def __setitem__(self, elem, data):             # <<<<<<<<<<<<<<
- *         # This special method is used to assign to the netCDF variable
- *         # using "extended slice syntax". The extended slice syntax
+ * 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_r = 0;
-  goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_1);
   __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_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4._netCDF4._def_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
   __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_XDECREF(__pyx_v_bytestr);
+  __Pyx_XDECREF(__pyx_v_dt);
+  __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":3454
- * 
- * 
- *     def __len__(self):             # <<<<<<<<<<<<<<
- *         return self.shape[0]
+/* "netCDF4/_netCDF4.pyx":4276
+ *     return xtype, dt
  * 
+ * cdef _read_vlen(group, nc_type xtype, endian=None):             # <<<<<<<<<<<<<<
+ *     # read a VLEN data type id from an existing file,
+ *     # construct a corresponding numpy dtype instance,
  */
 
-/* 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;
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__read_vlen(PyObject *__pyx_v_group, nc_type __pyx_v_xtype, struct __pyx_opt_args_7netCDF4_8_netCDF4__read_vlen *__pyx_optional_args) {
+  PyObject *__pyx_v_endian = ((PyObject *)Py_None);
+  int __pyx_v_ierr;
+  int __pyx_v__grpid;
+  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_v_datatype = NULL;
+  PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  Py_ssize_t __pyx_t_3;
+  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;
+  PyObject *__pyx_t_11 = NULL;
+  PyObject *__pyx_t_12 = NULL;
+  PyObject *__pyx_t_13 = NULL;
+  int __pyx_t_14;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__len__", 0);
+  __Pyx_RefNannySetupContext("_read_vlen", 0);
+  if (__pyx_optional_args) {
+    if (__pyx_optional_args->__pyx_n > 0) {
+      __pyx_v_endian = __pyx_optional_args->endian;
+    }
+  }
 
-  /* "netCDF4.pyx":3455
- * 
- *     def __len__(self):
- *         return self.shape[0]             # <<<<<<<<<<<<<<
- * 
- * 
+  /* "netCDF4/_netCDF4.pyx":4285
+ *     cdef nc_type base_xtype
+ *     cdef char vl_namstring[NC_MAX_NAME+1]
+ *     _grpid = group._grpid             # <<<<<<<<<<<<<<
+ *     if xtype == NC_STRING:
+ *         dt = str
  */
-  __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 = 3455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 4285; __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 = 3455; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __Pyx_GOTREF(__pyx_t_2);
+  __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 = 4285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __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 = 3455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_r = __pyx_t_3;
-  goto __pyx_L0;
+  __pyx_v__grpid = __pyx_t_2;
 
-  /* "netCDF4.pyx":3454
- * 
- * 
- *     def __len__(self):             # <<<<<<<<<<<<<<
- *         return self.shape[0]
- * 
+  /* "netCDF4/_netCDF4.pyx":4286
+ *     cdef char vl_namstring[NC_MAX_NAME+1]
+ *     _grpid = group._grpid
+ *     if xtype == NC_STRING:             # <<<<<<<<<<<<<<
+ *         dt = str
+ *         name = None
  */
+  __pyx_t_3 = ((__pyx_v_xtype == NC_STRING) != 0);
+  if (__pyx_t_3) {
 
-  /* 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/_netCDF4.pyx":4287
+ *     _grpid = group._grpid
+ *     if xtype == NC_STRING:
+ *         dt = str             # <<<<<<<<<<<<<<
+ *         name = None
+ *     else:
+ */
+    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
+    __pyx_v_dt = ((PyObject *)((PyObject*)(&PyString_Type)));
 
-/* "netCDF4.pyx":3458
- * 
- * 
- *     def assignValue(self,val):             # <<<<<<<<<<<<<<
- *         """
- * assignValue(self, val)
+    /* "netCDF4/_netCDF4.pyx":4288
+ *     if xtype == NC_STRING:
+ *         dt = str
+ *         name = None             # <<<<<<<<<<<<<<
+ *     else:
+ *         with nogil:
  */
+    __Pyx_INCREF(Py_None);
+    __pyx_v_name = Py_None;
+    goto __pyx_L3;
+  }
+  /*else*/ {
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":4290
+ *         name = None
+ *     else:
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype)
+ *         if ierr != NC_NOERR:
+ */
+    {
+        #ifdef WITH_THREAD
+        PyThreadState *_save;
+        Py_UNBLOCK_THREADS
+        #endif
+        /*try:*/ {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+          /* "netCDF4/_netCDF4.pyx":4291
+ *     else:
+ *         with nogil:
+ *             ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype)             # <<<<<<<<<<<<<<
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ */
+          __pyx_v_ierr = nc_inq_vlen(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_vl_namstring, (&__pyx_v_vlsize), (&__pyx_v_base_xtype));
+        }
 
-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/_netCDF4.pyx":4290
+ *         name = None
+ *     else:
+ *         with nogil:             # <<<<<<<<<<<<<<
+ *             ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype)
+ *         if ierr != NC_NOERR:
+ */
+        /*finally:*/ {
+          /*normal exit:*/{
+            #ifdef WITH_THREAD
+            Py_BLOCK_THREADS
+            #endif
+            goto __pyx_L6;
+          }
+          __pyx_L6:;
+        }
+    }
 
-  /* "netCDF4.pyx":3464
- * 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
+    /* "netCDF4/_netCDF4.pyx":4292
+ *         with nogil:
+ *             ierr = nc_inq_vlen(_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_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3464; __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 = 3464; __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) {
+    __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    if (__pyx_t_3) {
 
-    /* "netCDF4.pyx":3465
- * 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
- * 
+      /* "netCDF4/_netCDF4.pyx":4293
+ *             ierr = nc_inq_vlen(_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_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 = 4293; __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 = 4293; __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 = 4293; __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 = 4293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+
+    /* "netCDF4/_netCDF4.pyx":4294
+ *         if ierr != NC_NOERR:
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         name = vl_namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
+ *         try:
+ *             datatype = _nctonptype[base_xtype]
  */
-    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_vl_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4294; __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 = 4294; __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 = 4294; __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 = 4294; __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 = 4294; __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 = 4294; __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 = 3465; __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_v_name = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":4295
+ *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+ *         name = vl_namstring.decode(default_encoding,unicode_error)
+ *         try:             # <<<<<<<<<<<<<<
+ *             datatype = _nctonptype[base_xtype]
+ *             if endian is not None: datatype = endian + datatype
+ */
+    {
+      __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/_netCDF4.pyx":4296
+ *         name = vl_namstring.decode(default_encoding,unicode_error)
+ *         try:
+ *             datatype = _nctonptype[base_xtype]             # <<<<<<<<<<<<<<
+ *             if endian is not None: datatype = endian + datatype
+ *             dt = numpy.dtype(datatype) # see if it is a primitive type
+ */
+        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4296; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_base_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 = 4296; __pyx_clineno = __LINE__; goto __pyx_L8_error;};
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_v_datatype = __pyx_t_6;
+        __pyx_t_6 = 0;
+
+        /* "netCDF4/_netCDF4.pyx":4297
+ *         try:
+ *             datatype = _nctonptype[base_xtype]
+ *             if endian is not None: datatype = endian + datatype             # <<<<<<<<<<<<<<
+ *             dt = numpy.dtype(datatype) # see if it is a primitive type
+ *         except KeyError:
+ */
+        __pyx_t_3 = (__pyx_v_endian != Py_None);
+        __pyx_t_14 = (__pyx_t_3 != 0);
+        if (__pyx_t_14) {
+          __pyx_t_6 = PyNumber_Add(__pyx_v_endian, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4297; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_6);
+          __pyx_t_6 = 0;
+          goto __pyx_L16;
+        }
+        __pyx_L16:;
+
+        /* "netCDF4/_netCDF4.pyx":4298
+ *             datatype = _nctonptype[base_xtype]
+ *             if endian is not None: datatype = endian + datatype
+ *             dt = numpy.dtype(datatype) # see if it is a primitive type             # <<<<<<<<<<<<<<
+ *         except KeyError:
+ *             raise KeyError("unsupported component type for VLEN")
+ */
+        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4298; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4298; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+        __pyx_t_1 = NULL;
+        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);
+          }
+        }
+        if (!__pyx_t_1) {
+          __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4298; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+        } else {
+          __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4298; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+          __Pyx_INCREF(__pyx_v_datatype);
+          PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_datatype);
+          __Pyx_GIVEREF(__pyx_v_datatype);
+          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4298; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        }
+        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_v_dt = __pyx_t_6;
+        __pyx_t_6 = 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_L15_try_end;
+      __pyx_L8_error:;
+      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+      /* "netCDF4/_netCDF4.pyx":4299
+ *             if endian is not None: datatype = endian + datatype
+ *             dt = numpy.dtype(datatype) # 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_2 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+      if (__pyx_t_2) {
+        __Pyx_AddTraceback("netCDF4._netCDF4._read_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4299; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __Pyx_GOTREF(__pyx_t_10);
+        __Pyx_GOTREF(__pyx_t_7);
+
+        /* "netCDF4/_netCDF4.pyx":4300
+ *             dt = numpy.dtype(datatype) # 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_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4300; __pyx_clineno = __LINE__; goto __pyx_L10_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 = 4300; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
+      }
+      goto __pyx_L10_except_error;
+      __pyx_L10_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_L15_try_end:;
+    }
   }
+  __pyx_L3:;
 
-  /* "netCDF4.pyx":3466
- *         if len(self.dimensions):
- *             raise IndexError('to assign values to a non-scalar variable, use a slice')
- *         self[:]=val             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":4301
+ *         except KeyError:
+ *             raise KeyError("unsupported component type for VLEN")
+ *     return VLType(group, dt, name, typeid=xtype)             # <<<<<<<<<<<<<<
  * 
- *     def getValue(self):
+ * cdef _strencode(pystr,encoding=None):
  */
-  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self), __pyx_v_val, 0, 0, NULL, NULL, &__pyx_slice__82, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_INCREF(__pyx_v_group);
+  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_group);
+  __Pyx_GIVEREF(__pyx_v_group);
+  __Pyx_INCREF(__pyx_v_dt);
+  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_dt);
+  __Pyx_GIVEREF(__pyx_v_dt);
+  __Pyx_INCREF(__pyx_v_name);
+  PyTuple_SET_ITEM(__pyx_t_7, 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 = 4301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_10);
+  __pyx_t_6 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_typeid, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_VLType)), __pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4301; __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_10); __pyx_t_10 = 0;
+  __pyx_r = __pyx_t_6;
+  __pyx_t_6 = 0;
+  goto __pyx_L0;
 
-  /* "netCDF4.pyx":3458
- * 
+  /* "netCDF4/_netCDF4.pyx":4276
+ *     return xtype, dt
  * 
- *     def assignValue(self,val):             # <<<<<<<<<<<<<<
- *         """
- * assignValue(self, val)
+ * cdef _read_vlen(group, nc_type xtype, endian=None):             # <<<<<<<<<<<<<<
+ *     # read a VLEN data type id from an existing file,
+ *     # construct a corresponding numpy dtype instance,
  */
 
   /* 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_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._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_XDECREF(__pyx_v_datatype);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":3468
- *         self[:]=val
+/* "netCDF4/_netCDF4.pyx":4303
+ *     return VLType(group, dt, name, typeid=xtype)
  * 
- *     def getValue(self):             # <<<<<<<<<<<<<<
- *         """
- * getValue(self)
+ * cdef _strencode(pystr,encoding=None):             # <<<<<<<<<<<<<<
+ *     # encode a string into bytes.  If already bytes, do nothing.
+ *     # uses default_encoding module variable for default encoding.
  */
 
-/* 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) {
+static PyObject *__pyx_f_7netCDF4_8_netCDF4__strencode(PyObject *__pyx_v_pystr, struct __pyx_opt_args_7netCDF4_8_netCDF4__strencode *__pyx_optional_args) {
+  PyObject *__pyx_v_encoding = ((PyObject *)Py_None);
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  Py_ssize_t __pyx_t_2;
-  int __pyx_t_3;
+  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("getValue", 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":3474
- * 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)]
+  /* "netCDF4/_netCDF4.pyx":4306
+ *     # 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_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3474; __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 = 3474; __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) {
+  __pyx_t_1 = (__pyx_v_encoding == Py_None);
+  __pyx_t_2 = (__pyx_t_1 != 0);
+  if (__pyx_t_2) {
 
-    /* "netCDF4.pyx":3475
- * 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)]
- * 
+    /* "netCDF4/_netCDF4.pyx":4307
+ *     # uses default_encoding module variable for default encoding.
+ *     if encoding is None:
+ *         encoding = default_encoding             # <<<<<<<<<<<<<<
+ *     try:
+ *         return pystr.encode(encoding)
  */
-    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3475; __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 = 3475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4307; __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":3476
- *         if len(self.dimensions):
- *             raise IndexError('to retrieve values from a non-scalar variable, use slicing')
- *         return self[slice(None)]             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":4308
+ *     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/_netCDF4.pyx":4309
+ *         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 = 4309; __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 = 4309; __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 = 4309; __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 = 4309; __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/_netCDF4.pyx":4310
+ *     try:
+ *         return pystr.encode(encoding)
+ *     except (AttributeError, UnicodeDecodeError):             # <<<<<<<<<<<<<<
+ *         return pystr # already bytes or unicode?
  * 
- *     def set_auto_maskandscale(self,maskandscale):
  */
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_slice__84); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3476; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
+    __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
+    if (__pyx_t_10) {
+      __Pyx_AddTraceback("netCDF4._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 = 4310; __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":3468
- *         self[:]=val
+      /* "netCDF4/_netCDF4.pyx":4311
+ *         return pystr.encode(encoding)
+ *     except (AttributeError, UnicodeDecodeError):
+ *         return pystr # already bytes or unicode?             # <<<<<<<<<<<<<<
  * 
- *     def getValue(self):             # <<<<<<<<<<<<<<
- *         """
- * getValue(self)
+ * #----------------------------------------
+ */
+      __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/_netCDF4.pyx":4303
+ *     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_1);
-  __Pyx_AddTraceback("netCDF4.Variable.getValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_7);
+  __Pyx_XDECREF(__pyx_t_8);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_AddTraceback("netCDF4._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;
 }
 
-/* "netCDF4.pyx":3478
- *         return self[slice(None)]
+/* "netCDF4/_netCDF4.pyx":4323
+ * gregorian = datetime(1582,10,15)
  * 
- *     def set_auto_maskandscale(self,maskandscale):             # <<<<<<<<<<<<<<
- *         """
- * set_auto_maskandscale(self,maskandscale)
+ * 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_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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7_dateparse(PyObject *__pyx_self, PyObject *__pyx_v_timestr); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_6_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_8_netCDF4_7_dateparse = {"_dateparse", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7_dateparse, METH_O, __pyx_doc_7netCDF4_8_netCDF4_6_dateparse};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7_dateparse(PyObject *__pyx_self, PyObject *__pyx_v_timestr) {
   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));
+  __Pyx_RefNannySetupContext("_dateparse (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_6_dateparse(__pyx_self, ((PyObject *)__pyx_v_timestr));
 
   /* 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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_6_dateparse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_timestr) {
+  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_year = NULL;
+  PyObject *__pyx_v_month = NULL;
+  PyObject *__pyx_v_day = NULL;
+  PyObject *__pyx_v_hour = NULL;
+  PyObject *__pyx_v_minute = NULL;
+  PyObject *__pyx_v_second = NULL;
+  PyObject *__pyx_v_utc_offset = NULL;
+  PyObject *__pyx_v_basedate = NULL;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  int __pyx_t_1;
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
+  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;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *(*__pyx_t_11)(PyObject *);
+  Py_ssize_t __pyx_t_12;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("set_auto_maskandscale", 0);
+  __Pyx_RefNannySetupContext("_dateparse", 0);
 
-  /* "netCDF4.pyx":3517
- * (automatic conversions are performed).
- *         """
- *         if maskandscale:             # <<<<<<<<<<<<<<
- *             self.scale = True
- *             self.mask = True
+  /* "netCDF4/_netCDF4.pyx":4328
+ *     # same as version in netcdftime, but returns a timezone naive
+ *     # python datetime instance with the utc_offset included.
+ *     timestr_split = timestr.split()             # <<<<<<<<<<<<<<
+ *     units = timestr_split[0].lower()
+ *     if timestr_split[1].lower() != 'since':
  */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_maskandscale); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4328; __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 = 4328; __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 = 4328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_timestr_split = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":3518
- *         """
- *         if maskandscale:
- *             self.scale = True             # <<<<<<<<<<<<<<
- *             self.mask = True
- *         else:
+  /* "netCDF4/_netCDF4.pyx":4329
+ *     # python datetime instance with the utc_offset included.
+ *     timestr_split = timestr.split()
+ *     units = timestr_split[0].lower()             # <<<<<<<<<<<<<<
+ *     if timestr_split[1].lower() != 'since':
+ *         raise ValueError("no 'since' in unit_string")
  */
-    __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;
+  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_timestr_split, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4329; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4329; __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 = 4329; __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 = 4329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_v_units = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":3519
- *         if maskandscale:
- *             self.scale = True
- *             self.mask = True             # <<<<<<<<<<<<<<
- *         else:
- *             self.scale = False
+  /* "netCDF4/_netCDF4.pyx":4330
+ *     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_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;
+  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_timestr_split, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4330; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4330; __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);
+    }
   }
-  /*else*/ {
+  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 = 4330; __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 = 4330; __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_PyString_Equals(__pyx_t_1, __pyx_n_s_since, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_4) {
 
-    /* "netCDF4.pyx":3521
- *             self.mask = True
- *         else:
- *             self.scale = False             # <<<<<<<<<<<<<<
- *             self.mask = False
- * 
+    /* "netCDF4/_netCDF4.pyx":4331
+ *     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_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_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4331; __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 = 4331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-    /* "netCDF4.pyx":3522
- *         else:
- *             self.scale = False
- *             self.mask = False             # <<<<<<<<<<<<<<
- * 
- *     def set_auto_scale(self,scale):
+  /* "netCDF4/_netCDF4.pyx":4333
+ *         raise ValueError("no 'since' in unit_string")
+ *     # parse the date string.
+ *     n = timestr.find('since')+6             # <<<<<<<<<<<<<<
+ *     isostring = timestr[n:]
+ *     year, month, day, hour, minute, second, utc_offset =\
  */
-    __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_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_find); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4333; __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_t_2, __pyx_int_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_n = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4334
+ *     # parse the date string.
+ *     n = timestr.find('since')+6
+ *     isostring = timestr[n:]             # <<<<<<<<<<<<<<
+ *     year, month, day, hour, minute, second, utc_offset =\
+ *         _parse_date( isostring.strip() )
+ */
+  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_timestr, 0, 0, &__pyx_v_n, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_isostring = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4336
+ *     isostring = timestr[n:]
+ *     year, month, day, hour, minute, second, utc_offset =\
+ *         _parse_date( isostring.strip() )             # <<<<<<<<<<<<<<
+ *     basedate = datetime(year, month, day, hour, minute, second)
+ *     # add utc_offset to basedate time instance (which is timezone naive)
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_date); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_isostring, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4336; __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_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  } else {
+    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+  __pyx_t_5 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) {
+    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+    if (likely(__pyx_t_5)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_5);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_2, function);
+    }
+  }
+  if (!__pyx_t_5) {
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 4336; __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_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 = 4336; __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 != 7)) {
+      if (size > 7) __Pyx_RaiseTooManyValuesError(7);
+      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4335; __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_5 = PyTuple_GET_ITEM(sequence, 3); 
+      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 4); 
+      __pyx_t_8 = PyTuple_GET_ITEM(sequence, 5); 
+      __pyx_t_9 = PyTuple_GET_ITEM(sequence, 6); 
+    } 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_5 = PyList_GET_ITEM(sequence, 3); 
+      __pyx_t_7 = PyList_GET_ITEM(sequence, 4); 
+      __pyx_t_8 = PyList_GET_ITEM(sequence, 5); 
+      __pyx_t_9 = PyList_GET_ITEM(sequence, 6); 
+    }
+    __Pyx_INCREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_t_6);
+    __Pyx_INCREF(__pyx_t_3);
+    __Pyx_INCREF(__pyx_t_5);
+    __Pyx_INCREF(__pyx_t_7);
+    __Pyx_INCREF(__pyx_t_8);
+    __Pyx_INCREF(__pyx_t_9);
+    #else
+    {
+      Py_ssize_t i;
+      PyObject** temps[7] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_5,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9};
+      for (i=0; i < 7; i++) {
+        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4335; __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[7] = {&__pyx_t_2,&__pyx_t_6,&__pyx_t_3,&__pyx_t_5,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9};
+    __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_10);
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
+    for (index=0; index < 7; index++) {
+      PyObject* item = __pyx_t_11(__pyx_t_10); if (unlikely(!item)) goto __pyx_L4_unpacking_failed;
+      __Pyx_GOTREF(item);
+      *(temps[index]) = item;
+    }
+    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = NULL;
+    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+    goto __pyx_L5_unpacking_done;
+    __pyx_L4_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 = 4335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L5_unpacking_done:;
   }
-  __pyx_L3:;
-
-  /* "netCDF4.pyx":3478
- *         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":3524
- *             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":3552
- * (automatic conversions are performed).
- *         """
- *         if scale:             # <<<<<<<<<<<<<<
- *             self.scale = True
- *         else:
+  /* "netCDF4/_netCDF4.pyx":4335
+ *     n = timestr.find('since')+6
+ *     isostring = timestr[n:]
+ *     year, month, day, hour, minute, second, utc_offset =\             # <<<<<<<<<<<<<<
+ *         _parse_date( isostring.strip() )
+ *     basedate = datetime(year, month, day, hour, minute, second)
  */
-  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_scale); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
+  __pyx_v_year = __pyx_t_2;
+  __pyx_t_2 = 0;
+  __pyx_v_month = __pyx_t_6;
+  __pyx_t_6 = 0;
+  __pyx_v_day = __pyx_t_3;
+  __pyx_t_3 = 0;
+  __pyx_v_hour = __pyx_t_5;
+  __pyx_t_5 = 0;
+  __pyx_v_minute = __pyx_t_7;
+  __pyx_t_7 = 0;
+  __pyx_v_second = __pyx_t_8;
+  __pyx_t_8 = 0;
+  __pyx_v_utc_offset = __pyx_t_9;
+  __pyx_t_9 = 0;
 
-    /* "netCDF4.pyx":3553
- *         """
- *         if scale:
- *             self.scale = True             # <<<<<<<<<<<<<<
- *         else:
- *             self.scale = False
+  /* "netCDF4/_netCDF4.pyx":4337
+ *     year, month, day, hour, minute, second, utc_offset =\
+ *         _parse_date( isostring.strip() )
+ *     basedate = datetime(year, month, day, hour, minute, second)             # <<<<<<<<<<<<<<
+ *     # add utc_offset to basedate time instance (which is timezone naive)
+ *     basedate += timedelta(days=utc_offset/1440.)
  */
-    __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;
+  __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_8 = NULL;
+  __pyx_t_12 = 0;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
+    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
+    if (likely(__pyx_t_8)) {
+      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+      __Pyx_INCREF(__pyx_t_8);
+      __Pyx_INCREF(function);
+      __Pyx_DECREF_SET(__pyx_t_9, function);
+      __pyx_t_12 = 1;
+    }
   }
-  /*else*/ {
-
-    /* "netCDF4.pyx":3555
- *             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_t_7 = PyTuple_New(6+__pyx_t_12); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (__pyx_t_8) {
+    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = NULL;
   }
-  __pyx_L3:;
-
-  /* "netCDF4.pyx":3524
- *             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;
-}
+  __Pyx_INCREF(__pyx_v_year);
+  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_12, __pyx_v_year);
+  __Pyx_GIVEREF(__pyx_v_year);
+  __Pyx_INCREF(__pyx_v_month);
+  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_12, __pyx_v_month);
+  __Pyx_GIVEREF(__pyx_v_month);
+  __Pyx_INCREF(__pyx_v_day);
+  PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_12, __pyx_v_day);
+  __Pyx_GIVEREF(__pyx_v_day);
+  __Pyx_INCREF(__pyx_v_hour);
+  PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_12, __pyx_v_hour);
+  __Pyx_GIVEREF(__pyx_v_hour);
+  __Pyx_INCREF(__pyx_v_minute);
+  PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_12, __pyx_v_minute);
+  __Pyx_GIVEREF(__pyx_v_minute);
+  __Pyx_INCREF(__pyx_v_second);
+  PyTuple_SET_ITEM(__pyx_t_7, 5+__pyx_t_12, __pyx_v_second);
+  __Pyx_GIVEREF(__pyx_v_second);
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4337; __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_9); __pyx_t_9 = 0;
+  __pyx_v_basedate = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-/* "netCDF4.pyx":3557
- *             self.scale = False
+  /* "netCDF4/_netCDF4.pyx":4339
+ *     basedate = datetime(year, month, day, hour, minute, second)
+ *     # add utc_offset to basedate time instance (which is timezone naive)
+ *     basedate += timedelta(days=utc_offset/1440.)             # <<<<<<<<<<<<<<
+ *     return basedate
  * 
- *     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":3577
- * (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 = 3577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_1) {
-
-    /* "netCDF4.pyx":3578
- *         """
- *         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*/ {
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_v_utc_offset, __pyx_float_1440_); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_days, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4339; __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_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4339; __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_9); __pyx_t_9 = 0;
+  __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_basedate, __pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_9);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF_SET(__pyx_v_basedate, __pyx_t_9);
+  __pyx_t_9 = 0;
 
-    /* "netCDF4.pyx":3580
- *             self.mask = True
- *         else:
- *             self.mask = False             # <<<<<<<<<<<<<<
- * 
+  /* "netCDF4/_netCDF4.pyx":4340
+ *     # add utc_offset to basedate time instance (which is timezone naive)
+ *     basedate += timedelta(days=utc_offset/1440.)
+ *     return basedate             # <<<<<<<<<<<<<<
  * 
+ * def stringtoarr(string,NUMCHARS,dtype='S'):
  */
-    __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:;
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_basedate);
+  __pyx_r = __pyx_v_basedate;
+  goto __pyx_L0;
 
-  /* "netCDF4.pyx":3557
- *             self.scale = False
+  /* "netCDF4/_netCDF4.pyx":4323
+ * gregorian = datetime(1582,10,15)
  * 
- *     def set_auto_mask(self,mask):             # <<<<<<<<<<<<<<
- *         """
- * set_auto_mask(self,mask)
+ * 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_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_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __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_10);
+  __Pyx_AddTraceback("netCDF4._netCDF4._dateparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
+  __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_year);
+  __Pyx_XDECREF(__pyx_v_month);
+  __Pyx_XDECREF(__pyx_v_day);
+  __Pyx_XDECREF(__pyx_v_hour);
+  __Pyx_XDECREF(__pyx_v_minute);
+  __Pyx_XDECREF(__pyx_v_second);
+  __Pyx_XDECREF(__pyx_v_utc_offset);
+  __Pyx_XDECREF(__pyx_v_basedate);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":3583
- * 
+/* "netCDF4/_netCDF4.pyx":4342
+ *     return basedate
  * 
- *     def _put(self,ndarray data,start,count,stride):             # <<<<<<<<<<<<<<
- *         """Private method to put data into a netCDF variable"""
- *         cdef int ierr, ndims
+ * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtoarr(a, NUMCHARS,dtype='S')
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9stringtoarr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_8stringtoarr[] = "\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 = 'U [...]
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9stringtoarr = {"stringtoarr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9stringtoarr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_8stringtoarr};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9stringtoarr(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("_put (wrapper)", 0);
+  __Pyx_RefNannySetupContext("stringtoarr (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};
+    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  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);
@@ -49940,1619 +47765,1886 @@ static PyObject *__pyx_pw_7netCDF4_8Variable_63_put(PyObject *__pyx_v_self, PyOb
       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--;
+        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_start)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_NUMCHARS)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3583; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4342; __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 = 3583; __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 = 3583; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        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, "_put") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3583; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "stringtoarr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4342; __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);
+      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_data = ((PyArrayObject *)values[0]);
-    __pyx_v_start = values[1];
-    __pyx_v_count = values[2];
-    __pyx_v_stride = values[3];
+    __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("_put", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3583; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4342; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("netCDF4.Variable._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("netCDF4._netCDF4.stringtoarr", __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 = 3583; __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);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_8stringtoarr(__pyx_self, __pyx_v_string, __pyx_v_NUMCHARS, __pyx_v_dtype);
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_8stringtoarr(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;
-  Py_ssize_t __pyx_t_2;
+  int __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;
+  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("_put", 0);
-  __Pyx_INCREF((PyObject *)__pyx_v_data);
-
-  /* "netCDF4.pyx":3596
- *         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 = 3596; __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 = 3596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v_ndims = __pyx_t_2;
-
-  /* "netCDF4.pyx":3599
- *         # 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":3600
- *         # 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 = 3600; __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 = 3600; __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 = 3600; __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 = 3600; __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":3602
- *             data = data.copy()
- *         # fill up startp,countp,stridep.
- *         totelem = 1             # <<<<<<<<<<<<<<
- *         negstride = 0
- *         sl = []
- */
-  __pyx_v_totelem = 1;
-
-  /* "netCDF4.pyx":3603
- *         # fill up startp,countp,stridep.
- *         totelem = 1
- *         negstride = 0             # <<<<<<<<<<<<<<
- *         sl = []
- *         for n from 0 <= n < ndims:
- */
-  __pyx_v_negstride = 0;
-
-  /* "netCDF4.pyx":3604
- *         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 = 3604; __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":3605
- *         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 = 3605; __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":3606
- *         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 = 3606; __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 = 3606; __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 = 3606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-    /* "netCDF4.pyx":3607
- *         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 = 3607; __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 = 3607; __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 = 3607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    (__pyx_v_countp[__pyx_t_2]) = __pyx_t_8;
-
-    /* "netCDF4.pyx":3609
- *             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 = 3609; __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 = 3609; __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 = 3609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (__pyx_t_3) {
-
-      /* "netCDF4.pyx":3610
- *             # 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":3611
- *             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 = 3611; __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 = 3611; __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 = 3611; __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 = 3611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      (__pyx_v_stridep[__pyx_t_2]) = __pyx_t_9;
+  __Pyx_RefNannySetupContext("stringtoarr", 0);
 
-      /* "netCDF4.pyx":3612
- *                 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
+  /* "netCDF4/_netCDF4.pyx":4359
+ * @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_t_4 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3612; __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 = 3612; __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 = 3612; __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 = 3612; __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 = 3612; __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 = 3612; __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 = 3612; __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 = 3612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      (__pyx_v_startp[__pyx_t_2]) = __pyx_t_8;
+  __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[0]; __pyx_lineno = 4359; __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[0]; __pyx_lineno = 4359; __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":3613
- *                 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:
+    /* "netCDF4/_netCDF4.pyx":4360
+ * (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_10 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3613; __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 = 3613; __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 = 3613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4360; __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 = 4360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-      /* "netCDF4.pyx":3614
- *                 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]
+  /* "netCDF4/_netCDF4.pyx":4361
+ *     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_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_slice__85); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L6;
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4361; __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[0]; __pyx_lineno = 4361; __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[0]; __pyx_lineno = 4361; __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;
     }
-    /*else*/ {
+  }
+  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4361; __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[0]; __pyx_lineno = 4361; __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;
 
-      /* "netCDF4.pyx":3616
- *                 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))
+  /* "netCDF4/_netCDF4.pyx":4362
+ *         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_5 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3616; __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 = 3616; __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 = 3616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      (__pyx_v_startp[__pyx_t_2]) = __pyx_t_8;
+  __pyx_t_1 = PySequence_Tuple(__pyx_v_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4362; __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[0]; __pyx_lineno = 4362; __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[0]; __pyx_lineno = 4362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-      /* "netCDF4.pyx":3617
- *             else:
- *                 startp[n] = start[n]
- *                 stridep[n] = stride[n]             # <<<<<<<<<<<<<<
- *                 sl.append(slice(None,None, 1))
- *             totelem = totelem*countp[n]
+  /* "netCDF4/_netCDF4.pyx":4363
+ *     arr = numpy.zeros(NUMCHARS,dtype+'1')
+ *     arr[0:len(string)] = tuple(string)
+ *     return arr             # <<<<<<<<<<<<<<
+ * 
+ * def stringtochar(a):
  */
-      __pyx_t_5 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3617; __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 = 3617; __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 = 3617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      (__pyx_v_stridep[__pyx_t_2]) = __pyx_t_9;
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_arr);
+  __pyx_r = __pyx_v_arr;
+  goto __pyx_L0;
 
-      /* "netCDF4.pyx":3618
- *                 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
+  /* "netCDF4/_netCDF4.pyx":4342
+ *     return basedate
+ * 
+ * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtoarr(a, NUMCHARS,dtype='S')
  */
-      __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 = 3618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    __pyx_L6:;
 
-    /* "netCDF4.pyx":3619
- *                 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 = 3619; __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 = 3605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  /* 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._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;
+}
 
-  /* "netCDF4.pyx":3605
- *         negstride = 0
- *         sl = []
- *         for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
- *             count[n] = abs(count[n]) # make -1 into +1
- *             countp[n] = count[n]
+/* "netCDF4/_netCDF4.pyx":4365
+ *     return arr
+ * 
+ * def stringtochar(a):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtochar(a)
  */
-  __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_t_7); 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_XDECREF_SET(__pyx_v_n, __pyx_t_5);
-  __pyx_t_5 = 0;
 
-  /* "netCDF4.pyx":3622
- *         # 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);
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_11stringtochar(PyObject *__pyx_self, PyObject *__pyx_v_a); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_10stringtochar[] = "\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  [...]
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_11stringtochar = {"stringtochar", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_11stringtochar, METH_O, __pyx_doc_7netCDF4_8_netCDF4_10stringtochar};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_11stringtochar(PyObject *__pyx_self, PyObject *__pyx_v_a) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("stringtochar (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_10stringtochar(__pyx_self, ((PyObject *)__pyx_v_a));
 
-  /* "netCDF4.pyx":3623
- *         # for slice given.
- *         dataelem = PyArray_SIZE(data)
- *         if totelem != dataelem:             # <<<<<<<<<<<<<<
- *             raise IndexError('size of data array does not conform to slice')
- *         if negstride:
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10stringtochar(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);
+
+  /* "netCDF4/_netCDF4.pyx":4377
+ * @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_3 = ((__pyx_v_totelem != __pyx_v_dataelem) != 0);
-  if (__pyx_t_3) {
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4377; __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[0]; __pyx_lineno = 4377; __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;
 
-    /* "netCDF4.pyx":3624
- *         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.
+  /* "netCDF4/_netCDF4.pyx":4378
+ * 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_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3624; __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 = 3624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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[0]; __pyx_lineno = 4378; __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[0]; __pyx_lineno = 4378; __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) {
 
-  /* "netCDF4.pyx":3625
- *         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.
+    /* "netCDF4/_netCDF4.pyx":4379
+ *     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_3 = (__pyx_v_negstride != 0);
-  if (__pyx_t_3) {
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4379; __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[0]; __pyx_lineno = 4379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-    /* "netCDF4.pyx":3627
- *         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.
+  /* "netCDF4/_netCDF4.pyx":4380
+ *     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_10 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3627; __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 = 3627; __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);
-      }
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4380; __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 = 4380; __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[0]; __pyx_lineno = 4380; __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_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 = 3627; __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 = 3627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  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[0]; __pyx_lineno = 4380; __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[0]; __pyx_lineno = 4380; __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[0]; __pyx_lineno = 4380; __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[0]; __pyx_lineno = 4380; __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);
     }
-    __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 = 3627; __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":3628
- *             # 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 = 3628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (!__pyx_t_12) {
+  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[0]; __pyx_lineno = 4380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __Pyx_GOTREF(__pyx_t_1);
   } else {
-    __pyx_t_3 = __pyx_t_12;
-    goto __pyx_L10_bool_binop_done;
+    __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4380; __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[0]; __pyx_lineno = 4380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   }
-  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_3 = __pyx_t_12;
-  __pyx_L10_bool_binop_done:;
-  if (__pyx_t_3) {
+  __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[0]; __pyx_lineno = 4380; __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[0]; __pyx_lineno = 4380; __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[0]; __pyx_lineno = 4380; __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[0]; __pyx_lineno = 4380; __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;
 
-    /* "netCDF4.pyx":3632
- *             # 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
+  /* "netCDF4/_netCDF4.pyx":4381
+ *         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_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3632; __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 = 3632; __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 = 3632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    if (__pyx_t_3) {
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4381; __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[0]; __pyx_lineno = 4381; __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 = 4381; __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[0]; __pyx_lineno = 4381; __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[0]; __pyx_lineno = 4381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-      /* "netCDF4.pyx":3633
- *             # 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.
+  /* "netCDF4/_netCDF4.pyx":4382
+ *     b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')
+ *     b.shape = a.shape + (a.itemsize,)
+ *     return b             # <<<<<<<<<<<<<<
+ * 
+ * def chartostring(b):
  */
-      __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 = 3633; __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 = 3633; __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 = 3633; __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 = 3633; __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 = 3633; __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:;
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_b);
+  __pyx_r = __pyx_v_b;
+  goto __pyx_L0;
 
-    /* "netCDF4.pyx":3636
- *             # 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)
+  /* "netCDF4/_netCDF4.pyx":4365
+ *     return arr
+ * 
+ * def stringtochar(a):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtochar(a)
  */
-    __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 = 3636; __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 = 3636; __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 = 3636; __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 = 3636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    if (__pyx_t_3) {
 
-      /* "netCDF4.pyx":3637
- *             # variable.
- *             if self.endian() == 'native':
- *                 if is_native_little and data.dtype.byteorder == '>':             # <<<<<<<<<<<<<<
- *                     data.byteswap(True)
- *                 if is_native_big and data.dtype.byteorder == '<':
+  /* 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._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;
+}
+
+/* "netCDF4/_netCDF4.pyx":4384
+ *     return b
+ * 
+ * def chartostring(b):             # <<<<<<<<<<<<<<
+ *     """
+ * chartostring(b)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_13chartostring(PyObject *__pyx_self, PyObject *__pyx_v_b); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_12chartostring[] = "\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_8_netCDF4_13chartostring = {"chartostring", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_13chartostring, METH_O, __pyx_doc_7netCDF4_8_netCDF4_12chartostring};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_13chartostring(PyObject *__pyx_self, PyObject *__pyx_v_b) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("chartostring (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_12chartostring(__pyx_self, ((PyObject *)__pyx_v_b));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_12chartostring(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);
+
+  /* "netCDF4/_netCDF4.pyx":4396
+ * @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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3637; __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 = 3637; __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 = 3637; __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 = 3637; __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__35, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3637; __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) {
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4396; __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[0]; __pyx_lineno = 4396; __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;
 
-        /* "netCDF4.pyx":3638
- *             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)
+  /* "netCDF4/_netCDF4.pyx":4397
+ * 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_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 = 3638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_5);
-        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3638; __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:;
+  __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[0]; __pyx_lineno = 4397; __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[0]; __pyx_lineno = 4397; __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) {
 
-      /* "netCDF4.pyx":3639
- *                 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':
+    /* "netCDF4/_netCDF4.pyx":4398
+ *     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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3639; __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 = 3639; __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 = 3639; __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 = 3639; __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__34, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3639; __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) {
+    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4398; __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[0]; __pyx_lineno = 4398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-        /* "netCDF4.pyx":3640
- *                     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 ['=','|']:
+  /* "netCDF4/_netCDF4.pyx":4399
+ *     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(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3640; __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 = 3640; __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_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_tostring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4399; __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);
     }
-    __pyx_L13:;
+  }
+  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 = 4399; __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 = 4399; __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[0]; __pyx_lineno = 4399; __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[0]; __pyx_lineno = 4399; __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[0]; __pyx_lineno = 4399; __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[0]; __pyx_lineno = 4399; __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[0]; __pyx_lineno = 4399; __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;
 
-    /* "netCDF4.pyx":3641
- *                 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)
+  /* "netCDF4/_netCDF4.pyx":4400
+ *         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_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3641; __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 = 3641; __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 = 3641; __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 = 3641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    if (__pyx_t_3) {
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4400; __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[0]; __pyx_lineno = 4400; __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[0]; __pyx_lineno = 4400; __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;
 
-      /* "netCDF4.pyx":3642
- *                     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 == '=':
+  /* "netCDF4/_netCDF4.pyx":4401
+ *     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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3642; __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 = 3642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      if (__pyx_t_12) {
+  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
       } else {
-        __pyx_t_3 = __pyx_t_12;
-        goto __pyx_L22_bool_binop_done;
+        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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
       }
-      __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 = 3642; __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 = 3642; __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__52, Py_NE)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      if (__pyx_t_13) {
-      } else {
-        __pyx_t_12 = __pyx_t_13;
-        goto __pyx_L24_bool_binop_done;
+    } 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[0]; __pyx_lineno = 4401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
       }
-      __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_kp_s__53, Py_NE)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3642; __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) {
+      __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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[0]; __pyx_lineno = 4401; __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;
 
-        /* "netCDF4.pyx":3643
- *             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)
+  /* "netCDF4/_netCDF4.pyx":4402
+ *     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_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3643; __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 = 3643; __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:;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4402; __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__100, 0, 1, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4402; __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[0]; __pyx_lineno = 4402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-      /* "netCDF4.pyx":3644
- *                 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':
+  /* "netCDF4/_netCDF4.pyx":4403
+ *     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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3644; __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 = 3644; __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 = 3644; __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 = 3644; __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__52, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3644; __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) {
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(__pyx_v_a);
+  __pyx_r = __pyx_v_a;
+  goto __pyx_L0;
 
-        /* "netCDF4.pyx":3645
- *                     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 ['=','|']:
+  /* "netCDF4/_netCDF4.pyx":4384
+ *     return b
+ * 
+ * def chartostring(b):             # <<<<<<<<<<<<<<
+ *     """
+ * chartostring(b)
  */
-        __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 = 3645; __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 = 3645; __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":3646
- *                 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 = 3646; __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 = 3646; __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 = 3646; __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 = 3646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    if (__pyx_t_3) {
+  /* 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._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;
+}
 
-      /* "netCDF4.pyx":3647
- *                     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 == '=':
+/* "netCDF4/_netCDF4.pyx":4405
+ *     return a
+ * 
+ * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
+ *     """
+ * date2num(dates,units,calendar='standard')
  */
-      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3647; __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 = 3647; __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 = 3647; __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 = 3647; __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_NE)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3647; __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__53, Py_NE)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3647; __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":3648
- *             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 = 3648; __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 = 3648; __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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_15date2num(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_14date2num[] = "\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. [...]
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_15date2num = {"date2num", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_15date2num, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_14date2num};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_15date2num(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[0]; __pyx_lineno = 4405; __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--; }
+        }
       }
-      __pyx_L30:;
-
-      /* "netCDF4.pyx":3649
- *                 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 = 3649; __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 = 3649; __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;
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2num") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4405; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
-      __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 = 3649; __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 = 3649; __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 = 3649; __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":3650
- *                     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 = 3650; __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 = 3650; __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;
+    } 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_L35:;
-      goto __pyx_L29;
     }
-    __pyx_L29:;
+    __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[0]; __pyx_lineno = 4405; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_14date2num(__pyx_self, __pyx_v_dates, __pyx_v_units, __pyx_v_calendar);
 
-    /* "netCDF4.pyx":3652
- *                     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)
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_14date2num(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar) {
+  PyObject *__pyx_v_basedate = NULL;
+  PyObject *__pyx_v_unit = NULL;
+  int __pyx_v_isscalar;
+  PyObject *__pyx_v_shape = NULL;
+  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;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
+  PyObject *__pyx_t_10 = NULL;
+  PyObject *__pyx_t_11 = NULL;
+  Py_ssize_t __pyx_t_12;
+  PyObject *(*__pyx_t_13)(PyObject *);
+  int __pyx_t_14;
+  PyObject *__pyx_t_15 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_RefNannySetupContext("date2num", 0);
+  __Pyx_INCREF(__pyx_v_dates);
+
+  /* "netCDF4/_netCDF4.pyx":4434
+ * @return: a numeric time value, or an array of numeric time values.
+ *     """
+ *     basedate = _dateparse(units)             # <<<<<<<<<<<<<<
+ *     unit = units.split()[0].lower()
+ * 
  */
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3652; __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 = 3652; __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 = 3652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4434; __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[0]; __pyx_lineno = 4434; __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 = 4434; __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 = 3652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    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[0]; __pyx_lineno = 4434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __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 = 3652; __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) {
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_basedate = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-      /* "netCDF4.pyx":3653
- *             # 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:
+  /* "netCDF4/_netCDF4.pyx":4435
+ *     """
+ *     basedate = _dateparse(units)
+ *     unit = units.split()[0].lower()             # <<<<<<<<<<<<<<
+ * 
+ *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
  */
-      __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;
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4435; __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);
     }
-    /*else*/ {
-
-      /* "netCDF4.pyx":3656
- *                                    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);
+  }
+  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[0]; __pyx_lineno = 4435; __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[0]; __pyx_lineno = 4435; __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[0]; __pyx_lineno = 4435; __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[0]; __pyx_lineno = 4435; __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);
     }
-    __pyx_L38:;
+  }
+  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[0]; __pyx_lineno = 4435; __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[0]; __pyx_lineno = 4435; __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;
 
-    /* "netCDF4.pyx":3658
- *                 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:
+  /* "netCDF4/_netCDF4.pyx":4437
+ *     unit = units.split()[0].lower()
+ * 
+ *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \             # <<<<<<<<<<<<<<
+ *        (calendar in ['gregorian','standard'] and basedate > gregorian):
+ *         # use python datetime module,
  */
-    __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-    if (__pyx_t_3) {
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_6) {
+    goto __pyx_L5_next_or;
+  } else {
+  }
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4437; __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_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (!__pyx_t_6) {
+  } else {
+    __pyx_t_5 = __pyx_t_6;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_L5_next_or:;
 
-      /* "netCDF4.pyx":3659
- *                                    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':
+  /* "netCDF4/_netCDF4.pyx":4438
+ * 
+ *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
+ *        (calendar in ['gregorian','standard'] and basedate > gregorian):             # <<<<<<<<<<<<<<
+ *         # use python datetime module,
+ *         isscalar = False
  */
-      __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 = 3659; __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 = 3659; __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 = 3659; __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 = 3659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    goto __pyx_L9;
+  __Pyx_INCREF(__pyx_v_calendar);
+  __pyx_t_4 = __pyx_v_calendar;
+  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_7) {
+  } else {
+    __pyx_t_6 = __pyx_t_7;
+    goto __pyx_L8_bool_binop_done;
+  }
+  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __pyx_t_7;
+  __pyx_L8_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_7 = (__pyx_t_6 != 0);
+  if (__pyx_t_7) {
+  } else {
+    __pyx_t_5 = __pyx_t_7;
+    goto __pyx_L4_bool_binop_done;
   }
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __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[0]; __pyx_lineno = 4438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_5 = __pyx_t_7;
+  __pyx_L4_bool_binop_done:;
+  if (__pyx_t_5) {
 
-  /* "netCDF4.pyx":3660
- *             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')
+    /* "netCDF4/_netCDF4.pyx":4440
+ *        (calendar in ['gregorian','standard'] and basedate > gregorian):
+ *         # use python datetime module,
+ *         isscalar = False             # <<<<<<<<<<<<<<
+ *         try:
+ *             dates[0]
  */
-  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_3) {
+    __pyx_v_isscalar = 0;
 
-    /* "netCDF4.pyx":3661
- *                 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.
+    /* "netCDF4/_netCDF4.pyx":4441
+ *         # use python datetime module,
+ *         isscalar = False
+ *         try:             # <<<<<<<<<<<<<<
+ *             dates[0]
+ *         except:
  */
-    __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 = 3661; __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 = 3661; __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 = 3661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    if (__pyx_t_3) {
+    {
+      __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":3662
- *         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()
+        /* "netCDF4/_netCDF4.pyx":4442
+ *         isscalar = False
+ *         try:
+ *             dates[0]             # <<<<<<<<<<<<<<
+ *         except:
+ *             isscalar = True
  */
-      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3662; __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 = 3662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_dates, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4442; __pyx_clineno = __LINE__; goto __pyx_L10_error;};
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_L17_try_end;
+      __pyx_L10_error:;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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":3664
- *                 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
+      /* "netCDF4/_netCDF4.pyx":4443
+ *         try:
+ *             dates[0]
+ *         except:             # <<<<<<<<<<<<<<
+ *             isscalar = True
+ *         if isscalar:
  */
-    __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 = 3664; __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);
+      /*except:*/ {
+        __Pyx_AddTraceback("netCDF4._netCDF4.date2num", __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 = 4443; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_GOTREF(__pyx_t_1);
+
+        /* "netCDF4/_netCDF4.pyx":4444
+ *             dates[0]
+ *         except:
+ *             isscalar = True             # <<<<<<<<<<<<<<
+ *         if isscalar:
+ *             dates = numpy.array([dates])
+ */
+        __pyx_v_isscalar = 1;
+        __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_L11_exception_handled;
       }
+      __pyx_L12_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_L1_error;
+      __pyx_L11_exception_handled:;
+      __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);
+      __pyx_L17_try_end:;
     }
-    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 = 3664; __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 = 3664; __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 = 3664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_4));
-    __pyx_t_4 = 0;
 
-    /* "netCDF4.pyx":3665
- *             # flatten data array.
- *             data = data.flatten()
- *             if self.dtype == str:             # <<<<<<<<<<<<<<
- *                 # convert all elements from strings to bytes
- *                 for n in range(data.shape[0]):
+    /* "netCDF4/_netCDF4.pyx":4445
+ *         except:
+ *             isscalar = True
+ *         if isscalar:             # <<<<<<<<<<<<<<
+ *             dates = numpy.array([dates])
+ *         else:
  */
-    __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 = 3665; __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 = 3665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    if (__pyx_t_3) {
+    __pyx_t_5 = (__pyx_v_isscalar != 0);
+    if (__pyx_t_5) {
 
-      /* "netCDF4.pyx":3667
- *             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)
+      /* "netCDF4/_netCDF4.pyx":4446
+ *             isscalar = True
+ *         if isscalar:
+ *             dates = numpy.array([dates])             # <<<<<<<<<<<<<<
+ *         else:
+ *             dates = numpy.array(dates)
  */
-      __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 = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4446; __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 = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
       __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 = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4446; __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_INCREF(__pyx_v_dates);
+      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_dates);
+      __Pyx_GIVEREF(__pyx_v_dates);
+      __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[0]; __pyx_lineno = 4446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_GOTREF(__pyx_t_1);
+      } else {
+        __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_11);
+        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
+        PyTuple_SET_ITEM(__pyx_t_11, 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_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4446; __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_DECREF_SET(__pyx_v_dates, __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 = 3667; __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;
+      goto __pyx_L20;
+    }
+    /*else*/ {
+
+      /* "netCDF4/_netCDF4.pyx":4448
+ *             dates = numpy.array([dates])
+ *         else:
+ *             dates = numpy.array(dates)             # <<<<<<<<<<<<<<
+ *             shape = dates.shape
+ *         ismasked = False
+ */
+      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_t_2 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) {
+        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
+        if (likely(__pyx_t_2)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+          __Pyx_INCREF(__pyx_t_2);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_11, function);
+        }
+      }
+      if (!__pyx_t_2) {
+        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_dates); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
       } 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 = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4448; __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 = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = NULL;
+        __Pyx_INCREF(__pyx_v_dates);
+        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_dates);
+        __Pyx_GIVEREF(__pyx_v_dates);
+        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4448; __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;
-      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 = 3667; __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 = 3667; __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 = 3667; __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 = 3667; __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 = 3667; __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;
+      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+      __Pyx_DECREF_SET(__pyx_v_dates, __pyx_t_1);
+      __pyx_t_1 = 0;
+
+      /* "netCDF4/_netCDF4.pyx":4449
+ *         else:
+ *             dates = numpy.array(dates)
+ *             shape = dates.shape             # <<<<<<<<<<<<<<
+ *         ismasked = False
+ *         if hasattr(dates,'mask'):
+ */
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_v_shape = __pyx_t_1;
+      __pyx_t_1 = 0;
+    }
+    __pyx_L20:;
 
-        /* "netCDF4.pyx":3668
- *                 # 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
+    /* "netCDF4/_netCDF4.pyx":4450
+ *             dates = numpy.array(dates)
+ *             shape = dates.shape
+ *         ismasked = False             # <<<<<<<<<<<<<<
+ *         if hasattr(dates,'mask'):
+ *             mask = dates.mask
  */
-        __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 = 3668; __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 = 3668; __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 = 3668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    __pyx_v_ismasked = 0;
 
-        /* "netCDF4.pyx":3667
- *             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)
+    /* "netCDF4/_netCDF4.pyx":4451
+ *             shape = dates.shape
+ *         ismasked = False
+ *         if hasattr(dates,'mask'):             # <<<<<<<<<<<<<<
+ *             mask = dates.mask
+ *             ismasked = True
  */
-      }
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_5 = PyObject_HasAttr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = (__pyx_t_5 != 0);
+    if (__pyx_t_7) {
 
-      /* "netCDF4.pyx":3673
- *                 # 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]
+      /* "netCDF4/_netCDF4.pyx":4452
+ *         ismasked = False
+ *         if hasattr(dates,'mask'):
+ *             mask = dates.mask             # <<<<<<<<<<<<<<
+ *             ismasked = True
+ *         times = []
  */
-      __pyx_v_strdata = ((char **)malloc(((sizeof(char *)) * __pyx_v_totelem)));
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_v_mask = __pyx_t_1;
+      __pyx_t_1 = 0;
 
-      /* "netCDF4.pyx":3674
- *                 # 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)
+      /* "netCDF4/_netCDF4.pyx":4453
+ *         if hasattr(dates,'mask'):
+ *             mask = dates.mask
+ *             ismasked = True             # <<<<<<<<<<<<<<
+ *         times = []
+ *         for date in dates.flat:
  */
-      __pyx_t_16 = __pyx_v_totelem;
-      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_16; __pyx_v_i++) {
+      __pyx_v_ismasked = 1;
+      goto __pyx_L21;
+    }
+    __pyx_L21:;
 
-        /* "netCDF4.pyx":3675
- *                 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:
+    /* "netCDF4/_netCDF4.pyx":4454
+ *             mask = dates.mask
+ *             ismasked = True
+ *         times = []             # <<<<<<<<<<<<<<
+ *         for date in dates.flat:
+ *             if ismasked and not date:
  */
-        __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 = 3675; __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 = 3675; __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;
-      }
+    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_v_times = ((PyObject*)__pyx_t_1);
+    __pyx_t_1 = 0;
 
-      /* "netCDF4.pyx":3677
- *                     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)
+    /* "netCDF4/_netCDF4.pyx":4455
+ *             ismasked = True
+ *         times = []
+ *         for date in dates.flat:             # <<<<<<<<<<<<<<
+ *             if ismasked and not date:
+ *                 times.append(None)
  */
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3677; __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 = 3677; __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 = 3677; __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 = 3677; __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 = 3677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      if (!__pyx_t_12) {
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_flat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4455; __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_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); __pyx_t_12 = 0;
+      __pyx_t_13 = NULL;
+    } else {
+      __pyx_t_12 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    for (;;) {
+      if (likely(!__pyx_t_13)) {
+        if (likely(PyList_CheckExact(__pyx_t_11))) {
+          if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_11)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
       } else {
-        __pyx_t_3 = __pyx_t_12;
-        goto __pyx_L49_bool_binop_done;
+        __pyx_t_1 = __pyx_t_13(__pyx_t_11);
+        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 = 4455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_1);
       }
-      __pyx_t_12 = ((__pyx_v_ndims == 0) != 0);
-      __pyx_t_3 = __pyx_t_12;
-      __pyx_L49_bool_binop_done:;
-      if (__pyx_t_3) {
+      __Pyx_XDECREF_SET(__pyx_v_date, __pyx_t_1);
+      __pyx_t_1 = 0;
 
-        /* "netCDF4.pyx":3678
- *                 # 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:
+      /* "netCDF4/_netCDF4.pyx":4456
+ *         times = []
+ *         for date in dates.flat:
+ *             if ismasked and not date:             # <<<<<<<<<<<<<<
+ *                 times.append(None)
+ *             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;
+      __pyx_t_5 = (__pyx_v_ismasked != 0);
+      if (__pyx_t_5) {
+      } else {
+        __pyx_t_7 = __pyx_t_5;
+        goto __pyx_L25_bool_binop_done;
       }
-      /*else*/ {
+      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = ((!__pyx_t_5) != 0);
+      __pyx_t_7 = __pyx_t_6;
+      __pyx_L25_bool_binop_done:;
+      if (__pyx_t_7) {
 
-        /* "netCDF4.pyx":3681
- *                                        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)
+        /* "netCDF4/_netCDF4.pyx":4457
+ *         for date in dates.flat:
+ *             if ismasked and not date:
+ *                 times.append(None)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 td = date - basedate
  */
-        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3681; __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 = 3681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, Py_None); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        goto __pyx_L24;
       }
-      __pyx_L48:;
+      /*else*/ {
 
-      /* "netCDF4.pyx":3684
- *                     #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)
+        /* "netCDF4/_netCDF4.pyx":4459
+ *                 times.append(None)
+ *             else:
+ *                 td = date - basedate             # <<<<<<<<<<<<<<
+ *                 # total time in microseconds.
+ *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
  */
-      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-      if (__pyx_t_3) {
+        __pyx_t_1 = PyNumber_Subtract(__pyx_v_date, __pyx_v_basedate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_1);
+        __pyx_t_1 = 0;
 
-        /* "netCDF4.pyx":3685
- *                     #                   startp, countp, stridep, strdata)
- *                 if ierr != NC_NOERR:
- *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *                 free(strdata)
- *             else:
+        /* "netCDF4/_netCDF4.pyx":4461
+ *                 td = date - basedate
+ *                 # total time in microseconds.
+ *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6             # <<<<<<<<<<<<<<
+ *                 if unit in microsec_units:
+ *                     times.append(totaltime)
  */
-        __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 = 3685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4461; __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 = 3685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_seconds); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4461; __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 = 3685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_days); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_int_24); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4461; __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_Multiply(__pyx_t_3, __pyx_int_3600); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4461; __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_1, 0, 0, 0);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_totaltime, __pyx_t_3);
+        __pyx_t_3 = 0;
 
-      /* "netCDF4.pyx":3686
- *                 if ierr != NC_NOERR:
- *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *                 free(strdata)             # <<<<<<<<<<<<<<
- *             else:
- *                 # regular vlen.
+        /* "netCDF4/_netCDF4.pyx":4462
+ *                 # total time in microseconds.
+ *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
+ *                 if unit in microsec_units:             # <<<<<<<<<<<<<<
+ *                     times.append(totaltime)
+ *                 elif unit in millisec_units:
  */
-      free(__pyx_v_strdata);
-      goto __pyx_L43;
-    }
-    /*else*/ {
+        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_microsec_units); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_6 = (__pyx_t_7 != 0);
+        if (__pyx_t_6) {
 
-      /* "netCDF4.pyx":3691
- *                 # 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))
+          /* "netCDF4/_netCDF4.pyx":4463
+ *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
+ *                 if unit in microsec_units:
+ *                     times.append(totaltime)             # <<<<<<<<<<<<<<
+ *                 elif unit in millisec_units:
+ *                     times.append(totaltime/1.e3)
  */
-      __pyx_t_14 = __pyx_v_data->data;
-      __pyx_v_databuff = __pyx_t_14;
+          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_v_totaltime); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          goto __pyx_L27;
+        }
 
-      /* "netCDF4.pyx":3693
- *                 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]
+        /* "netCDF4/_netCDF4.pyx":4464
+ *                 if unit in microsec_units:
+ *                     times.append(totaltime)
+ *                 elif unit in millisec_units:             # <<<<<<<<<<<<<<
+ *                     times.append(totaltime/1.e3)
+ *                 elif unit in sec_units:
  */
-      __pyx_v_vldata = ((nc_vlen_t *)malloc((((size_t)__pyx_v_totelem) * (sizeof(nc_vlen_t)))));
+        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_millisec_units); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_7 = (__pyx_t_6 != 0);
+        if (__pyx_t_7) {
 
-      /* "netCDF4.pyx":3694
- *                 # 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
+          /* "netCDF4/_netCDF4.pyx":4465
+ *                     times.append(totaltime)
+ *                 elif unit in millisec_units:
+ *                     times.append(totaltime/1.e3)             # <<<<<<<<<<<<<<
+ *                 elif unit in sec_units:
+ *                     times.append(totaltime/1.e6)
  */
-      __pyx_t_16 = __pyx_v_totelem;
-      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_16; __pyx_v_i++) {
+          __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          goto __pyx_L27;
+        }
 
-        /* "netCDF4.pyx":3695
- *                 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:]:
+        /* "netCDF4/_netCDF4.pyx":4466
+ *                 elif unit in millisec_units:
+ *                     times.append(totaltime/1.e3)
+ *                 elif unit in sec_units:             # <<<<<<<<<<<<<<
+ *                     times.append(totaltime/1.e6)
+ *                 elif unit in min_units:
  */
-        __pyx_v_elptr = (((void **)__pyx_v_databuff)[0]);
+        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sec_units); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_6 = (__pyx_t_7 != 0);
+        if (__pyx_t_6) {
 
-        /* "netCDF4.pyx":3696
- *                 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.
+          /* "netCDF4/_netCDF4.pyx":4467
+ *                     times.append(totaltime/1.e3)
+ *                 elif unit in sec_units:
+ *                     times.append(totaltime/1.e6)             # <<<<<<<<<<<<<<
+ *                 elif unit in min_units:
+ *                     times.append(totaltime/1.e6/60)
  */
-        __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;
+          __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          goto __pyx_L27;
+        }
 
-        /* "netCDF4.pyx":3697
- *                     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
+        /* "netCDF4/_netCDF4.pyx":4468
+ *                 elif unit in sec_units:
+ *                     times.append(totaltime/1.e6)
+ *                 elif unit in min_units:             # <<<<<<<<<<<<<<
+ *                     times.append(totaltime/1.e6/60)
+ *                 elif unit in hr_units:
  */
-        __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 = 3697; __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 = 3697; __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__96, 1, 0, 1); 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_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 = 3697; __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 = 3697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-        if (__pyx_t_3) {
+        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_min_units); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_7 = (__pyx_t_6 != 0);
+        if (__pyx_t_7) {
 
-          /* "netCDF4.pyx":3700
- *                         #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
+          /* "netCDF4/_netCDF4.pyx":4469
+ *                     times.append(totaltime/1.e6)
+ *                 elif unit in min_units:
+ *                     times.append(totaltime/1.e6/60)             # <<<<<<<<<<<<<<
+ *                 elif unit in hr_units:
+ *                     times.append(totaltime/1.e6/3600)
  */
-          __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 = 3700; __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 = 3700; __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 = 3700; __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 = 3700; __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 = 3700; __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 = 3700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_int_60); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_2); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          goto __pyx_L27;
         }
 
-        /* "netCDF4.pyx":3701
- *                         # 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]
+        /* "netCDF4/_netCDF4.pyx":4470
+ *                 elif unit in min_units:
+ *                     times.append(totaltime/1.e6/60)
+ *                 elif unit in hr_units:             # <<<<<<<<<<<<<<
+ *                     times.append(totaltime/1.e6/3600)
+ *                 elif unit in day_units:
  */
-        (__pyx_v_vldata[__pyx_v_i]).len = PyArray_SIZE(__pyx_v_dataarr);
+        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hr_units); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_unit, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_6 = (__pyx_t_7 != 0);
+        if (__pyx_t_6) {
 
-        /* "netCDF4.pyx":3702
- *                         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)
+          /* "netCDF4/_netCDF4.pyx":4471
+ *                     times.append(totaltime/1.e6/60)
+ *                 elif unit in hr_units:
+ *                     times.append(totaltime/1.e6/3600)             # <<<<<<<<<<<<<<
+ *                 elif unit in day_units:
+ *                     times.append(totaltime/1.e6/3600./24.)
  */
-        __pyx_t_14 = __pyx_v_dataarr->data;
-        (__pyx_v_vldata[__pyx_v_i]).p = __pyx_t_14;
+          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_2);
+          __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_int_3600); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          goto __pyx_L27;
+        }
 
-        /* "netCDF4.pyx":3703
- *                     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:
+        /* "netCDF4/_netCDF4.pyx":4472
+ *                 elif unit in hr_units:
+ *                     times.append(totaltime/1.e6/3600)
+ *                 elif unit in day_units:             # <<<<<<<<<<<<<<
+ *                     times.append(totaltime/1.e6/3600./24.)
+ *                 else:
  */
-        __pyx_v_databuff = (__pyx_v_databuff + (__pyx_v_data->strides[0]));
+        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_units); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_v_unit, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_7 = (__pyx_t_6 != 0);
+        if (__pyx_t_7) {
+
+          /* "netCDF4/_netCDF4.pyx":4473
+ *                     times.append(totaltime/1.e6/3600)
+ *                 elif unit in day_units:
+ *                     times.append(totaltime/1.e6/3600./24.)             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     raise ValueError('unsupported time units')
+ */
+          __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_float_3600_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4473; __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_PyNumber_Divide(__pyx_t_2, __pyx_float_24_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+          goto __pyx_L27;
+        }
+        /*else*/ {
+
+          /* "netCDF4/_netCDF4.pyx":4475
+ *                     times.append(totaltime/1.e6/3600./24.)
+ *                 else:
+ *                     raise ValueError('unsupported time units')             # <<<<<<<<<<<<<<
+ *         if isscalar:
+ *             return times[0]
+ */
+          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4475; __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 = 4475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        __pyx_L27:;
       }
+      __pyx_L24:;
 
-      /* "netCDF4.pyx":3705
- *                     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)
+      /* "netCDF4/_netCDF4.pyx":4455
+ *             ismasked = True
+ *         times = []
+ *         for date in dates.flat:             # <<<<<<<<<<<<<<
+ *             if ismasked and not date:
+ *                 times.append(None)
  */
-      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3705; __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 = 3705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":4476
+ *                 else:
+ *                     raise ValueError('unsupported time units')
+ *         if isscalar:             # <<<<<<<<<<<<<<
+ *             return times[0]
+ *         else:
+ */
+    __pyx_t_7 = (__pyx_v_isscalar != 0);
+    if (__pyx_t_7) {
+
+      /* "netCDF4/_netCDF4.pyx":4477
+ *                     raise ValueError('unsupported time units')
+ *         if isscalar:
+ *             return times[0]             # <<<<<<<<<<<<<<
+ *         else:
+ *             return numpy.reshape(numpy.array(times), shape)
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_times, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4477; __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/_netCDF4.pyx":4479
+ *             return times[0]
+ *         else:
+ *             return numpy.reshape(numpy.array(times), shape)             # <<<<<<<<<<<<<<
+ *     else: # use netcdftime module for other calendars
+ *         cdftime = netcdftime.utime(units,calendar=calendar)
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4479; __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 = 3705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4479; __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 = 3705; __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 = 3705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-      if (!__pyx_t_12) {
+      __pyx_t_1 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_times); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
       } else {
-        __pyx_t_3 = __pyx_t_12;
-        goto __pyx_L56_bool_binop_done;
+        __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_15);
+        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+        __Pyx_INCREF(__pyx_v_times);
+        PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_times);
+        __Pyx_GIVEREF(__pyx_v_times);
+        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
       }
-      __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":3706
- *                 # 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;
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+      __pyx_t_4 = NULL;
+      __pyx_t_12 = 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_12 = 1;
+        }
       }
-      /*else*/ {
-
-        /* "netCDF4.pyx":3709
- *                                        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__97, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3709; __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 = 3709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_15 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_15);
+      if (__pyx_t_4) {
+        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
       }
-      __pyx_L55:;
-
-      /* "netCDF4.pyx":3712
- *                     #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) {
+      PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_12, __pyx_t_3);
+      __Pyx_GIVEREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_v_shape);
+      PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_12, __pyx_v_shape);
+      __Pyx_GIVEREF(__pyx_v_shape);
+      __pyx_t_3 = 0;
+      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_11);
+      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __pyx_r = __pyx_t_11;
+      __pyx_t_11 = 0;
+      goto __pyx_L0;
+    }
+  }
+  /*else*/ {
 
-        /* "netCDF4.pyx":3713
- *                     #                   startp, countp, stridep, vldata)
- *                 if ierr != NC_NOERR:
- *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *                 # free the pointer array.
- *                 free(vldata)
+    /* "netCDF4/_netCDF4.pyx":4481
+ *             return numpy.reshape(numpy.array(times), shape)
+ *     else: # use netcdftime module for other calendars
+ *         cdftime = netcdftime.utime(units,calendar=calendar)             # <<<<<<<<<<<<<<
+ *         return cdftime.date2num(dates)
+ * 
  */
-        __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 = 3713; __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 = 3713; __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 = 3713; __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 = 3713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
+    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_utime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_11);
+    __Pyx_INCREF(__pyx_v_units);
+    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_units);
+    __Pyx_GIVEREF(__pyx_v_units);
+    __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_15);
+    if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_calendar, __pyx_v_calendar) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, __pyx_t_15); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4481; __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_11); __pyx_t_11 = 0;
+    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+    __pyx_v_cdftime = __pyx_t_3;
+    __pyx_t_3 = 0;
 
-      /* "netCDF4.pyx":3715
- *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *                 # free the pointer array.
- *                 free(vldata)             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":4482
+ *     else: # use netcdftime module for other calendars
+ *         cdftime = netcdftime.utime(units,calendar=calendar)
+ *         return cdftime.date2num(dates)             # <<<<<<<<<<<<<<
  * 
- *     def _get(self,start,count,stride):
+ * def num2date(times,units,calendar='standard'):
  */
-      free(__pyx_v_vldata);
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_date2num); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_15);
+    __pyx_t_11 = NULL;
+    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_15))) {
+      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_15);
+      if (likely(__pyx_t_11)) {
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+        __Pyx_INCREF(__pyx_t_11);
+        __Pyx_INCREF(function);
+        __Pyx_DECREF_SET(__pyx_t_15, function);
+      }
     }
-    __pyx_L43:;
-    goto __pyx_L9;
+    if (!__pyx_t_11) {
+      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_dates); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4482; __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[0]; __pyx_lineno = 4482; __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_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_15, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4482; __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_15); __pyx_t_15 = 0;
+    __pyx_r = __pyx_t_3;
+    __pyx_t_3 = 0;
+    goto __pyx_L0;
   }
-  __pyx_L9:;
 
-  /* "netCDF4.pyx":3583
- * 
+  /* "netCDF4/_netCDF4.pyx":4405
+ *     return a
  * 
- *     def _put(self,ndarray data,start,count,stride):             # <<<<<<<<<<<<<<
- *         """Private method to put data into a netCDF variable"""
- *         cdef int ierr, ndims
+ * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
+ *     """
+ * date2num(dates,units,calendar='standard')
  */
 
   /* 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_XDECREF(__pyx_t_10);
-  __Pyx_AddTraceback("netCDF4.Variable._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_11);
+  __Pyx_XDECREF(__pyx_t_15);
+  __Pyx_AddTraceback("netCDF4._netCDF4.date2num", __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_XDECREF(__pyx_v_basedate);
+  __Pyx_XDECREF(__pyx_v_unit);
+  __Pyx_XDECREF(__pyx_v_shape);
+  __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;
 }
 
-/* "netCDF4.pyx":3717
- *                 free(vldata)
+/* "netCDF4/_netCDF4.pyx":4484
+ *         return cdftime.date2num(dates)
  * 
- *     def _get(self,start,count,stride):             # <<<<<<<<<<<<<<
- *         """Private method to retrieve data from a netCDF variable"""
- *         cdef int ierr, ndims
+ * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
+ *     """
+ * num2date(times,units,calendar='standard')
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_17num2date(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_16num2date[] = "\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  [...]
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_17num2date = {"num2date", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_17num2date, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_16num2date};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_17num2date(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("_get (wrapper)", 0);
+  __Pyx_RefNannySetupContext("num2date (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_count,&__pyx_n_s_stride,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);
@@ -51566,1960 +49658,1603 @@ static PyObject *__pyx_pw_7netCDF4_8Variable_65_get(PyObject *__pyx_v_self, PyOb
       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--;
+        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_count)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_units)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3717; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4484; __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 = 3717; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        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, "_get") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3717; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "num2date") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4484; __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);
+      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_start = values[0];
-    __pyx_v_count = values[1];
-    __pyx_v_stride = values[2];
+    __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("_get", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3717; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4484; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("netCDF4.Variable._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("netCDF4._netCDF4.num2date", __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);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_16num2date(__pyx_self, __pyx_v_times, __pyx_v_units, __pyx_v_calendar);
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_16num2date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_times, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar) {
+  PyObject *__pyx_v_basedate = NULL;
+  PyObject *__pyx_v_unit = NULL;
+  int __pyx_v_isscalar;
+  PyObject *__pyx_v_shape = NULL;
+  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;
-  Py_ssize_t __pyx_t_2;
-  PyObject *(*__pyx_t_3)(PyObject *);
+  PyObject *__pyx_t_2 = NULL;
+  PyObject *__pyx_t_3 = NULL;
   PyObject *__pyx_t_4 = NULL;
   int __pyx_t_5;
-  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_6;
   int __pyx_t_7;
-  size_t __pyx_t_8;
-  ptrdiff_t __pyx_t_9;
+  PyObject *__pyx_t_8 = NULL;
+  PyObject *__pyx_t_9 = NULL;
   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":3730
- *         # 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":3731
- *         # 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":3732
- *         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 = 3732; __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 = 3732; __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 = 3732; __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 = 3732; __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 = 3732; __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 = 3732; __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 = 3732; __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":3733
- *         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 = 3733; __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 = 3733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    if (__pyx_t_5) {
-
-      /* "netCDF4.pyx":3734
- *         for lendim in count:
- *             if lendim == -1:
- *                 shapeout = shapeout + (1,)             # <<<<<<<<<<<<<<
- *                 squeeze_out = True
- *             else:
- */
-      __pyx_t_4 = PyNumber_Add(__pyx_v_shapeout, __pyx_tuple__98); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3734; __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":3735
- *             if lendim == -1:
- *                 shapeout = shapeout + (1,)
- *                 squeeze_out = True             # <<<<<<<<<<<<<<
- *             else:
- *                 shapeout = shapeout + (lendim,)
- */
-      __pyx_v_squeeze_out = 1;
-      goto __pyx_L5;
-    }
-    /*else*/ {
-
-      /* "netCDF4.pyx":3737
- *                 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 = 3737; __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 = 3737; __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":3732
- *         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":3739
- *                 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 = 3739; __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 = 3739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v_ndims = __pyx_t_2;
-
-  /* "netCDF4.pyx":3741
- *         ndims = len(self.dimensions)
- *         # fill up startp,countp,stridep.
- *         negstride = 0             # <<<<<<<<<<<<<<
- *         sl = []
- *         for n from 0 <= n < ndims:
- */
-  __pyx_v_negstride = 0;
-
-  /* "netCDF4.pyx":3742
- *         # 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 = 3742; __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":3743
- *         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":3744
- *         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 = 3744; __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 = 3744; __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 = 3744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-    /* "netCDF4.pyx":3745
- *         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 = 3745; __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 = 3745; __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":3747
- *             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 = 3747; __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 = 3747; __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 = 3747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (__pyx_t_5) {
-
-      /* "netCDF4.pyx":3748
- *             # 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":3749
- *             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 = 3749; __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 = 3749; __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 = 3749; __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":3750
- *                 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 = 3750; __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 = 3750; __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 = 3750; __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 = 3750; __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 = 3750; __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 = 3750; __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 = 3750; __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":3751
- *                 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 = 3751; __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 = 3751; __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 = 3751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-      /* "netCDF4.pyx":3752
- *                 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__99); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      goto __pyx_L8;
-    }
-    /*else*/ {
-
-      /* "netCDF4.pyx":3754
- *                 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 = 3754; __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 = 3754; __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":3755
- *             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 = 3755; __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 = 3755; __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;
+  Py_ssize_t __pyx_t_11;
+  PyObject *(*__pyx_t_12)(PyObject *);
+  int __pyx_t_13;
+  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("num2date", 0);
+  __Pyx_INCREF(__pyx_v_times);
+  __Pyx_INCREF(__pyx_v_calendar);
 
-      /* "netCDF4.pyx":3756
- *                 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)
+  /* "netCDF4/_netCDF4.pyx":4521
+ * contains one.
+ *     """
+ *     calendar = calendar.lower()             # <<<<<<<<<<<<<<
+ *     basedate = _dateparse(units)
+ *     unit = units.split()[0].lower()
  */
-      __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 = 3756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4521; __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);
     }
-    __pyx_L8:;
   }
-
-  /* "netCDF4.pyx":3757
- *                 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 = 3757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (!__pyx_t_12) {
+  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 = 4521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   } else {
-    __pyx_t_5 = __pyx_t_12;
-    goto __pyx_L10_bool_binop_done;
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_5 = __pyx_t_12;
-  __pyx_L10_bool_binop_done:;
-  if (__pyx_t_5) {
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF_SET(__pyx_v_calendar, __pyx_t_1);
+  __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":3758
- *                 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:
+  /* "netCDF4/_netCDF4.pyx":4522
+ *     """
+ *     calendar = calendar.lower()
+ *     basedate = _dateparse(units)             # <<<<<<<<<<<<<<
+ *     unit = units.split()[0].lower()
+ * 
  */
-    __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3758; __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 = 3758; __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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4522; __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);
     }
-    __pyx_t_1 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  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[0]; __pyx_lineno = 4522; __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 = 3758; __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 = 3758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_data = ((PyArrayObject *)__pyx_t_4);
-    __pyx_t_4 = 0;
-
-    /* "netCDF4.pyx":3760
- *             data = numpy.empty(shapeout, self.dtype)
- *             # strides all 1 or scalar variable, use get_vara (faster)
- *             if sum(stride) == ndims or ndims == 0:             # <<<<<<<<<<<<<<
- *                 with nogil:
- *                     ierr = nc_get_vara(self._grpid, self._varid,
- */
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3760; __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 = 3760; __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 = 3760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  } else {
+    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4522; __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 = 3760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    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[0]; __pyx_lineno = 4522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __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 = 3760; __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) {
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_basedate = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-      /* "netCDF4.pyx":3761
- *             # strides all 1 or scalar variable, use get_vara (faster)
- *             if sum(stride) == ndims or ndims == 0:
- *                 with nogil:             # <<<<<<<<<<<<<<
- *                     ierr = nc_get_vara(self._grpid, self._varid,
- *                                        startp, countp, data.data)
+  /* "netCDF4/_netCDF4.pyx":4523
+ *     calendar = calendar.lower()
+ *     basedate = _dateparse(units)
+ *     unit = units.split()[0].lower()             # <<<<<<<<<<<<<<
+ * 
+ *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
  */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
-          #endif
-          /*try:*/ {
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4523; __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_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4523; __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[0]; __pyx_lineno = 4523; __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[0]; __pyx_lineno = 4523; __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[0]; __pyx_lineno = 4523; __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[0]; __pyx_lineno = 4523; __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[0]; __pyx_lineno = 4523; __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;
 
-            /* "netCDF4.pyx":3762
- *             if sum(stride) == ndims or ndims == 0:
- *                 with nogil:
- *                     ierr = nc_get_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
- *                                        startp, countp, data.data)
- *             else:
+  /* "netCDF4/_netCDF4.pyx":4525
+ *     unit = units.split()[0].lower()
+ * 
+ *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \             # <<<<<<<<<<<<<<
+ *        (calendar in ['gregorian','standard'] and basedate > gregorian):
+ *         # use python datetime module,
  */
-            __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_data->data);
-          }
+  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_6) {
+    goto __pyx_L5_next_or;
+  } else {
+  }
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4525; __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_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  if (!__pyx_t_6) {
+  } else {
+    __pyx_t_5 = __pyx_t_6;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_L5_next_or:;
 
-          /* "netCDF4.pyx":3761
- *             # strides all 1 or scalar variable, use get_vara (faster)
- *             if sum(stride) == ndims or ndims == 0:
- *                 with nogil:             # <<<<<<<<<<<<<<
- *                     ierr = nc_get_vara(self._grpid, self._varid,
- *                                        startp, countp, data.data)
+  /* "netCDF4/_netCDF4.pyx":4526
+ * 
+ *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
+ *        (calendar in ['gregorian','standard'] and basedate > gregorian):             # <<<<<<<<<<<<<<
+ *         # use python datetime module,
+ *         isscalar = False
  */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L17;
-            }
-            __pyx_L17:;
-          }
-      }
-      goto __pyx_L12;
-    }
-    /*else*/ {
+  __Pyx_INCREF(__pyx_v_calendar);
+  __pyx_t_4 = __pyx_v_calendar;
+  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_7) {
+  } else {
+    __pyx_t_6 = __pyx_t_7;
+    goto __pyx_L8_bool_binop_done;
+  }
+  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __pyx_t_7;
+  __pyx_L8_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_7 = (__pyx_t_6 != 0);
+  if (__pyx_t_7) {
+  } else {
+    __pyx_t_5 = __pyx_t_7;
+    goto __pyx_L4_bool_binop_done;
+  }
+  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __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[0]; __pyx_lineno = 4526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_5 = __pyx_t_7;
+  __pyx_L4_bool_binop_done:;
+  if (__pyx_t_5) {
 
-      /* "netCDF4.pyx":3765
- *                                        startp, countp, data.data)
- *             else:
- *                 with nogil:             # <<<<<<<<<<<<<<
- *                     ierr = nc_get_vars(self._grpid, self._varid,
- *                                        startp, countp, stridep, data.data)
+    /* "netCDF4/_netCDF4.pyx":4528
+ *        (calendar in ['gregorian','standard'] and basedate > gregorian):
+ *         # use python datetime module,
+ *         isscalar = False             # <<<<<<<<<<<<<<
+ *         try:
+ *             times[0]
  */
-      {
-          #ifdef WITH_THREAD
-          PyThreadState *_save;
-          Py_UNBLOCK_THREADS
-          #endif
-          /*try:*/ {
+    __pyx_v_isscalar = 0;
 
-            /* "netCDF4.pyx":3766
- *             else:
- *                 with nogil:
- *                     ierr = nc_get_vars(self._grpid, self._varid,             # <<<<<<<<<<<<<<
- *                                        startp, countp, stridep, data.data)
- *             if ierr == NC_EINVALCOORDS:
+    /* "netCDF4/_netCDF4.pyx":4529
+ *         # use python datetime module,
+ *         isscalar = False
+ *         try:             # <<<<<<<<<<<<<<
+ *             times[0]
+ *         except:
  */
-            __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_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":3765
- *                                        startp, countp, data.data)
- *             else:
- *                 with nogil:             # <<<<<<<<<<<<<<
- *                     ierr = nc_get_vars(self._grpid, self._varid,
- *                                        startp, countp, stridep, data.data)
+        /* "netCDF4/_netCDF4.pyx":4530
+ *         isscalar = False
+ *         try:
+ *             times[0]             # <<<<<<<<<<<<<<
+ *         except:
+ *             isscalar = True
  */
-          /*finally:*/ {
-            /*normal exit:*/{
-              #ifdef WITH_THREAD
-              Py_BLOCK_THREADS
-              #endif
-              goto __pyx_L20;
-            }
-            __pyx_L20:;
-          }
+        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_times, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4530; __pyx_clineno = __LINE__; goto __pyx_L10_error;};
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       }
-    }
-    __pyx_L12:;
+      __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_L17_try_end;
+      __pyx_L10_error:;
+      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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":3768
- *                     ierr = nc_get_vars(self._grpid, self._varid,
- *                                        startp, countp, stridep, data.data)
- *             if ierr == NC_EINVALCOORDS:             # <<<<<<<<<<<<<<
- *                 raise IndexError
- *             elif ierr != NC_NOERR:
+      /* "netCDF4/_netCDF4.pyx":4531
+ *         try:
+ *             times[0]
+ *         except:             # <<<<<<<<<<<<<<
+ *             isscalar = True
+ *         if isscalar:
  */
-    __pyx_t_5 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0);
-    if (__pyx_t_5) {
+      /*except:*/ {
+        __Pyx_AddTraceback("netCDF4._netCDF4.num2date", __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 = 4531; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
+        __Pyx_GOTREF(__pyx_t_2);
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_GOTREF(__pyx_t_1);
 
-      /* "netCDF4.pyx":3769
- *                                        startp, countp, stridep, data.data)
- *             if ierr == NC_EINVALCOORDS:
- *                 raise IndexError             # <<<<<<<<<<<<<<
- *             elif ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        /* "netCDF4/_netCDF4.pyx":4532
+ *             times[0]
+ *         except:
+ *             isscalar = True             # <<<<<<<<<<<<<<
+ *         if isscalar:
+ *             times = numpy.array([times],dtype='d')
  */
-      __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_v_isscalar = 1;
+        __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_L11_exception_handled;
+      }
+      __pyx_L12_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_L1_error;
+      __pyx_L11_exception_handled:;
+      __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);
+      __pyx_L17_try_end:;
     }
 
-    /* "netCDF4.pyx":3770
- *             if ierr == NC_EINVALCOORDS:
- *                 raise IndexError
- *             elif ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         elif self._isvlen:
+    /* "netCDF4/_netCDF4.pyx":4533
+ *         except:
+ *             isscalar = True
+ *         if isscalar:             # <<<<<<<<<<<<<<
+ *             times = numpy.array([times],dtype='d')
+ *         else:
  */
-    __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+    __pyx_t_5 = (__pyx_v_isscalar != 0);
     if (__pyx_t_5) {
 
-      /* "netCDF4.pyx":3771
- *                 raise IndexError
- *             elif ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *         elif self._isvlen:
- *             # allocate array of correct primitive type.
+      /* "netCDF4/_netCDF4.pyx":4534
+ *             isscalar = True
+ *         if isscalar:
+ *             times = numpy.array([times],dtype='d')             # <<<<<<<<<<<<<<
+ *         else:
+ *             times = numpy.array(times, dtype='d')
  */
-      __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 = 3771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4534; __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 = 3771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4534; __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 = 3771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4534; __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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4534; __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 = 0;
+      __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
+      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_n_s_d) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4534; __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_1, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    goto __pyx_L9;
-  }
-
-  /* "netCDF4.pyx":3772
- *             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 = 3772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (__pyx_t_5) {
-
-    /* "netCDF4.pyx":3774
- *         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 = 3774; __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 = 3774; __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 = 3774; __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 = 3774; __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 = 3774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_data = ((PyArrayObject *)__pyx_t_1);
-    __pyx_t_1 = 0;
-
-    /* "netCDF4.pyx":3776
- *             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 = 3776; __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 = 3776; __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 = 3776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_3);
+      __pyx_t_3 = 0;
+      goto __pyx_L20;
     }
-    __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 = 3776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_1));
-    __pyx_t_1 = 0;
-
-    /* "netCDF4.pyx":3777
- *             # 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 = 3777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_v_totelem = __pyx_t_1;
-    __pyx_t_1 = 0;
-
-    /* "netCDF4.pyx":3778
- *             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 = 3778; __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 = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    if (__pyx_t_5) {
+    /*else*/ {
 
-      /* "netCDF4.pyx":3781
- *                 # 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:
+      /* "netCDF4/_netCDF4.pyx":4536
+ *             times = numpy.array([times],dtype='d')
+ *         else:
+ *             times = numpy.array(times, dtype='d')             # <<<<<<<<<<<<<<
+ *             shape = times.shape
+ *         ismasked = False
  */
-      __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(char *))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4536; __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 = 3781; __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 = 4536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_v_times);
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_times);
+      __Pyx_GIVEREF(__pyx_v_times);
+      __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_d) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
       __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 = 3781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-      __pyx_v_strdata = ((char **)malloc(__pyx_t_8));
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_4);
+      __pyx_t_4 = 0;
 
-      /* "netCDF4.pyx":3783
- *                 strdata = <char **>malloc(sizeof(char *) * totelem)
- *                 # strides all 1 or scalar variable, use get_vara (faster)
- *                 if sum(stride) == ndims or ndims == 0:             # <<<<<<<<<<<<<<
- *                     with nogil:
- *                         ierr = nc_get_vara(self._grpid, self._varid,
+      /* "netCDF4/_netCDF4.pyx":4537
+ *         else:
+ *             times = numpy.array(times, dtype='d')
+ *             shape = times.shape             # <<<<<<<<<<<<<<
+ *         ismasked = False
+ *         if hasattr(times,'mask'):
  */
-      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3783; __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 = 3783; __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 = 3783; __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 = 3783; __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 = 3783; __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_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) {
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_v_shape = __pyx_t_4;
+      __pyx_t_4 = 0;
+    }
+    __pyx_L20:;
 
-        /* "netCDF4.pyx":3784
- *                 # strides all 1 or scalar variable, use get_vara (faster)
- *                 if sum(stride) == ndims or ndims == 0:
- *                     with nogil:             # <<<<<<<<<<<<<<
- *                         ierr = nc_get_vara(self._grpid, self._varid,
- *                                            startp, countp, strdata)
+    /* "netCDF4/_netCDF4.pyx":4538
+ *             times = numpy.array(times, dtype='d')
+ *             shape = times.shape
+ *         ismasked = False             # <<<<<<<<<<<<<<
+ *         if hasattr(times,'mask'):
+ *             mask = times.mask
  */
-        {
-            #ifdef WITH_THREAD
-            PyThreadState *_save;
-            Py_UNBLOCK_THREADS
-            #endif
-            /*try:*/ {
+    __pyx_v_ismasked = 0;
 
-              /* "netCDF4.pyx":3785
- *                 if sum(stride) == ndims or ndims == 0:
- *                     with nogil:
- *                         ierr = nc_get_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
- *                                            startp, countp, strdata)
- *                 else:
+    /* "netCDF4/_netCDF4.pyx":4539
+ *             shape = times.shape
+ *         ismasked = False
+ *         if hasattr(times,'mask'):             # <<<<<<<<<<<<<<
+ *             mask = times.mask
+ *             ismasked = True
  */
-              __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_strdata);
-            }
+    __pyx_t_5 = PyObject_HasAttr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = (__pyx_t_5 != 0);
+    if (__pyx_t_7) {
 
-            /* "netCDF4.pyx":3784
- *                 # strides all 1 or scalar variable, use get_vara (faster)
- *                 if sum(stride) == ndims or ndims == 0:
- *                     with nogil:             # <<<<<<<<<<<<<<
- *                         ierr = nc_get_vara(self._grpid, self._varid,
- *                                            startp, countp, strdata)
+      /* "netCDF4/_netCDF4.pyx":4540
+ *         ismasked = False
+ *         if hasattr(times,'mask'):
+ *             mask = times.mask             # <<<<<<<<<<<<<<
+ *             ismasked = True
+ *         dates = []
  */
-            /*finally:*/ {
-              /*normal exit:*/{
-                #ifdef WITH_THREAD
-                Py_BLOCK_THREADS
-                #endif
-                goto __pyx_L28;
-              }
-              __pyx_L28:;
-            }
-        }
-        goto __pyx_L23;
-      }
-      /*else*/ {
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __pyx_v_mask = __pyx_t_4;
+      __pyx_t_4 = 0;
 
-        /* "netCDF4.pyx":3789
- *                 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)
+      /* "netCDF4/_netCDF4.pyx":4541
+ *         if hasattr(times,'mask'):
+ *             mask = times.mask
+ *             ismasked = True             # <<<<<<<<<<<<<<
+ *         dates = []
+ *         for time in times.flat:
  */
-        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3789; __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 = 3789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      __pyx_L23:;
+      __pyx_v_ismasked = 1;
+      goto __pyx_L21;
+    }
+    __pyx_L21:;
 
-      /* "netCDF4.pyx":3792
- *                     #ierr = nc_get_vars(self._grpid, self._varid,
- *                     #                   startp, countp, stridep, strdata)
- *                 if ierr == NC_EINVALCOORDS:             # <<<<<<<<<<<<<<
- *                     raise IndexError
- *                 elif ierr != NC_NOERR:
+    /* "netCDF4/_netCDF4.pyx":4542
+ *             mask = times.mask
+ *             ismasked = True
+ *         dates = []             # <<<<<<<<<<<<<<
+ *         for time in times.flat:
+ *             if ismasked and not time:
  */
-      __pyx_t_5 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0);
-      if (__pyx_t_5) {
+    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_4);
+    __pyx_v_dates = ((PyObject*)__pyx_t_4);
+    __pyx_t_4 = 0;
 
-        /* "netCDF4.pyx":3793
- *                     #                   startp, countp, stridep, strdata)
- *                 if ierr == NC_EINVALCOORDS:
- *                     raise IndexError             # <<<<<<<<<<<<<<
- *                 elif ierr != NC_NOERR:
- *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    /* "netCDF4/_netCDF4.pyx":4543
+ *             ismasked = True
+ *         dates = []
+ *         for time in times.flat:             # <<<<<<<<<<<<<<
+ *             if ismasked and not time:
+ *                 dates.append(None)
  */
-        __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_flat); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4543; __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_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_11 = 0;
+      __pyx_t_12 = NULL;
+    } else {
+      __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    for (;;) {
+      if (likely(!__pyx_t_12)) {
+        if (likely(PyList_CheckExact(__pyx_t_2))) {
+          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_2)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        } else {
+          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+          #if CYTHON_COMPILING_IN_CPYTHON
+          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #else
+          __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          #endif
+        }
+      } else {
+        __pyx_t_4 = __pyx_t_12(__pyx_t_2);
+        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 = 4543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          }
+          break;
+        }
+        __Pyx_GOTREF(__pyx_t_4);
       }
+      __Pyx_XDECREF_SET(__pyx_v_time, __pyx_t_4);
+      __pyx_t_4 = 0;
 
-      /* "netCDF4.pyx":3794
- *                 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
+      /* "netCDF4/_netCDF4.pyx":4544
+ *         dates = []
+ *         for time in times.flat:
+ *             if ismasked and not time:             # <<<<<<<<<<<<<<
+ *                 dates.append(None)
+ *             else:
  */
-      __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
+      __pyx_t_5 = (__pyx_v_ismasked != 0);
       if (__pyx_t_5) {
-
-        /* "netCDF4.pyx":3795
- *                     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 = 3795; __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 = 3795; __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 = 3795; __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 = 3795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      } else {
+        __pyx_t_7 = __pyx_t_5;
+        goto __pyx_L25_bool_binop_done;
       }
+      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_time); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = ((!__pyx_t_5) != 0);
+      __pyx_t_7 = __pyx_t_6;
+      __pyx_L25_bool_binop_done:;
+      if (__pyx_t_7) {
 
-      /* "netCDF4.pyx":3798
- *                 # 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 = 3798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {
-
-        /* "netCDF4.pyx":3799
- *                 # 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)
+        /* "netCDF4/_netCDF4.pyx":4545
+ *         for time in times.flat:
+ *             if ismasked and not time:
+ *                 dates.append(None)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 # convert to total seconds
  */
-        __pyx_t_6 = __Pyx_PyBytes_FromString((__pyx_v_strdata[__pyx_v_i])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3799; __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 = 3799; __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 = 3799; __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 = 3799; __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 = 3799; __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 = 3799; __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 = 3799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+        __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dates, Py_None); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        goto __pyx_L24;
       }
+      /*else*/ {
 
-      /* "netCDF4.pyx":3801
- *                     data[i] = strdata[i].decode(default_encoding)
- *                 # reshape the output array
- *                 data = numpy.reshape(data, shapeout)             # <<<<<<<<<<<<<<
- *                 free(strdata)
+        /* "netCDF4/_netCDF4.pyx":4548
  *             else:
+ *                 # convert to total seconds
+ *                 if unit in microsec_units:             # <<<<<<<<<<<<<<
+ *                     tsecs = time/1.e6
+ *                 elif unit in millisec_units:
  */
-      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3801; __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 = 3801; __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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_microsec_units); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_6 = (__pyx_t_7 != 0);
+        if (__pyx_t_6) {
+
+          /* "netCDF4/_netCDF4.pyx":4549
+ *                 # convert to total seconds
+ *                 if unit in microsec_units:
+ *                     tsecs = time/1.e6             # <<<<<<<<<<<<<<
+ *                 elif unit in millisec_units:
+ *                     tsecs = time/1.e3
+ */
+          __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_v_time, __pyx_float_1_e6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
+          __pyx_t_4 = 0;
+          goto __pyx_L27;
         }
-      }
-      __pyx_t_6 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3801; __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 = 3801; __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 = 3801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_10));
-      __pyx_t_10 = 0;
 
-      /* "netCDF4.pyx":3802
- *                 # reshape the output array
- *                 data = numpy.reshape(data, shapeout)
- *                 free(strdata)             # <<<<<<<<<<<<<<
- *             else:
- *                 # regular vlen
+        /* "netCDF4/_netCDF4.pyx":4550
+ *                 if unit in microsec_units:
+ *                     tsecs = time/1.e6
+ *                 elif unit in millisec_units:             # <<<<<<<<<<<<<<
+ *                     tsecs = time/1.e3
+ *                 elif unit in sec_units:
  */
-      free(__pyx_v_strdata);
-      goto __pyx_L22;
-    }
-    /*else*/ {
+        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_millisec_units); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_7 = (__pyx_t_6 != 0);
+        if (__pyx_t_7) {
 
-      /* "netCDF4.pyx":3806
- *                 # 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:
+          /* "netCDF4/_netCDF4.pyx":4551
+ *                     tsecs = time/1.e6
+ *                 elif unit in millisec_units:
+ *                     tsecs = time/1.e3             # <<<<<<<<<<<<<<
+ *                 elif unit in sec_units:
+ *                     tsecs = time
  */
-      __pyx_t_10 = __Pyx_PyInt_FromSize_t((sizeof(nc_vlen_t))); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3806; __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 = 3806; __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 = 3806; __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));
+          __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_v_time, __pyx_float_1_e3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
+          __pyx_t_4 = 0;
+          goto __pyx_L27;
+        }
 
-      /* "netCDF4.pyx":3808
- *                 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:             # <<<<<<<<<<<<<<
- *                     with nogil:
- *                         ierr = nc_get_vara(self._grpid, self._varid,
+        /* "netCDF4/_netCDF4.pyx":4552
+ *                 elif unit in millisec_units:
+ *                     tsecs = time/1.e3
+ *                 elif unit in sec_units:             # <<<<<<<<<<<<<<
+ *                     tsecs = time
+ *                 elif unit in min_units:
  */
-      __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3808; __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 = 3808; __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 = 3808; __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 = 3808; __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 = 3808; __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_L33_bool_binop_done;
-      }
-      __pyx_t_12 = ((__pyx_v_ndims == 0) != 0);
-      __pyx_t_5 = __pyx_t_12;
-      __pyx_L33_bool_binop_done:;
-      if (__pyx_t_5) {
+        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sec_units); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_6 = (__pyx_t_7 != 0);
+        if (__pyx_t_6) {
 
-        /* "netCDF4.pyx":3809
- *                 # strides all 1 or scalar variable, use get_vara (faster)
- *                 if sum(stride) == ndims or ndims == 0:
- *                     with nogil:             # <<<<<<<<<<<<<<
- *                         ierr = nc_get_vara(self._grpid, self._varid,
- *                                            startp, countp, vldata)
+          /* "netCDF4/_netCDF4.pyx":4553
+ *                     tsecs = time/1.e3
+ *                 elif unit in sec_units:
+ *                     tsecs = time             # <<<<<<<<<<<<<<
+ *                 elif unit in min_units:
+ *                     tsecs = time*60.
  */
-        {
-            #ifdef WITH_THREAD
-            PyThreadState *_save;
-            Py_UNBLOCK_THREADS
-            #endif
-            /*try:*/ {
+          __Pyx_INCREF(__pyx_v_time);
+          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_v_time);
+          goto __pyx_L27;
+        }
 
-              /* "netCDF4.pyx":3810
- *                 if sum(stride) == ndims or ndims == 0:
- *                     with nogil:
- *                         ierr = nc_get_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
- *                                            startp, countp, vldata)
- *                 else:
+        /* "netCDF4/_netCDF4.pyx":4554
+ *                 elif unit in sec_units:
+ *                     tsecs = time
+ *                 elif unit in min_units:             # <<<<<<<<<<<<<<
+ *                     tsecs = time*60.
+ *                 elif unit in hr_units:
  */
-              __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_vldata);
-            }
+        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_min_units); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_7 = (__pyx_t_6 != 0);
+        if (__pyx_t_7) {
 
-            /* "netCDF4.pyx":3809
- *                 # strides all 1 or scalar variable, use get_vara (faster)
- *                 if sum(stride) == ndims or ndims == 0:
- *                     with nogil:             # <<<<<<<<<<<<<<
- *                         ierr = nc_get_vara(self._grpid, self._varid,
- *                                            startp, countp, vldata)
+          /* "netCDF4/_netCDF4.pyx":4555
+ *                     tsecs = time
+ *                 elif unit in min_units:
+ *                     tsecs = time*60.             # <<<<<<<<<<<<<<
+ *                 elif unit in hr_units:
+ *                     tsecs = time*3600.
  */
-            /*finally:*/ {
-              /*normal exit:*/{
-                #ifdef WITH_THREAD
-                Py_BLOCK_THREADS
-                #endif
-                goto __pyx_L37;
-              }
-              __pyx_L37:;
-            }
+          __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_60_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
+          __pyx_t_4 = 0;
+          goto __pyx_L27;
         }
-        goto __pyx_L32;
-      }
-      /*else*/ {
 
-        /* "netCDF4.pyx":3813
- *                                            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)
+        /* "netCDF4/_netCDF4.pyx":4556
+ *                 elif unit in min_units:
+ *                     tsecs = time*60.
+ *                 elif unit in hr_units:             # <<<<<<<<<<<<<<
+ *                     tsecs = time*3600.
+ *                 elif unit in day_units:
  */
-        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3813; __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 = 3813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      __pyx_L32:;
+        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_hr_units); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_6 = (__pyx_t_7 != 0);
+        if (__pyx_t_6) {
 
-      /* "netCDF4.pyx":3816
- *                     #ierr = nc_get_vars(self._grpid, self._varid,
- *                     #                   startp, countp, stridep, vldata)
- *                 if ierr == NC_EINVALCOORDS:             # <<<<<<<<<<<<<<
- *                     raise IndexError
- *                 elif ierr != NC_NOERR:
+          /* "netCDF4/_netCDF4.pyx":4557
+ *                     tsecs = time*60.
+ *                 elif unit in hr_units:
+ *                     tsecs = time*3600.             # <<<<<<<<<<<<<<
+ *                 elif unit in day_units:
+ *                     tsecs = time*86400.
  */
-      __pyx_t_5 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0);
-      if (__pyx_t_5) {
+          __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_3600_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
+          __pyx_t_4 = 0;
+          goto __pyx_L27;
+        }
 
-        /* "netCDF4.pyx":3817
- *                     #                   startp, countp, stridep, vldata)
- *                 if ierr == NC_EINVALCOORDS:
- *                     raise IndexError             # <<<<<<<<<<<<<<
- *                 elif ierr != NC_NOERR:
- *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+        /* "netCDF4/_netCDF4.pyx":4558
+ *                 elif unit in hr_units:
+ *                     tsecs = time*3600.
+ *                 elif unit in day_units:             # <<<<<<<<<<<<<<
+ *                     tsecs = time*86400.
+ *                 else:
  */
-        __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
+        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_day_units); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_v_unit, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __pyx_t_7 = (__pyx_t_6 != 0);
+        if (__pyx_t_7) {
 
-      /* "netCDF4.pyx":3818
- *                 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
+          /* "netCDF4/_netCDF4.pyx":4559
+ *                     tsecs = time*3600.
+ *                 elif unit in day_units:
+ *                     tsecs = time*86400.             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     raise ValueError('unsupported time units')
  */
-      __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
-      if (__pyx_t_5) {
+          __pyx_t_4 = PyNumber_Multiply(__pyx_v_time, __pyx_float_86400_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_4);
+          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_4);
+          __pyx_t_4 = 0;
+          goto __pyx_L27;
+        }
+        /*else*/ {
 
-        /* "netCDF4.pyx":3819
- *                     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.
+          /* "netCDF4/_netCDF4.pyx":4561
+ *                     tsecs = time*86400.
+ *                 else:
+ *                     raise ValueError('unsupported time units')             # <<<<<<<<<<<<<<
+ *                 # compute time delta.
+ *                 days = tsecs // 86400.
  */
-        __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 = 3819; __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 = 3819; __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 = 3819; __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 = 3819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
+          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4561; __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 = 4561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        __pyx_L27:;
 
-      /* "netCDF4.pyx":3822
- *                 # 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)
+        /* "netCDF4/_netCDF4.pyx":4563
+ *                     raise ValueError('unsupported time units')
+ *                 # compute time delta.
+ *                 days = tsecs // 86400.             # <<<<<<<<<<<<<<
+ *                 msecsd = tsecs*1.e6 - days*86400.*1.e6
+ *                 secs = msecsd // 1.e6
  */
-      __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 = 3822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {
+        __pyx_t_4 = PyNumber_FloorDivide(__pyx_v_tsecs, __pyx_float_86400_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __Pyx_XDECREF_SET(__pyx_v_days, __pyx_t_4);
+        __pyx_t_4 = 0;
 
-        /* "netCDF4.pyx":3823
- *                 # 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
+        /* "netCDF4/_netCDF4.pyx":4564
+ *                 # compute time delta.
+ *                 days = tsecs // 86400.
+ *                 msecsd = tsecs*1.e6 - days*86400.*1.e6             # <<<<<<<<<<<<<<
+ *                 secs = msecsd // 1.e6
+ *                 msecs = numpy.round(msecsd - secs*1.e6)
  */
-        __pyx_t_8 = (__pyx_v_vldata[__pyx_v_i]).len;
-        __pyx_v_arrlen = __pyx_t_8;
+        __pyx_t_4 = PyNumber_Multiply(__pyx_v_tsecs, __pyx_float_1_e6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        __pyx_t_3 = PyNumber_Multiply(__pyx_v_days, __pyx_float_86400_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_float_1_e6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4564; __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_XDECREF_SET(__pyx_v_msecsd, __pyx_t_3);
+        __pyx_t_3 = 0;
 
-        /* "netCDF4.pyx":3824
- *                 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
+        /* "netCDF4/_netCDF4.pyx":4565
+ *                 days = tsecs // 86400.
+ *                 msecsd = tsecs*1.e6 - days*86400.*1.e6
+ *                 secs = msecsd // 1.e6             # <<<<<<<<<<<<<<
+ *                 msecs = numpy.round(msecsd - secs*1.e6)
+ *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)
  */
-        __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3824; __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 = 3824; __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 = 3824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_15);
+        __pyx_t_3 = PyNumber_FloorDivide(__pyx_v_msecsd, __pyx_float_1_e6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_3);
+        __Pyx_XDECREF_SET(__pyx_v_secs, __pyx_t_3);
+        __pyx_t_3 = 0;
+
+        /* "netCDF4/_netCDF4.pyx":4566
+ *                 msecsd = tsecs*1.e6 - days*86400.*1.e6
+ *                 secs = msecsd // 1.e6
+ *                 msecs = numpy.round(msecsd - secs*1.e6)             # <<<<<<<<<<<<<<
+ *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)
+ *                 # add time delta to base date.
+ */
+        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_round); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4566; __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_Multiply(__pyx_v_secs, __pyx_float_1_e6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_1);
+        __pyx_t_14 = PyNumber_Subtract(__pyx_v_msecsd, __pyx_t_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_14);
+        __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_10))) {
-          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
+        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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_10);
+            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
             __Pyx_INCREF(__pyx_t_1);
             __Pyx_INCREF(function);
-            __Pyx_DECREF_SET(__pyx_t_10, function);
-            __pyx_t_2 = 1;
+            __Pyx_DECREF_SET(__pyx_t_4, function);
           }
         }
-        __pyx_t_4 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3824; __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;
+        if (!__pyx_t_1) {
+          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_14); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+          __Pyx_GOTREF(__pyx_t_3);
+        } else {
+          __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_15);
+          PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
+          PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_14);
+          __Pyx_GIVEREF(__pyx_t_14);
+          __pyx_t_14 = 0;
+          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_3);
+          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
         }
-        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 = 3824; __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 = 3824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_XDECREF_SET(__pyx_v_dataarr, ((PyArrayObject *)__pyx_t_6));
-        __pyx_t_6 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_msecs, __pyx_t_3);
+        __pyx_t_3 = 0;
 
-        /* "netCDF4.pyx":3825
- *                     arrlen  = vldata[i].len
- *                     dataarr = numpy.empty(arrlen, self.dtype)
- *                     dataarr.data = <char *>vldata[i].p             # <<<<<<<<<<<<<<
- *                     data[i] = dataarr
- *                 # reshape the output array
+        /* "netCDF4/_netCDF4.pyx":4567
+ *                 secs = msecsd // 1.e6
+ *                 msecs = numpy.round(msecsd - secs*1.e6)
+ *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)             # <<<<<<<<<<<<<<
+ *                 # add time delta to base date.
+ *                 date = basedate + td
  */
-        __pyx_v_dataarr->data = ((char *)(__pyx_v_vldata[__pyx_v_i]).p);
+        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4567; __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 = 4567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_4);
+        if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_days, __pyx_v_days) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_seconds, __pyx_v_secs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_microseconds, __pyx_v_msecs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_15);
+        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_15);
+        __pyx_t_15 = 0;
 
-        /* "netCDF4.pyx":3826
- *                     dataarr = numpy.empty(arrlen, self.dtype)
- *                     dataarr.data = <char *>vldata[i].p
- *                     data[i] = dataarr             # <<<<<<<<<<<<<<
- *                 # reshape the output array
- *                 data = numpy.reshape(data, shapeout)
+        /* "netCDF4/_netCDF4.pyx":4569
+ *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)
+ *                 # add time delta to base date.
+ *                 date = basedate + td             # <<<<<<<<<<<<<<
+ *                 dates.append(date)
+ *         if isscalar:
+ */
+        __pyx_t_15 = PyNumber_Add(__pyx_v_basedate, __pyx_v_td); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_15);
+        __Pyx_XDECREF_SET(__pyx_v_date, __pyx_t_15);
+        __pyx_t_15 = 0;
+
+        /* "netCDF4/_netCDF4.pyx":4570
+ *                 # add time delta to base date.
+ *                 date = basedate + td
+ *                 dates.append(date)             # <<<<<<<<<<<<<<
+ *         if isscalar:
+ *             return dates[0]
  */
-        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 = 3826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dates, __pyx_v_date); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
+      __pyx_L24:;
 
-      /* "netCDF4.pyx":3828
- *                     data[i] = dataarr
- *                 # reshape the output array
- *                 data = numpy.reshape(data, shapeout)             # <<<<<<<<<<<<<<
- *                 # free the pointer array.
- *                 free(vldata)
+      /* "netCDF4/_netCDF4.pyx":4543
+ *             ismasked = True
+ *         dates = []
+ *         for time in times.flat:             # <<<<<<<<<<<<<<
+ *             if ismasked and not time:
+ *                 dates.append(None)
  */
-      __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3828; __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 = 3828; __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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":4571
+ *                 date = basedate + td
+ *                 dates.append(date)
+ *         if isscalar:             # <<<<<<<<<<<<<<
+ *             return dates[0]
+ *         else:
+ */
+    __pyx_t_7 = (__pyx_v_isscalar != 0);
+    if (__pyx_t_7) {
+
+      /* "netCDF4/_netCDF4.pyx":4572
+ *                 dates.append(date)
+ *         if isscalar:
+ *             return dates[0]             # <<<<<<<<<<<<<<
+ *         else:
+ *             return numpy.reshape(numpy.array(dates), shape)
+ */
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_dates, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4572; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_r = __pyx_t_2;
       __pyx_t_2 = 0;
+      goto __pyx_L0;
+    }
+    /*else*/ {
+
+      /* "netCDF4/_netCDF4.pyx":4574
+ *             return dates[0]
+ *         else:
+ *             return numpy.reshape(numpy.array(dates), shape)             # <<<<<<<<<<<<<<
+ *     else: # use netcdftime for other calendars
+ *         cdftime = netcdftime.utime(units,calendar=calendar)
+ */
+      __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 = 4574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_15);
+      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_14);
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __pyx_t_3 = NULL;
+      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_14))) {
+        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_14);
+        if (likely(__pyx_t_3)) {
+          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
+          __Pyx_INCREF(__pyx_t_3);
+          __Pyx_INCREF(function);
+          __Pyx_DECREF_SET(__pyx_t_14, function);
+        }
+      }
+      if (!__pyx_t_3) {
+        __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_dates); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_15);
+      } else {
+        __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4574; __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 = NULL;
+        __Pyx_INCREF(__pyx_v_dates);
+        PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_dates);
+        __Pyx_GIVEREF(__pyx_v_dates);
+        __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_15);
+        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      }
+      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+      if (unlikely(!__pyx_v_shape)) { __Pyx_RaiseUnboundLocalError("shape"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4574; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+      __pyx_t_14 = NULL;
+      __pyx_t_11 = 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)) {
+        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4);
+        if (likely(__pyx_t_14)) {
           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-          __Pyx_INCREF(__pyx_t_10);
+          __Pyx_INCREF(__pyx_t_14);
           __Pyx_INCREF(function);
           __Pyx_DECREF_SET(__pyx_t_4, function);
-          __pyx_t_2 = 1;
+          __pyx_t_11 = 1;
         }
       }
-      __pyx_t_15 = PyTuple_New(2+__pyx_t_2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3828; __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_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      if (__pyx_t_14) {
+        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 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 = 3828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
-      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+      PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_11, __pyx_t_15);
+      __Pyx_GIVEREF(__pyx_t_15);
+      __Pyx_INCREF(__pyx_v_shape);
+      PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_11, __pyx_v_shape);
+      __Pyx_GIVEREF(__pyx_v_shape);
+      __pyx_t_15 = 0;
+      __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 = 4574; __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_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 = 3828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_6));
-      __pyx_t_6 = 0;
-
-      /* "netCDF4.pyx":3830
- *                 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_r = __pyx_t_2;
+      __pyx_t_2 = 0;
+      goto __pyx_L0;
     }
-    __pyx_L22:;
-    goto __pyx_L9;
   }
-  __pyx_L9:;
-
-  /* "netCDF4.pyx":3831
- *                 # 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) {
+  /*else*/ {
 
-    /* "netCDF4.pyx":3833
- *         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
+    /* "netCDF4/_netCDF4.pyx":4576
+ *             return numpy.reshape(numpy.array(dates), shape)
+ *     else: # use netcdftime for other calendars
+ *         cdftime = netcdftime.utime(units,calendar=calendar)             # <<<<<<<<<<<<<<
+ *         return cdftime.num2date(times)
+ * 
  */
-    if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3833; __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 = 3833; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_utime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4576; __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 = 3833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 4576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __Pyx_INCREF(__pyx_v_units);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_units);
+    __Pyx_GIVEREF(__pyx_v_units);
+    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_calendar, __pyx_v_calendar) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4576; __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 = 3833; __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 = 3833; __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 = 3833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_XDECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_6));
-    __pyx_t_6 = 0;
-    goto __pyx_L41;
-  }
-  __pyx_L41:;
-
-  /* "netCDF4.pyx":3834
- *             # 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 = 3834; __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 = 3834; __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":3835
- *             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 = 3835; __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 = 3835; __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":3836
- *         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) {
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_v_cdftime = __pyx_t_15;
+    __pyx_t_15 = 0;
 
-    /* "netCDF4.pyx":3837
- *             return data[0] # a scalar
- *         elif squeeze_out:
- *             return numpy.squeeze(data)             # <<<<<<<<<<<<<<
- *         else:
- *             return data
+    /* "netCDF4/_netCDF4.pyx":4577
+ *     else: # use netcdftime for 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_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3837; __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 = 3837; __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 = 3837; __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_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_num2date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4577; __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_4, function);
+        __Pyx_DECREF_SET(__pyx_t_1, 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 = 3837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
+    if (!__pyx_t_2) {
+      __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_times); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_15);
     } else {
-      __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3837; __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 = 3837; __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":3839
- *             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 = 3839; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-    __Pyx_INCREF(((PyObject *)__pyx_v_data));
-    __pyx_r = ((PyObject *)__pyx_v_data);
-    goto __pyx_L0;
-  }
-
-  /* "netCDF4.pyx":3717
- *                 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":2453
- * 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 = 2453; __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 = 2453; __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;
-}
+      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4577; __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_times);
+      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_times);
+      __Pyx_GIVEREF(__pyx_v_times);
+      __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_15);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_r = __pyx_t_15;
+    __pyx_t_15 = 0;
+    goto __pyx_L0;
+  }
 
-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 = 2453; __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/_netCDF4.pyx":4484
+ *         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_AddTraceback("netCDF4.Variable._grpid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_14);
+  __Pyx_XDECREF(__pyx_t_15);
+  __Pyx_AddTraceback("netCDF4._netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_basedate);
+  __Pyx_XDECREF(__pyx_v_unit);
+  __Pyx_XDECREF(__pyx_v_shape);
+  __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_XDECREF(__pyx_v_calendar);
   __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;
-}
+/* "netCDF4/_netCDF4.pyx":4579
+ *         return cdftime.num2date(times)
+ * 
+ * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
+ *     """
+ * date2index(dates, nctime, calendar=None, select='exact')
+ */
 
-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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_19date2index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_18date2index[] = "\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 cal [...]
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_19date2index = {"date2index", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_19date2index, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_18date2index};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_19date2index(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;
-  __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 = 2453; __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));
+  __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[0]; __pyx_lineno = 4579; __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[0]; __pyx_lineno = 4579; __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[0]; __pyx_lineno = 4579; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.date2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_18date2index(__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_8Variable_10_nunlimdim___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_18date2index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_nctime, PyObject *__pyx_v_calendar, PyObject *__pyx_v_select) {
+  PyObject *__pyx_v_basedate = NULL;
+  PyObject *__pyx_v_times = 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;
+  PyObject *__pyx_t_5 = NULL;
+  PyObject *__pyx_t_6 = NULL;
+  int __pyx_t_7;
+  int __pyx_t_8;
+  Py_ssize_t __pyx_t_9;
   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 = 2453; __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;
-}
+  __Pyx_RefNannySetupContext("date2index", 0);
+  __Pyx_INCREF(__pyx_v_calendar);
 
-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 = 2453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_nunlimdim = __pyx_t_1;
+  /* "netCDF4/_netCDF4.pyx":4608
+ * to the given datetime object(s).
+ *     """
+ *     if calendar == None:             # <<<<<<<<<<<<<<
+ *         calendar = getattr(nctime, 'calendar', 'standard')
+ *     calendar = calendar.lower()
+ */
+  __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[0]; __pyx_lineno = 4608; __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 = 4608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_2) {
 
-  /* 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/_netCDF4.pyx":4609
+ *     """
+ *     if calendar == None:
+ *         calendar = getattr(nctime, 'calendar', 'standard')             # <<<<<<<<<<<<<<
+ *     calendar = calendar.lower()
+ *     basedate = _dateparse(nctime.units)
+ */
+    __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[0]; __pyx_lineno = 4609; __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:;
 
-/* "netCDF4.pyx":2454
- * 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
+  /* "netCDF4/_netCDF4.pyx":4610
+ *     if calendar == None:
+ *         calendar = getattr(nctime, 'calendar', 'standard')
+ *     calendar = calendar.lower()             # <<<<<<<<<<<<<<
+ *     basedate = _dateparse(nctime.units)
  * 
  */
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_calendar, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4610; __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 = 4610; __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 = 4610; __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_calendar, __pyx_t_1);
+  __pyx_t_1 = 0;
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":4611
+ *         calendar = getattr(nctime, 'calendar', 'standard')
+ *     calendar = calendar.lower()
+ *     basedate = _dateparse(nctime.units)             # <<<<<<<<<<<<<<
+ * 
+ *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
+ */
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_4);
+  __pyx_t_5 = NULL;
+  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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 = 4611; __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 = 4611; __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 = 4611; __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_v_basedate = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4613
+ *     basedate = _dateparse(nctime.units)
+ * 
+ *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \             # <<<<<<<<<<<<<<
+ *        (calendar in ['gregorian','standard'] and basedate > gregorian):
+ *         # use python datetime
+ */
+  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_7) {
+    goto __pyx_L6_next_or;
+  } else {
+  }
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_year); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  if (!__pyx_t_7) {
+  } else {
+    __pyx_t_2 = __pyx_t_7;
+    goto __pyx_L5_bool_binop_done;
+  }
+  __pyx_L6_next_or:;
 
-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;
+  /* "netCDF4/_netCDF4.pyx":4614
+ * 
+ *     if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
+ *        (calendar in ['gregorian','standard'] and basedate > gregorian):             # <<<<<<<<<<<<<<
+ *         # use python datetime
+ *         times = date2num(dates,nctime.units,calendar=calendar)
+ */
+  __Pyx_INCREF(__pyx_v_calendar);
+  __pyx_t_6 = __pyx_v_calendar;
+  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!__pyx_t_8) {
+  } else {
+    __pyx_t_7 = __pyx_t_8;
+    goto __pyx_L9_bool_binop_done;
+  }
+  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __pyx_t_8;
+  __pyx_L9_bool_binop_done:;
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_8 = (__pyx_t_7 != 0);
+  if (__pyx_t_8) {
+  } else {
+    __pyx_t_2 = __pyx_t_8;
+    goto __pyx_L5_bool_binop_done;
+  }
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_3 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_t_2 = __pyx_t_8;
+  __pyx_L5_bool_binop_done:;
+  if (__pyx_t_2) {
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4616
+ *        (calendar in ['gregorian','standard'] and basedate > gregorian):
+ *         # use python datetime
+ *         times = date2num(dates,nctime.units,calendar=calendar)             # <<<<<<<<<<<<<<
+ *         return netcdftime.time2index(times, nctime, calendar, select)
+ *     else: # use netcdftime module for other cases
+ */
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4616; __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_6);
+    __Pyx_GIVEREF(__pyx_t_6);
+    __pyx_t_6 = 0;
+    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_calendar, __pyx_v_calendar) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4616; __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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_v_times = __pyx_t_4;
+    __pyx_t_4 = 0;
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":4617
+ *         # use python datetime
+ *         times = date2num(dates,nctime.units,calendar=calendar)
+ *         return netcdftime.time2index(times, nctime, calendar, select)             # <<<<<<<<<<<<<<
+ *     else: # use netcdftime module for other cases
+ *         return netcdftime.date2index(dates, nctime, calendar, select)
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_time2index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4617; __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;
+    __pyx_t_9 = 0;
+    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);
+        __pyx_t_9 = 1;
+      }
+    }
+    __pyx_t_3 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    if (__pyx_t_6) {
+      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
+    }
+    __Pyx_INCREF(__pyx_v_times);
+    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_9, __pyx_v_times);
+    __Pyx_GIVEREF(__pyx_v_times);
+    __Pyx_INCREF(__pyx_v_nctime);
+    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_9, __pyx_v_nctime);
+    __Pyx_GIVEREF(__pyx_v_nctime);
+    __Pyx_INCREF(__pyx_v_calendar);
+    PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_9, __pyx_v_calendar);
+    __Pyx_GIVEREF(__pyx_v_calendar);
+    __Pyx_INCREF(__pyx_v_select);
+    PyTuple_SET_ITEM(__pyx_t_3, 3+__pyx_t_9, __pyx_v_select);
+    __Pyx_GIVEREF(__pyx_v_select);
+    __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 = 4617; __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_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
+  /*else*/ {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4619
+ *         return netcdftime.time2index(times, nctime, calendar, select)
+ *     else: # use netcdftime module for other cases
+ *         return netcdftime.date2index(dates, nctime, calendar, select)             # <<<<<<<<<<<<<<
+ * 
+ * class MFDataset(Dataset):
+ */
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_date2index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4619; __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;
+    __pyx_t_9 = 0;
+    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(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);
+        __pyx_t_9 = 1;
+      }
+    }
+    __pyx_t_6 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4619; __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_dates);
+    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_v_dates);
+    __Pyx_GIVEREF(__pyx_v_dates);
+    __Pyx_INCREF(__pyx_v_nctime);
+    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_v_nctime);
+    __Pyx_GIVEREF(__pyx_v_nctime);
+    __Pyx_INCREF(__pyx_v_calendar);
+    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_9, __pyx_v_calendar);
+    __Pyx_GIVEREF(__pyx_v_calendar);
+    __Pyx_INCREF(__pyx_v_select);
+    PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_9, __pyx_v_select);
+    __Pyx_GIVEREF(__pyx_v_select);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4619; __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_r = __pyx_t_4;
+    __pyx_t_4 = 0;
+    goto __pyx_L0;
+  }
 
-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;
+  /* "netCDF4/_netCDF4.pyx":4579
+ *         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_3);
+  __Pyx_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_XDECREF(__pyx_t_6);
+  __Pyx_AddTraceback("netCDF4._netCDF4.date2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_basedate);
+  __Pyx_XDECREF(__pyx_v_times);
+  __Pyx_XDECREF(__pyx_v_calendar);
   __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;
-}
+/* "netCDF4/_netCDF4.pyx":4653
+ *     """
+ * 
+ *     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_8Variable_5dtype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__get__", 0);
+  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_INCREF(__pyx_v_self->dtype);
-  __pyx_r = __pyx_v_self->dtype;
+  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4653; __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[0]; __pyx_lineno = 4653; __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._netCDF4.MFDataset.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
@@ -53527,792 +51262,2601 @@ static PyObject *__pyx_pf_7netCDF4_8Variable_5dtype___get__(struct __pyx_obj_7ne
 }
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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.sourc [...]
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_9MFDataset___init__};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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("__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_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[0]; __pyx_lineno = 4653; __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[0]; __pyx_lineno = 4653; __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[0]; __pyx_lineno = 4653; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __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;
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset___init__(__pyx_self, __pyx_v_self, __pyx_v_files, __pyx_v_check, __pyx_v_aggdim, __pyx_v_exclude);
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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_8_netCDF4_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_8_netCDF4_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
-  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_8Variable_5dtype_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));
+  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);
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4690
+ *         # 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) {
 
-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;
+    /* "netCDF4/_netCDF4.pyx":4691
+ *         # 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[0]; __pyx_lineno = 4691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_3);
+    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4691; __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[0]; __pyx_lineno = 4691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_2) {
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":4692
+ *         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;
 
-/* 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));
+      /* "netCDF4/_netCDF4.pyx":4693
+ *             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[0]; __pyx_lineno = 4693; __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[0]; __pyx_lineno = 4693; __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 = 4693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    /*else*/ {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":4695
+ *                 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[0]; __pyx_lineno = 4695; __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[0]; __pyx_lineno = 4695; __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 = 4695; __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[0]; __pyx_lineno = 4695; __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[0]; __pyx_lineno = 4695; __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[0]; __pyx_lineno = 4695; __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:;
 
-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;
+  /* "netCDF4/_netCDF4.pyx":4697
+ *                 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[0]; __pyx_lineno = 4697; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __Pyx_GOTREF(__pyx_t_3);
+  __pyx_v_master = __pyx_t_3;
+  __pyx_t_3 = 0;
 
-  /* function exit code */
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4701
+ *         # 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[0]; __pyx_lineno = 4701; __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_8_netCDF4_Dataset)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4701; __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_8_netCDF4_Dataset *)__pyx_t_5);
+  __pyx_t_5 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4703
+ *         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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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[0]; __pyx_lineno = 4703; __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;
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":4704
+ *         # 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[0]; __pyx_lineno = 4704; __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[0]; __pyx_lineno = 4704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4703
+ *         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;
 
-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;
+  /* "netCDF4/_netCDF4.pyx":4708
+ *         # 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;
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4709
+ *         # 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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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[0]; __pyx_lineno = 4709; __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;
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":4710
+ *         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) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":4711
+ *         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[0]; __pyx_lineno = 4711; __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[0]; __pyx_lineno = 4711; __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[0]; __pyx_lineno = 4711; __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[0]; __pyx_lineno = 4711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_1) {
 
-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;
+        /* "netCDF4/_netCDF4.pyx":4712
+ *             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);
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":4713
+ *                 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*/ {
 
-/* 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));
+      /* "netCDF4/_netCDF4.pyx":4715
+ *                     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[0]; __pyx_lineno = 4715; __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[0]; __pyx_lineno = 4715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      if (__pyx_t_1) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":4716
+ *             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);
 
-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;
+        /* "netCDF4/_netCDF4.pyx":4717
+ *                 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:;
 
-  /* function exit code */
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4709
+ *         # 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;
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":4718
+ *                     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) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4719
+ *                     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[0]; __pyx_lineno = 4719; __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 = 4719; __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[0]; __pyx_lineno = 4719; __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 = 4719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-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;
+  /* "netCDF4/_netCDF4.pyx":4723
+ *         # 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[0]; __pyx_lineno = 4723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_v_masterRecVar = ((PyObject*)__pyx_t_5);
+  __pyx_t_5 = 0;
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4724
+ *         # 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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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[0]; __pyx_lineno = 4724; __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;
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":4726
+ *         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[0]; __pyx_lineno = 4726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = (__pyx_t_2 != 0);
+    if (__pyx_t_1) {
+      goto __pyx_L17_continue;
+    }
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4727
+ *             # 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[0]; __pyx_lineno = 4727; __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;
 
-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;
+    /* "netCDF4/_netCDF4.pyx":4728
+ *             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[0]; __pyx_lineno = 4728; __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;
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4729
+ *             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[0]; __pyx_lineno = 4729; __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;
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":4732
+ *             # 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[0]; __pyx_lineno = 4732; __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[0]; __pyx_lineno = 4732; __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[0]; __pyx_lineno = 4732; __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[0]; __pyx_lineno = 4732; __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[0]; __pyx_lineno = 4732; __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) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":4733
+ *             # 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[0]; __pyx_lineno = 4733; __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[0]; __pyx_lineno = 4733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      goto __pyx_L22;
+    }
+    __pyx_L22:;
 
-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;
+    /* "netCDF4/_netCDF4.pyx":4724
+ *         # 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;
 
-  /* function exit code */
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4734
+ *             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[0]; __pyx_lineno = 4734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = ((__pyx_t_9 == 0) != 0);
+  if (__pyx_t_1) {
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":4735
+ *                 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[0]; __pyx_lineno = 4735; __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[0]; __pyx_lineno = 4735; __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[0]; __pyx_lineno = 4735; __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[0]; __pyx_lineno = 4735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4743
+ *         #             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[0]; __pyx_lineno = 4743; __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;
 
-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;
+  /* "netCDF4/_netCDF4.pyx":4744
+ *         #             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[0]; __pyx_lineno = 4744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4745
+ *         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[0]; __pyx_lineno = 4745; __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[0]; __pyx_lineno = 4745; __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[0]; __pyx_lineno = 4745; __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;
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":4746
+ *         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[0]; __pyx_lineno = 4746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_v_cdfRecVar = ((PyObject*)__pyx_t_7);
+  __pyx_t_7 = 0;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4747
+ *         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[0]; __pyx_lineno = 4747; __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[0]; __pyx_lineno = 4747; __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[0]; __pyx_lineno = 4747; __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[0]; __pyx_lineno = 4747; __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[0]; __pyx_lineno = 4747; __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[0]; __pyx_lineno = 4747; __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[0]; __pyx_lineno = 4747; __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[0]; __pyx_lineno = 4747; __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;
 
-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;
+    /* "netCDF4/_netCDF4.pyx":4748
+ *         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[0]; __pyx_lineno = 4748; __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[0]; __pyx_lineno = 4748; __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[0]; __pyx_lineno = 4748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4747
+ *         cdfVLen = [len(aggDimId)]
+ *         cdfRecVar = {}
+ *         for v in masterRecVar.keys():             # <<<<<<<<<<<<<<
+ *             cdfRecVar[v] = [cdfm.variables[v]]
+ * 
+ */
+  }
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":4753
+ *         # 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__104, 1, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4753; __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[0]; __pyx_lineno = 4753; __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[0]; __pyx_lineno = 4753; __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[0]; __pyx_lineno = 4753; __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[0]; __pyx_lineno = 4753; __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[0]; __pyx_lineno = 4753; __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[0]; __pyx_lineno = 4753; __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[0]; __pyx_lineno = 4753; __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;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4754
+ *         # 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[0]; __pyx_lineno = 4754; __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_8_netCDF4_Dataset)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4754; __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_8_netCDF4_Dataset *)__pyx_t_7));
+    __pyx_t_7 = 0;
 
-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;
+    /* "netCDF4/_netCDF4.pyx":4755
+ *         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;
 
-  /* function exit code */
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4756
+ *             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[0]; __pyx_lineno = 4756; __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[0]; __pyx_lineno = 4756; __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[0]; __pyx_lineno = 4756; __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[0]; __pyx_lineno = 4756; __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[0]; __pyx_lineno = 4756; __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[0]; __pyx_lineno = 4756; __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[0]; __pyx_lineno = 4756; __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[0]; __pyx_lineno = 4756; __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;
 
-/* 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));
+      /* "netCDF4/_netCDF4.pyx":4757
+ *             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[0]; __pyx_lineno = 4757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__pyx_t_1) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":4759
+ *                 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[0]; __pyx_lineno = 4759; __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[0]; __pyx_lineno = 4759; __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[0]; __pyx_lineno = 4759; __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[0]; __pyx_lineno = 4759; __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) {
 
-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;
+          /* "netCDF4/_netCDF4.pyx":4760
+ *                     # 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[0]; __pyx_lineno = 4760; __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[0]; __pyx_lineno = 4760; __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[0]; __pyx_lineno = 4760; __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[0]; __pyx_lineno = 4760; __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[0]; __pyx_lineno = 4760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":4764
+ *                     #if not vInst.dimensions[0] != aggDimName:
+ * 
+ *                     masterDims, masterShape, masterType = masterRecVar[v][:3]             # <<<<<<<<<<<<<<
+ *                     extDims = varInfo[v].dimensions
+ *                     extShape = varInfo[v].shape
+ */
+        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_masterRecVar, __pyx_v_v); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4764; __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__105, 0, 1, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4764; __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[0]; __pyx_lineno = 4764; __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[0]; __pyx_lineno = 4764; __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 = 4764; __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[0]; __pyx_lineno = 4764; __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[0]; __pyx_lineno = 4764; __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[0]; __pyx_lineno = 4764; __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[0]; __pyx_lineno = 4764; __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;
+
+        /* "netCDF4/_netCDF4.pyx":4765
+ * 
+ *                     masterDims, masterShape, masterType = masterRecVar[v][:3]
+ *                     extDims = varInfo[v].dimensions             # <<<<<<<<<<<<<<
+ *                     extShape = varInfo[v].shape
+ *                     extType = varInfo[v].dtype
+ */
+        __pyx_t_7 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4765; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_14);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_extDims, __pyx_t_14);
+        __pyx_t_14 = 0;
 
-/* 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));
+        /* "netCDF4/_netCDF4.pyx":4766
+ *                     masterDims, masterShape, masterType = masterRecVar[v][:3]
+ *                     extDims = varInfo[v].dimensions
+ *                     extShape = varInfo[v].shape             # <<<<<<<<<<<<<<
+ *                     extType = varInfo[v].dtype
+ *                     # Check that dimension names are identical.
+ */
+        __pyx_t_14 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4766; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_14);
+        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_extShape, __pyx_t_7);
+        __pyx_t_7 = 0;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":4767
+ *                     extDims = varInfo[v].dimensions
+ *                     extShape = varInfo[v].shape
+ *                     extType = varInfo[v].dtype             # <<<<<<<<<<<<<<
+ *                     # Check that dimension names are identical.
+ *                     if masterDims != extDims:
+ */
+        __pyx_t_7 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4767; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dtype); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_14);
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        __Pyx_XDECREF_SET(__pyx_v_extType, __pyx_t_14);
+        __pyx_t_14 = 0;
 
-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;
+        /* "netCDF4/_netCDF4.pyx":4769
+ *                     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_14 = PyObject_RichCompare(__pyx_v_masterDims, __pyx_v_extDims, Py_NE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+        if (__pyx_t_2) {
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+          /* "netCDF4/_netCDF4.pyx":4772
+ *                         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_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4772; __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_masterDims);
+          PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_v_masterDims);
+          __Pyx_GIVEREF(__pyx_v_masterDims);
+          __Pyx_INCREF(__pyx_v_f);
+          PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_v_f);
+          __Pyx_GIVEREF(__pyx_v_f);
+          __Pyx_INCREF(__pyx_v_extDims);
+          PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_v_extDims);
+          __Pyx_GIVEREF(__pyx_v_extDims);
 
-/* "netCDF4.pyx":2455
- *     cdef public int _varid, _grpid, _nunlimdim
- *     cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\
- *     _isvlen, _grp,_cmptype,_vltype             # <<<<<<<<<<<<<<
+          /* "netCDF4/_netCDF4.pyx":4771
+ *                     if masterDims != extDims:
+ *                         raise IOError("variable %s : dimensions mismatch between "
+ *                                        "master %s (%s) and extension %s (%s)" %             # <<<<<<<<<<<<<<
+ *                                        (v, master, masterDims, f, extDims))
  * 
- *     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,
  */
+          __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_dimensions_mismatch_b, __pyx_t_14); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
 
-/* 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));
+          /* "netCDF4/_netCDF4.pyx":4770
+ *                     # 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_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_7);
+          __Pyx_GIVEREF(__pyx_t_7);
+          __pyx_t_7 = 0;
+          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 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 = 4770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":4777
+ *                     # 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[0]; __pyx_lineno = 4777; __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[0]; __pyx_lineno = 4777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = ((__pyx_t_16 != __pyx_t_17) != 0);
+        if (__pyx_t_2) {
 
-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;
+          /* "netCDF4/_netCDF4.pyx":4780
+ *                         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[0]; __pyx_lineno = 4780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __pyx_t_17 = PyObject_Length(__pyx_v_extShape); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4780; __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[0]; __pyx_lineno = 4780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4780; __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_7);
+          __Pyx_GIVEREF(__pyx_t_7);
+          __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_14);
+          __Pyx_GIVEREF(__pyx_t_14);
+          __pyx_t_7 = 0;
+          __pyx_t_14 = 0;
 
-  /* function exit code */
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+          /* "netCDF4/_netCDF4.pyx":4779
+ *                     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_14 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_rank_mismatch_between, __pyx_t_6); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_14);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-/* 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));
+          /* "netCDF4/_netCDF4.pyx":4778
+ *                     # 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[0]; __pyx_lineno = 4778; __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[0]; __pyx_lineno = 4778; __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[0]; __pyx_lineno = 4778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":4781
+ *                                        "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_14 = __Pyx_PyObject_GetSlice(__pyx_v_masterShape, 1, 0, NULL, NULL, &__pyx_slice__106, 1, 0, 1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_14);
+        __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_extShape, 1, 0, NULL, NULL, &__pyx_slice__107, 1, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_GOTREF(__pyx_t_6);
+        __pyx_t_7 = PyObject_RichCompare(__pyx_t_14, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        if (__pyx_t_2) {
 
-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;
+          /* "netCDF4/_netCDF4.pyx":4784
+ *                         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_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4784; __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_master);
+          PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_master);
+          __Pyx_GIVEREF(__pyx_v_master);
+          __Pyx_INCREF(__pyx_v_masterShape);
+          PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_masterShape);
+          __Pyx_GIVEREF(__pyx_v_masterShape);
+          __Pyx_INCREF(__pyx_v_f);
+          PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_f);
+          __Pyx_GIVEREF(__pyx_v_f);
+          __Pyx_INCREF(__pyx_v_extShape);
+          PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_v_extShape);
+          __Pyx_GIVEREF(__pyx_v_extShape);
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+          /* "netCDF4/_netCDF4.pyx":4783
+ *                     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_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-/* 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));
+          /* "netCDF4/_netCDF4.pyx":4782
+ *                                        (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_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4782; __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 = 0;
+          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_6);
+          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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 = 4782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":4787
+ * 
+ *                     # 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[0]; __pyx_lineno = 4787; __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[0]; __pyx_lineno = 4787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        if (__pyx_t_2) {
 
-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;
+          /* "netCDF4/_netCDF4.pyx":4790
+ *                         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[0]; __pyx_lineno = 4790; __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);
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+          /* "netCDF4/_netCDF4.pyx":4789
+ *                     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_7 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_data_type_mismatch_be, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(__pyx_t_7);
+          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-/* 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));
+          /* "netCDF4/_netCDF4.pyx":4788
+ *                     # 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[0]; __pyx_lineno = 4788; __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 = 0;
+          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4788; __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 = 4788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":4793
+ * 
+ *                     # Everythig ok.
+ *                     vInst = part.variables[v]             # <<<<<<<<<<<<<<
+ *                     cdfRecVar[v].append(vInst)
+ *                 else:
+ */
+        __pyx_t_7 = PyObject_GetItem(__pyx_v_part->variables, __pyx_v_v); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4793; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_XDECREF_SET(__pyx_v_vInst, __pyx_t_7);
+        __pyx_t_7 = 0;
 
-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;
+        /* "netCDF4/_netCDF4.pyx":4794
+ *                     # Everythig ok.
+ *                     vInst = part.variables[v]
+ *                     cdfRecVar[v].append(vInst)             # <<<<<<<<<<<<<<
+ *                 else:
+ *                     # No making sure of anything -- assume this is ok..
+ */
+        __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_cdfRecVar, __pyx_v_v); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4794; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_vInst); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+        goto __pyx_L32;
+      }
+      /*else*/ {
 
-  /* function exit code */
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+        /* "netCDF4/_netCDF4.pyx":4797
+ *                 else:
+ *                     # No making sure of anything -- assume this is ok..
+ *                     vInst = part.variables[v]             # <<<<<<<<<<<<<<
+ *                     cdfRecVar[v].append(vInst)
+ * 
+ */
+        __pyx_t_7 = PyObject_GetItem(__pyx_v_part->variables, __pyx_v_v); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4797; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_7);
+        __Pyx_XDECREF_SET(__pyx_v_vInst, __pyx_t_7);
+        __pyx_t_7 = 0;
 
-/* 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));
+        /* "netCDF4/_netCDF4.pyx":4798
+ *                     # No making sure of anything -- assume this is ok..
+ *                     vInst = part.variables[v]
+ *                     cdfRecVar[v].append(vInst)             # <<<<<<<<<<<<<<
+ * 
+ *             cdf.append(part)
+ */
+        __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_cdfRecVar, __pyx_v_v); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4798; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+        __Pyx_GOTREF(__pyx_t_7);
+        __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_vInst); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      }
+      __pyx_L32:;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":4756
+ *             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;
 
-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;
+    /* "netCDF4/_netCDF4.pyx":4800
+ *                     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[0]; __pyx_lineno = 4800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4801
+ * 
+ *             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[0]; __pyx_lineno = 4801; __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[0]; __pyx_lineno = 4801; __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[0]; __pyx_lineno = 4801; __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[0]; __pyx_lineno = 4801; __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[0]; __pyx_lineno = 4801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":4753
+ *         # 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;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4805
+ *         # 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[0]; __pyx_lineno = 4805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-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;
+  /* "netCDF4/_netCDF4.pyx":4806
+ *         # 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[0]; __pyx_lineno = 4806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4807
+ *         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[0]; __pyx_lineno = 4807; __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[0]; __pyx_lineno = 4807; __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[0]; __pyx_lineno = 4807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":4808
+ *         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[0]; __pyx_lineno = 4808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4810
+ *         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[0]; __pyx_lineno = 4810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-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;
+  /* "netCDF4/_netCDF4.pyx":4811
+ *                                              # 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[0]; __pyx_lineno = 4811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4812
+ *         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[0]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_items); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __Pyx_DECREF(__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_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4812; __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_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __Pyx_GOTREF(__pyx_t_4);
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
+    __pyx_t_7 = __pyx_t_4; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4812; __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_7))) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_4 = __pyx_t_10(__pyx_t_7);
+      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 = 4812; __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[0]; __pyx_lineno = 4812; __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 = 4812; __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 = 4812; __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_14 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_14);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __pyx_t_11 = Py_TYPE(__pyx_t_14)->tp_iternext;
+      index = 0; __pyx_t_5 = __pyx_t_11(__pyx_t_14); if (unlikely(!__pyx_t_5)) goto __pyx_L42_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_5);
+      index = 1; __pyx_t_6 = __pyx_t_11(__pyx_t_14); if (unlikely(!__pyx_t_6)) goto __pyx_L42_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_6);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_14), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = NULL;
+      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+      goto __pyx_L43_unpacking_done;
+      __pyx_L42_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+      __pyx_t_11 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L43_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;
 
-  /* function exit code */
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4813
+ *         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[0]; __pyx_lineno = 4813; __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[0]; __pyx_lineno = 4813; __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[0]; __pyx_lineno = 4813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_2) {
 
-/* 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));
+      /* "netCDF4/_netCDF4.pyx":4814
+ *         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[0]; __pyx_lineno = 4814; __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[0]; __pyx_lineno = 4814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_5);
+      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfTLen); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_14);
+      __pyx_t_3 = NULL;
+      __pyx_t_12 = 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_12 = 1;
+        }
+      }
+      __pyx_t_15 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_15);
+      if (__pyx_t_3) {
+        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 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_14);
+      __Pyx_GIVEREF(__pyx_t_14);
+      __pyx_t_5 = 0;
+      __pyx_t_14 = 0;
+      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4814; __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[0]; __pyx_lineno = 4814; __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[0]; __pyx_lineno = 4814; __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_L44;
+    }
+    __pyx_L44:;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4812
+ *         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_7); __pyx_t_7 = 0;
 
-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;
+  /* "netCDF4/_netCDF4.pyx":4815
+ *             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_7 = __pyx_v_cdfm->variables;
+  __Pyx_INCREF(__pyx_t_7);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_vars, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4816
+ *                 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[0]; __pyx_lineno = 4816; __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[0]; __pyx_lineno = 4816; __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_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4816; __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 = 4816; __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_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 = 4816; __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 = 4816; __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 = 4816; __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 = 4816; __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 = 4816; __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 = 4816; __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 = 4816; __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 != 2)) {
+        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4816; __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[0]; __pyx_lineno = 4816; __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[0]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_15);
+      #endif
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    } else {
+      Py_ssize_t index = -1;
+      __pyx_t_14 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_14);
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      __pyx_t_11 = Py_TYPE(__pyx_t_14)->tp_iternext;
+      index = 0; __pyx_t_4 = __pyx_t_11(__pyx_t_14); if (unlikely(!__pyx_t_4)) goto __pyx_L47_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_4);
+      index = 1; __pyx_t_15 = __pyx_t_11(__pyx_t_14); if (unlikely(!__pyx_t_15)) goto __pyx_L47_unpacking_failed;
+      __Pyx_GOTREF(__pyx_t_15);
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_14), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = NULL;
+      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+      goto __pyx_L48_unpacking_done;
+      __pyx_L47_unpacking_failed:;
+      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+      __pyx_t_11 = NULL;
+      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L48_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;
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":4817
+ *         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[0]; __pyx_lineno = 4817; __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[0]; __pyx_lineno = 4817; __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_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_15); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+    } else {
+      __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_varname, __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+    __pyx_t_1 = (__pyx_t_2 != 0);
+    if (__pyx_t_1) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+      /* "netCDF4/_netCDF4.pyx":4818
+ *         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[0]; __pyx_lineno = 4818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4818; __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_14 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_14);
+      if (__pyx_t_15) {
+        PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); __pyx_t_15 = NULL;
+      }
+      __Pyx_INCREF(__pyx_v_self);
+      PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_12, __pyx_v_self);
+      __Pyx_GIVEREF(__pyx_v_self);
+      __Pyx_INCREF(__pyx_v_varname);
+      PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_12, __pyx_v_varname);
+      __Pyx_GIVEREF(__pyx_v_varname);
+      __Pyx_INCREF(__pyx_v_var);
+      PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_12, __pyx_v_var);
+      __Pyx_GIVEREF(__pyx_v_var);
+      __Pyx_INCREF(__pyx_v_aggDimName);
+      PyTuple_SET_ITEM(__pyx_t_14, 3+__pyx_t_12, __pyx_v_aggDimName);
+      __Pyx_GIVEREF(__pyx_v_aggDimName);
+      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4818; __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_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[0]; __pyx_lineno = 4818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_varname, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+      goto __pyx_L49;
+    }
+    __pyx_L49:;
 
-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;
+    /* "netCDF4/_netCDF4.pyx":4816
+ *                 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;
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4819
+ *             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[0]; __pyx_lineno = 4819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_format_2, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":4820
+ *                 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[0]; __pyx_lineno = 4820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data_model_2, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4821
+ *         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[0]; __pyx_lineno = 4821; __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[0]; __pyx_lineno = 4821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-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;
+  /* "netCDF4/_netCDF4.pyx":4822
+ *         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[0]; __pyx_lineno = 4822; __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_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0;
+    __pyx_t_10 = NULL;
+  } else {
+    __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4822; __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_7))) {
+        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      } else {
+        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
+        #if CYTHON_COMPILING_IN_CPYTHON
+        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #else
+        __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
+    } else {
+      __pyx_t_6 = __pyx_t_10(__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 = 4822; __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;
 
-  /* function exit code */
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4823
+ *         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); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4823; __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[0]; __pyx_lineno = 4823; __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_L53_bool_binop_done;
+    }
+    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_data_model); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4823; __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[0]; __pyx_lineno = 4823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_1 = __pyx_t_2;
+    __pyx_L53_bool_binop_done:;
+    if (__pyx_t_1) {
 
-/* 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));
+      /* "netCDF4/_netCDF4.pyx":4824
+ *         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__108, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4824; __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 = 4824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4825
+ *             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_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4825; __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); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4825; __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[0]; __pyx_lineno = 4825; __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;
 
-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;
+    /* "netCDF4/_netCDF4.pyx":4826
+ *                 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_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4826; __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); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4826; __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[0]; __pyx_lineno = 4826; __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;
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":4827
+ *             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[0]; __pyx_lineno = 4827; __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[0]; __pyx_lineno = 4827; __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[0]; __pyx_lineno = 4827; __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;
 
-/* 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));
+    /* "netCDF4/_netCDF4.pyx":4822
+ *         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_7); __pyx_t_7 = 0;
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":4828
+ *             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_2, __pyx_kp_s__14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-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;
+  /* "netCDF4/_netCDF4.pyx":4653
+ *     """
+ * 
+ *     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 = 0;
+  __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._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;
 }
 
-/* "netCDF4.pyx":3883
- *     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)
+/* "netCDF4/_netCDF4.pyx":4830
+ *         self._path = '/'
+ * 
+ *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
+ *         """override base class attribute creation"""
+ *         self.__dict__[name] = value
  */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_3__setattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_2__setattr__[] = "override base class attribute creation";
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_3__setattr__ = {"__setattr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_3__setattr__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_9MFDataset_2__setattr__};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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;
-  int __pyx_r;
+  PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
-  __Pyx_GOTREF(__pyx_v_kwargs);
+  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
   {
-    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grp_2,&__pyx_n_s_dt,&__pyx_n_s_dtype_name,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;
@@ -54327,21 +53871,21 @@ static int __pyx_pw_7netCDF4_12CompoundType_1__init__(PyObject *__pyx_v_self, Py
       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--;
+        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_dt)) != 0)) kw_args--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3883; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4830; __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--;
+        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3883; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4830; __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 = 3883; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setattr__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4830; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
       goto __pyx_L5_argtuple_error;
@@ -54350,323 +53894,386 @@ static int __pyx_pw_7netCDF4_12CompoundType_1__init__(PyObject *__pyx_v_self, Py
       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];
+    __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("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3883; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4830; __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_AddTraceback("netCDF4._netCDF4.MFDataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
-  return -1;
+  return NULL;
   __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);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_2__setattr__(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_value);
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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;
-  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);
+  __Pyx_RefNannySetupContext("__setattr__", 0);
 
-  /* "netCDF4.pyx":3885
- *     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']
+  /* "netCDF4/_netCDF4.pyx":4832
+ *     def __setattr__(self, name, value):
+ *         """override base class attribute creation"""
+ *         self.__dict__[name] = value             # <<<<<<<<<<<<<<
+ * 
+ *     def __getattribute__(self, name):
  */
-  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4832; __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 = 3885; __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 = 3885; __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 = 3885; __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 = 3885; __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 = 3885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_4);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __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":3886
- *         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 = 3886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_6 = (__pyx_t_5 != 0);
-  if (__pyx_t_6) {
-
-    /* "netCDF4.pyx":3887
- *         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 = 3887; __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 = 3887; __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":3889
- *             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 = 3889; __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 = 3889; __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":3890
- *         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":3891
- *             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":3892
- *         self._nc_type = xtype
- *         self.dtype = dt
- *         self.name = dtype_name             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":4830
+ *         self._path = '/'
  * 
- *     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":3883
- *     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)
+ *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
+ *         """override base class attribute creation"""
+ *         self.__dict__[name] = value
  */
 
   /* function exit code */
-  __pyx_r = 0;
+  __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_AddTraceback("netCDF4.CompoundType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = -1;
+  __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_dt);
+  __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":3894
- *         self.name = dtype_name
+/* "netCDF4/_netCDF4.pyx":4834
+ *         self.__dict__[name] = value
  * 
- *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         if python3:
- *            return self.__unicode__()
+ *     def __getattribute__(self, name):             # <<<<<<<<<<<<<<
+ *         if name in ['variables','dimensions','file_format','groups',\
+ *                     'data_model','disk_format','path']:
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__ = {"__getattribute__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_5__getattribute__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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("__repr__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_2__repr__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));
+  __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[0]; __pyx_lineno = 4834; __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[0]; __pyx_lineno = 4834; __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[0]; __pyx_lineno = 4834; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__getattribute__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_4__getattribute__(__pyx_self, __pyx_v_self, __pyx_v_name);
 
   /* function exit code */
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-static PyObject *__pyx_pf_7netCDF4_12CompoundType_2__repr__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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;
-  PyObject *__pyx_t_3 = NULL;
+  int __pyx_t_3;
   PyObject *__pyx_t_4 = NULL;
   PyObject *__pyx_t_5 = NULL;
-  PyObject *__pyx_t_6 = 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("__repr__", 0);
+  __Pyx_RefNannySetupContext("__getattribute__", 0);
 
-  /* "netCDF4.pyx":3895
+  /* "netCDF4/_netCDF4.pyx":4835
  * 
- *     def __repr__(self):
- *         if python3:             # <<<<<<<<<<<<<<
- *            return self.__unicode__()
- *         else:
+ *     def __getattribute__(self, name):
+ *         if name in ['variables','dimensions','file_format','groups',\             # <<<<<<<<<<<<<<
+ *                     'data_model','disk_format','path']:
+ *             if name == 'dimensions': return self._dims
  */
-  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3895; __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 = 3895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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[0]; __pyx_lineno = 4835; __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[0]; __pyx_lineno = 4835; __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, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4835; __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[0]; __pyx_lineno = 4835; __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, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4835; __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[0]; __pyx_lineno = 4835; __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, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4835; __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;
-  if (__pyx_t_2) {
+  __pyx_t_3 = (__pyx_t_2 != 0);
+  if (__pyx_t_3) {
 
-    /* "netCDF4.pyx":3896
- *     def __repr__(self):
- *         if python3:
- *            return self.__unicode__()             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":4837
+ *         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[0]; __pyx_lineno = 4837; __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[0]; __pyx_lineno = 4837; __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/_netCDF4.pyx":4838
+ *                     '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[0]; __pyx_lineno = 4838; __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[0]; __pyx_lineno = 4838; __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/_netCDF4.pyx":4839
+ *             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, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4839; __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_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4839; __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/_netCDF4.pyx":4840
+ *             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, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4840; __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_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4840; __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/_netCDF4.pyx":4841
+ *             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[0]; __pyx_lineno = 4841; __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[0]; __pyx_lineno = 4841; __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/_netCDF4.pyx":4842
+ *             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 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 = 3896; __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);
-      }
+    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_path, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4842; __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_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_r = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L0;
     }
-    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 = 3896; __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 = 3896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+    /* "netCDF4/_netCDF4.pyx":4843
+ *             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[0]; __pyx_lineno = 4843; __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[0]; __pyx_lineno = 4843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_1);
+      __pyx_r = __pyx_t_1;
+      __pyx_t_1 = 0;
+      goto __pyx_L0;
     }
-    __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;
+    goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "netCDF4.pyx":3898
- *            return self.__unicode__()
+    /* "netCDF4/_netCDF4.pyx":4845
+ *             if name == 'groups': return self._grps
  *         else:
- *            return unicode(self).encode(default_encoding)             # <<<<<<<<<<<<<<
+ *             return Dataset.__getattribute__(self, name)             # <<<<<<<<<<<<<<
  * 
- *     def __unicode__(self):
+ *     def ncattrs(self):
  */
     __Pyx_XDECREF(__pyx_r);
-    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3898; __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 = 3898; __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 = 3898; __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 = 3898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_Dataset)), __pyx_n_s_getattribute); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4845; __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);
+    __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_3);
+        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
         __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 = 3898; __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 = 3898; __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 = 3898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+        __Pyx_DECREF_SET(__pyx_t_4, function);
+        __pyx_t_6 = 1;
+      }
     }
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4845; __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[0]; __pyx_lineno = 4845; __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:;
 
-  /* "netCDF4.pyx":3894
- *         self.name = dtype_name
+  /* "netCDF4/_netCDF4.pyx":4834
+ *         self.__dict__[name] = value
  * 
- *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         if python3:
- *            return self.__unicode__()
+ *     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_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_XDECREF(__pyx_t_7);
+  __Pyx_AddTraceback("netCDF4._netCDF4.MFDataset.__getattribute__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -54674,28 +54281,29 @@ static PyObject *__pyx_pf_7netCDF4_12CompoundType_2__repr__(struct __pyx_obj_7ne
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":3900
- *            return unicode(self).encode(default_encoding)
+/* "netCDF4/_netCDF4.pyx":4847
+ *             return Dataset.__getattribute__(self, name)
+ * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         return self._cdf[0].__dict__.keys()
  * 
- *     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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_7ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_7ncattrs = {"ncattrs", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_7ncattrs, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_7ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
   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));
+  __Pyx_RefNannySetupContext("ncattrs (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(__pyx_self, ((PyObject *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
@@ -54704,59 +54312,55 @@ static PyObject *__pyx_pf_7netCDF4_12CompoundType_4__unicode__(struct __pyx_obj_
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("__unicode__", 0);
+  __Pyx_RefNannySetupContext("ncattrs", 0);
 
-  /* "netCDF4.pyx":3901
+  /* "netCDF4/_netCDF4.pyx":4848
  * 
- *     def __unicode__(self):
- *         return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\             # <<<<<<<<<<<<<<
- *         (self.name,self.dtype)
+ *     def ncattrs(self):
+ *         return self._cdf[0].__dict__.keys()             # <<<<<<<<<<<<<<
  * 
+ *     def close(self):
  */
   __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 = 3901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-
-  /* "netCDF4.pyx":3902
- *     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 = 3902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4848; __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":3901
- * 
- *     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 = 3901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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[0]; __pyx_lineno = 4848; __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 = 3901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4848; __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;
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4848; __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 = 4848; __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 = 4848; __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;
 
-  /* "netCDF4.pyx":3900
- *            return unicode(self).encode(default_encoding)
+  /* "netCDF4/_netCDF4.pyx":4847
+ *             return Dataset.__getattribute__(self, name)
+ * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         return self._cdf[0].__dict__.keys()
  * 
- *     def __unicode__(self):             # <<<<<<<<<<<<<<
- *         return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
- *         (self.name,self.dtype)
  */
 
   /* function exit code */
@@ -54764,7 +54368,7 @@ static PyObject *__pyx_pf_7netCDF4_12CompoundType_4__unicode__(struct __pyx_obj_
   __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_AddTraceback("netCDF4._netCDF4.MFDataset.ncattrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
@@ -54772,1505 +54376,1239 @@ static PyObject *__pyx_pf_7netCDF4_12CompoundType_4__unicode__(struct __pyx_obj_
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":3881
- * @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):
+/* "netCDF4/_netCDF4.pyx":4850
+ *         return self._cdf[0].__dict__.keys()
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         for dset in self._cdf:
+ *             dset.close()
  */
 
 /* 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) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_9close(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_9close = {"close", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_9close, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_9close(PyObject *__pyx_self, 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));
+  __Pyx_RefNannySetupContext("close (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_8close(__pyx_self, ((PyObject *)__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) {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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("__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 = 3881; __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;
-}
+  __Pyx_RefNannySetupContext("close", 0);
 
-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 = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_self->_nc_type = __pyx_t_1;
+  /* "netCDF4/_netCDF4.pyx":4851
+ * 
+ *     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[0]; __pyx_lineno = 4851; __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[0]; __pyx_lineno = 4851; __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[0]; __pyx_lineno = 4851; __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[0]; __pyx_lineno = 4851; __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[0]; __pyx_lineno = 4851; __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[0]; __pyx_lineno = 4851; __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[0]; __pyx_lineno = 4851; __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[0]; __pyx_lineno = 4851; __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;
 
-  /* 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/_netCDF4.pyx":4852
+ *     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[0]; __pyx_lineno = 4852; __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 = 4852; __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 = 4852; __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;
 
-/* "netCDF4.pyx":3882
- * """
- *     cdef public nc_type _nc_type
- *     cdef public dtype, name             # <<<<<<<<<<<<<<
- *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
- *         cdef nc_type xtype
+    /* "netCDF4/_netCDF4.pyx":4851
+ * 
+ *     def close(self):
+ *         for dset in self._cdf:             # <<<<<<<<<<<<<<
+ *             dset.close()
+ * 
  */
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":4850
+ *         return self._cdf[0].__dict__.keys()
+ * 
+ *     def close(self):             # <<<<<<<<<<<<<<
+ *         for dset in self._cdf:
+ *             dset.close()
+ */
 
   /* 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;
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
-
-  /* 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_AddTraceback("netCDF4._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;
 }
 
-/* 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;
-}
+/* "netCDF4/_netCDF4.pyx":4854
+ *             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_12CompoundType_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_7netCDF4_12CompoundType_4name_1__get__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_11__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_11__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_11__repr__, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9MFDataset_11__repr__(PyObject *__pyx_self, 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;
+  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9MFDataset_10__repr__(__pyx_self, ((PyObject *)__pyx_v_self));
 
   /* function exit code */
-  __pyx_r = 0;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":3904
- *         (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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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_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;
+  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("_def_compound", 0);
-
-  /* "netCDF4.pyx":3913
- *     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 = 3913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_bytestr = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "netCDF4.pyx":3914
- *     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 = 3914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_namstring = __pyx_t_2;
-
-  /* "netCDF4.pyx":3915
- *     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 = 3915; __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 = 3915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v_size = __pyx_t_3;
-
-  /* "netCDF4.pyx":3916
- *     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 = 3916; __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 = 3916; __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":3917
- *     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":3918
- *     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 = 3918; __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 = 3918; __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 = 3918; __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 = 3918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  __Pyx_RefNannySetupContext("__repr__", 0);
 
-  /* "netCDF4.pyx":3919
- *     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()]
+  /* "netCDF4/_netCDF4.pyx":4855
+ * 
+ *     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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3919; __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 = 3919; __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 = 3919; __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 = 3919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
+  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r_3, ((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4855; __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 = 3919; __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;
+  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4855; __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":3920
- *         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.
+  /* "netCDF4/_netCDF4.pyx":4856
+ *     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_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3920; __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 = 3920; __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 = 3920; __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_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4856; __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[0]; __pyx_lineno = 4856; __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[0]; __pyx_lineno = 4856; __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_8, function);
+      __Pyx_DECREF_SET(__pyx_t_4, 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 = 3920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  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[0]; __pyx_lineno = 4856; __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_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4856; __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;
   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;
+    __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
+    __pyx_t_6 = 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 = 3920; __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 = 3920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4856; __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 = 4856; __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 (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_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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[0]; __pyx_lineno = 4856; __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 = 3920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) 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 = 3920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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[0]; __pyx_lineno = 4856; __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 = 3920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       }
     } else {
-      __pyx_t_1 = __pyx_t_10(__pyx_t_8);
+      __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[0]; __pyx_lineno = 3920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       __Pyx_GOTREF(__pyx_t_1);
     }
-    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1);
+    __Pyx_XDECREF_SET(__pyx_v_dimname, __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 = 3920; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4856; __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 = 3920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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[0]; __pyx_lineno = 4856; __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[0]; __pyx_lineno = 4856; __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_v_formats = __pyx_t_7;
-  __pyx_t_7 = 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[0]; __pyx_lineno = 4856; __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;
 
-  /* "netCDF4.pyx":3921
- *     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)
+  /* "netCDF4/_netCDF4.pyx":4857
+ *         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_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3921; __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 = 3921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4857; __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[0]; __pyx_lineno = 4857; __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[0]; __pyx_lineno = 4857; __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 = 3921; __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_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_6, function);
+      __Pyx_DECREF_SET(__pyx_t_1, 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 = 3921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  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[0]; __pyx_lineno = 4857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   } else {
-    __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4857; __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;
+  __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_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3921; __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 = 3921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4857; __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[0]; __pyx_lineno = 4857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 (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_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 = 3921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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[0]; __pyx_lineno = 4857; __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 = 3921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
-        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) 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 = 3921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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[0]; __pyx_lineno = 4857; __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 = 3921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       }
     } else {
-      __pyx_t_8 = __pyx_t_10(__pyx_t_6);
-      if (unlikely(!__pyx_t_8)) {
+      __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[0]; __pyx_lineno = 3921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4857; __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 = 3921; __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 = 3921; __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":3924
- *     # 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 = 3924; __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_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[0]; __pyx_lineno = 4857; __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[0]; __pyx_lineno = 4857; __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[0]; __pyx_lineno = 4857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   }
-  __pyx_t_1 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3924; __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 = 3924; __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":3925
- *     # (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 = 3925; __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 = 3925; __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 = 3925; __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;
+  __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4857; __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;
 
-  /* "netCDF4.pyx":3926
- *     names = _sortbylist(names, offsets)
- *     formats = _sortbylist(formats, offsets)
- *     offsets.sort()             # <<<<<<<<<<<<<<
- *     for name, format, offset in zip(names, formats, offsets):
- *         bytestr = _strencode(name)
+  /* "netCDF4/_netCDF4.pyx":4858
+ *         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_t_11 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_INCREF(__pyx_empty_tuple);
+  __pyx_v_grpnames = __pyx_empty_tuple;
 
-  /* "netCDF4.pyx":3927
- *     formats = _sortbylist(formats, offsets)
- *     offsets.sort()
- *     for name, format, offset in zip(names, formats, offsets):             # <<<<<<<<<<<<<<
- *         bytestr = _strencode(name)
- *         namstring = bytestr
+  /* "netCDF4/_netCDF4.pyx":4859
+ *         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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3927; __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 = 3927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4859; __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 = 3927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__14, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4859; __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;
-  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 = 3927; __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 = 3927; __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 = 3927; __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 = 3927; __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 = 3927; __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 = 3927; __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 = 3927; __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 = 3927; __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 = 3927; __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 = 3927; __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 = 3927; __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 = 3927; __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 = 3927; __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 = 3927; __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 = 3927; __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":3928
- *     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 = 3928; __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":3929
- *     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 = 3929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_namstring = __pyx_t_2;
-
-    /* "netCDF4.pyx":3930
- *         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 = 3930; __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 = 3930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-    if (__pyx_t_5) {
-
-      /* "netCDF4.pyx":3931
- *         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":3932
- *         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 = 3932; __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 = 3932; __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__103, 1, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3932; __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 = 3932; __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 = 3932; __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":3933
- *             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 = 3933; __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":3934
- *                 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__104, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3934; __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 = 3934; __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":3935
- *             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 = 3935; __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 = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-      /* "netCDF4.pyx":3936
- *                 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);
+  if (__pyx_t_7) {
 
-      /* "netCDF4.pyx":3937
- *             ierr = nc_insert_compound(grp._grpid, xtype, namstring,
- *                                       offset, xtype_tmp)
- *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    /* "netCDF4/_netCDF4.pyx":4861
+ *         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_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
-      if (__pyx_t_5) {
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4861; __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[0]; __pyx_lineno = 4861; __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[0]; __pyx_lineno = 4861; __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[0]; __pyx_lineno = 4861; __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[0]; __pyx_lineno = 4861; __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;
 
-        /* "netCDF4.pyx":3938
- *                                       offset, xtype_tmp)
- *             if ierr != NC_NOERR:
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":4860
+ *         grpnames = ()
+ *         if self.path == '/':
+ *             ncdump.append('root group (%s data model, file format %s):\n' %             # <<<<<<<<<<<<<<
+ *                     (self.data_model[0], self.disk_format[0]))
  *         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 = 3938; __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 = 3938; __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 = 3938; __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 = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      goto __pyx_L12;
-    }
-    /*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[0]; __pyx_lineno = 4860; __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[0]; __pyx_lineno = 4860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    goto __pyx_L7;
+  }
+  /*else*/ {
 
-      /* "netCDF4.pyx":3940
- *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+    /* "netCDF4/_netCDF4.pyx":4863
+ *                     (self.data_model[0], self.disk_format[0]))
  *         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)
+ *             ncdump.append('group %s:\n' % self.path)             # <<<<<<<<<<<<<<
+ *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\
+ *                 self.ncattrs()]
  */
-      __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 = 3940; __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 = 3940; __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 = 3940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      if (__pyx_t_5) {
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4863; __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[0]; __pyx_lineno = 4863; __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[0]; __pyx_lineno = 4863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  }
+  __pyx_L7:;
 
-        /* "netCDF4.pyx":3942
- *             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
+  /* "netCDF4/_netCDF4.pyx":4864
+ *         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_8 = __pyx_f_7netCDF4__find_cmptype(__pyx_v_grp, __pyx_v_format); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3942; __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 = 3942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __pyx_v_xtype_tmp = __pyx_t_18;
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
 
-        /* "netCDF4.pyx":3943
- *                 # 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,\
+  /* "netCDF4/_netCDF4.pyx":4865
+ *             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_8 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3943; __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;
+  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4865; __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[0]; __pyx_lineno = 4865; __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[0]; __pyx_lineno = 4865; __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[0]; __pyx_lineno = 4865; __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 = 4865; __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[0]; __pyx_lineno = 4865; __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[0]; __pyx_lineno = 4865; __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[0]; __pyx_lineno = 4865; __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[0]; __pyx_lineno = 4865; __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[0]; __pyx_lineno = 4865; __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;
 
-        /* "netCDF4.pyx":3944
- *                 xtype_tmp = _find_cmptype(grp, format)
- *                 bytestr = _strencode(name)
- *                 nested_namstring = bytestr             # <<<<<<<<<<<<<<
- *                 ierr = nc_insert_compound(grp._grpid, xtype,\
- *                                           nested_namstring,\
+    /* "netCDF4/_netCDF4.pyx":4864
+ *         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_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __pyx_v_nested_namstring = __pyx_t_2;
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4864; __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[0]; __pyx_lineno = 4864; __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[0]; __pyx_lineno = 4864; __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[0]; __pyx_lineno = 4864; __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[0]; __pyx_lineno = 4864; __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;
 
-        /* "netCDF4.pyx":3945
- *                 bytestr = _strencode(name)
- *                 nested_namstring = bytestr
- *                 ierr = nc_insert_compound(grp._grpid, xtype,\             # <<<<<<<<<<<<<<
- *                                           nested_namstring,\
- *                                           offset, xtype_tmp)
+  /* "netCDF4/_netCDF4.pyx":4866
+ *         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_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3945; __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 = 3945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __pyx_t_1 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4866; __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;
 
-        /* "netCDF4.pyx":3947
- *                 ierr = nc_insert_compound(grp._grpid, xtype,\
- *                                           nested_namstring,\
- *                                           offset, xtype_tmp)             # <<<<<<<<<<<<<<
- *                 if ierr != NC_NOERR:
- *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+  /* "netCDF4/_netCDF4.pyx":4867
+ *                 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_v_ierr = nc_insert_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_nested_namstring, __pyx_v_offset, __pyx_v_xtype_tmp);
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4867; __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[0]; __pyx_lineno = 4867; __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[0]; __pyx_lineno = 4867; __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[0]; __pyx_lineno = 4867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-        /* "netCDF4.pyx":3948
- *                                           nested_namstring,\
- *                                           offset, xtype_tmp)
- *                 if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *             else: # array compound element
+  /* "netCDF4/_netCDF4.pyx":4868
+ *         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_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
-        if (__pyx_t_5) {
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4868; __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[0]; __pyx_lineno = 4868; __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[0]; __pyx_lineno = 4868; __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[0]; __pyx_lineno = 4868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-          /* "netCDF4.pyx":3949
- *                                           offset, xtype_tmp)
- *                 if ierr != NC_NOERR:
- *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *             else: # array compound element
- *                 ndims = len(format.shape)
+  /* "netCDF4/_netCDF4.pyx":4869
+ *         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_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 = 3949; __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 = 3949; __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 = 3949; __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 = 3949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        }
-        goto __pyx_L24;
-      }
-      /*else*/ {
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4869; __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[0]; __pyx_lineno = 4869; __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_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4869; __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[0]; __pyx_lineno = 4869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-        /* "netCDF4.pyx":3951
- *                     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]
+  /* "netCDF4/_netCDF4.pyx":4870
+ *         ncdump.append('    variables = %s\n' % str(varnames))
+ *         ncdump.append('    groups = %s\n' % str(grpnames))
+ *         return ''.join(ncdump)             # <<<<<<<<<<<<<<
+ * 
+ * class _Dimension(object):
  */
-        __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 = 3951; __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 = 3951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        __pyx_v_ndims = __pyx_t_19;
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4870; __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":3952
- *             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.
+  /* "netCDF4/_netCDF4.pyx":4854
+ *             dset.close()
+ * 
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         ncdump = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
  */
-        __pyx_t_4 = __pyx_v_ndims;
-        for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {
 
-          /* "netCDF4.pyx":3953
- *                 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 = 3953; __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 = 3953; __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 = 3953; __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;
-        }
+  /* 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._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;
+}
 
-        /* "netCDF4.pyx":3954
- *                 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:]]
+/* "netCDF4/_netCDF4.pyx":4873
+ * 
+ * class _Dimension(object):
+ *     def __init__(self, dimname, dim, dimlens, dimtotlen):             # <<<<<<<<<<<<<<
+ *         self.dimlens = dimlens
+ *         self.dimtotlen = dimtotlen
  */
-        __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 = 3954; __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 = 3954; __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 = 3954; __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 = 3954; __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 = 3954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-        if (__pyx_t_5) {
 
-          /* "netCDF4.pyx":3955
- *                     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:*/ {
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_10_Dimension_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_10_Dimension_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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[0]; __pyx_lineno = 4873; __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[0]; __pyx_lineno = 4873; __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[0]; __pyx_lineno = 4873; __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[0]; __pyx_lineno = 4873; __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[0]; __pyx_lineno = 4873; __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[0]; __pyx_lineno = 4873; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4._Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_10_Dimension___init__(__pyx_self, __pyx_v_self, __pyx_v_dimname, __pyx_v_dim, __pyx_v_dimlens, __pyx_v_dimtotlen);
 
-              /* "netCDF4.pyx":3956
- *                 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 = 3956; __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 = 3956; __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 = 3956; __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 = 3956; __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__105, 1, 0, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3956; __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 = 3956; __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 = 3956; __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;
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-            /* "netCDF4.pyx":3957
- *                     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 = 3957; __pyx_clineno = __LINE__; goto __pyx_L31_except_error;}
-              __Pyx_GOTREF(__pyx_t_7);
-              __Pyx_GOTREF(__pyx_t_12);
-              __Pyx_GOTREF(__pyx_t_8);
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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);
 
-              /* "netCDF4.pyx":3958
- *                         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)
+  /* "netCDF4/_netCDF4.pyx":4874
+ * class _Dimension(object):
+ *     def __init__(self, dimname, dim, dimlens, dimtotlen):
+ *         self.dimlens = dimlens             # <<<<<<<<<<<<<<
+ *         self.dimtotlen = dimtotlen
+ *         self._name = dimname
  */
-              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3958; __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 = 3958; __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:;
-          }
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimlens, __pyx_v_dimlens) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-          /* "netCDF4.pyx":3959
- *                     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:
+  /* "netCDF4/_netCDF4.pyx":4875
+ *     def __init__(self, dimname, dim, dimlens, dimtotlen):
+ *         self.dimlens = dimlens
+ *         self.dimtotlen = dimtotlen             # <<<<<<<<<<<<<<
+ *         self._name = dimname
+ *     def __len__(self):
  */
-          __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 = 3959; __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 = 3959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimtotlen, __pyx_v_dimtotlen) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-          /* "netCDF4.pyx":3960
- *                         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'))
+  /* "netCDF4/_netCDF4.pyx":4876
+ *         self.dimlens = dimlens
+ *         self.dimtotlen = dimtotlen
+ *         self._name = dimname             # <<<<<<<<<<<<<<
+ *     def __len__(self):
+ *         return self.dimtotlen
  */
-          __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);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name_2, __pyx_v_dimname) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-          /* "netCDF4.pyx":3961
- *                     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.
+  /* "netCDF4/_netCDF4.pyx":4873
+ * 
+ * class _Dimension(object):
+ *     def __init__(self, dimname, dim, dimlens, dimtotlen):             # <<<<<<<<<<<<<<
+ *         self.dimlens = dimlens
+ *         self.dimtotlen = dimtotlen
  */
-          __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
-          if (__pyx_t_5) {
 
-            /* "netCDF4.pyx":3962
- *                            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.
+  /* function exit code */
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4._Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":4877
+ *         self.dimtotlen = dimtotlen
+ *         self._name = dimname
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self.dimtotlen
+ *     def isunlimited(self):
  */
-            __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 = 3962; __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 = 3962; __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 = 3962; __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 = 3962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-          goto __pyx_L28;
-        }
-        /*else*/ {
 
-          /* "netCDF4.pyx":3965
- *                 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
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_10_Dimension_3__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_3__len__ = {"__len__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_10_Dimension_3__len__, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_10_Dimension_2__len__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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);
+
+  /* "netCDF4/_netCDF4.pyx":4878
+ *         self._name = dimname
+ *     def __len__(self):
+ *         return self.dimtotlen             # <<<<<<<<<<<<<<
+ *     def isunlimited(self):
+ *         return True
  */
-          __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 = 3965; __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 = 3965; __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 = 3965; __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 = 3965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-          __pyx_v_xtype_tmp = __pyx_t_18;
+  __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[0]; __pyx_lineno = 4878; __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":3966
- *                     # 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,\
+  /* "netCDF4/_netCDF4.pyx":4877
+ *         self.dimtotlen = dimtotlen
+ *         self._name = dimname
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self.dimtotlen
+ *     def isunlimited(self):
  */
-          __pyx_t_8 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3966; __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":3967
- *                     xtype_tmp = _find_cmptype(grp, format.subdtype[0])
- *                     bytestr = _strencode(name)
- *                     nested_namstring = bytestr             # <<<<<<<<<<<<<<
- *                     ierr = nc_insert_array_compound(grp._grpid,xtype,\
- *                                                     nested_namstring,\
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4._Dimension.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":4879
+ *     def __len__(self):
+ *         return self.dimtotlen
+ *     def isunlimited(self):             # <<<<<<<<<<<<<<
+ *         return True
+ *     def __repr__(self):
  */
-          __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __pyx_v_nested_namstring = __pyx_t_2;
 
-          /* "netCDF4.pyx":3968
- *                     bytestr = _strencode(name)
- *                     nested_namstring = bytestr
- *                     ierr = nc_insert_array_compound(grp._grpid,xtype,\             # <<<<<<<<<<<<<<
- *                                                     nested_namstring,\
- *                                                     offset,xtype_tmp,\
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_10_Dimension_5isunlimited(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_5isunlimited = {"isunlimited", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_10_Dimension_5isunlimited, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_10_Dimension_4isunlimited(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_10_Dimension_4isunlimited(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("isunlimited", 0);
+
+  /* "netCDF4/_netCDF4.pyx":4880
+ *         return self.dimtotlen
+ *     def isunlimited(self):
+ *         return True             # <<<<<<<<<<<<<<
+ *     def __repr__(self):
+ *         if self.isunlimited():
  */
-          __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 = 3968; __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 = 3968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+  __Pyx_XDECREF(__pyx_r);
+  __Pyx_INCREF(Py_True);
+  __pyx_r = Py_True;
+  goto __pyx_L0;
 
-          /* "netCDF4.pyx":3971
- *                                                     nested_namstring,\
- *                                                     offset,xtype_tmp,\
- *                                                     ndims,dim_sizes)             # <<<<<<<<<<<<<<
- *                     if ierr != NC_NOERR:
- *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+  /* "netCDF4/_netCDF4.pyx":4879
+ *     def __len__(self):
+ *         return self.dimtotlen
+ *     def isunlimited(self):             # <<<<<<<<<<<<<<
+ *         return True
+ *     def __repr__(self):
  */
-          __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":3972
- *                                                     offset,xtype_tmp,\
- *                                                     ndims,dim_sizes)
- *                     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
- *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *     return xtype
+  /* function exit code */
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":4881
+ *     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_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
-          if (__pyx_t_5) {
 
-            /* "netCDF4.pyx":3973
- *                                                     ndims,dim_sizes)
- *                     if ierr != NC_NOERR:
- *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
- *     return xtype
- * 
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_10_Dimension_7__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_7__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_10_Dimension_7__repr__, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_10_Dimension_6__repr__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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);
+
+  /* "netCDF4/_netCDF4.pyx":4882
+ *         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 = ((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 = 3973; __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 = 3973; __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 = 3973; __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 = 3973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          }
-        }
-        __pyx_L28:;
-      }
-      __pyx_L24:;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4882; __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);
     }
-    __pyx_L12:;
+  }
+  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 = 4882; __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 = 4882; __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[0]; __pyx_lineno = 4882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (__pyx_t_4) {
 
-    /* "netCDF4.pyx":3927
- *     formats = _sortbylist(formats, offsets)
- *     offsets.sort()
- *     for name, format, offset in zip(names, formats, offsets):             # <<<<<<<<<<<<<<
- *         bytestr = _strencode(name)
- *         namstring = bytestr
+    /* "netCDF4/_netCDF4.pyx":4883
+ *     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[0]; __pyx_lineno = 4883; __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[0]; __pyx_lineno = 4883; __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[0]; __pyx_lineno = 4883; __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[0]; __pyx_lineno = 4883; __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 = 4883; __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[0]; __pyx_lineno = 4883; __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[0]; __pyx_lineno = 4883; __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;
   }
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  /*else*/ {
 
-  /* "netCDF4.pyx":3974
- *                     if ierr != NC_NOERR:
- *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *     return xtype             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":4885
+ *             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))             # <<<<<<<<<<<<<<
  * 
- * cdef _find_cmptype(grp, dtype):
+ * class _Variable(object):
  */
-  __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 = 3974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-  __pyx_r = __pyx_t_6;
-  __pyx_t_6 = 0;
-  goto __pyx_L0;
+    __Pyx_XDECREF(__pyx_r);
+    __pyx_t_6 = PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4885; __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[0]; __pyx_lineno = 4885; __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[0]; __pyx_lineno = 4885; __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[0]; __pyx_lineno = 4885; __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 = 4885; __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[0]; __pyx_lineno = 4885; __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[0]; __pyx_lineno = 4885; __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;
+  }
 
-  /* "netCDF4.pyx":3904
- *         (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__.
+  /* "netCDF4/_netCDF4.pyx":4881
+ *     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_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_AddTraceback("netCDF4._netCDF4._Dimension.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __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":3976
- *     return xtype
+/* "netCDF4/_netCDF4.pyx":4888
  * 
- * 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.
+ * class _Variable(object):
+ *     def __init__(self, dset, varname, var, recdimname):             # <<<<<<<<<<<<<<
+ *         self.dimensions = var.dimensions
+ *         self._dset = dset
  */
 
-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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9_Variable_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9_Variable_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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[0]; __pyx_lineno = 4888; __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[0]; __pyx_lineno = 4888; __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[0]; __pyx_lineno = 4888; __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[0]; __pyx_lineno = 4888; __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[0]; __pyx_lineno = 4888; __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[0]; __pyx_lineno = 4888; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4._Variable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_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_8_netCDF4_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;
@@ -56281,99 +55619,180 @@ static PyObject *__pyx_f_7netCDF4__find_cmptype(PyObject *__pyx_v_grp, 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);
+  __Pyx_RefNannySetupContext("__init__", 0);
+
+  /* "netCDF4/_netCDF4.pyx":4889
+ * 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[0]; __pyx_lineno = 4889; __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[0]; __pyx_lineno = 4889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4890
+ *     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[0]; __pyx_lineno = 4890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4/_netCDF4.pyx":4891
+ *         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_2, __pyx_v_dset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4/_netCDF4.pyx":4892
+ *         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[0]; __pyx_lineno = 4892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4/_netCDF4.pyx":4893
+ *         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[0]; __pyx_lineno = 4893; __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[0]; __pyx_lineno = 4893; __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[0]; __pyx_lineno = 4893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4894
+ *         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[0]; __pyx_lineno = 4894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4/_netCDF4.pyx":4895
+ *         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[0]; __pyx_lineno = 4895; __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[0]; __pyx_lineno = 4895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":3980
- *     # 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
+  /* "netCDF4/_netCDF4.pyx":4896
+ *         self._recdimname = recdimname
+ *         self._recLen = dset._cdfVLen
+ *         self.dtype = var.dtype             # <<<<<<<<<<<<<<
+ *         self._name = var._name
+ *         # copy attributes from master.
  */
-  __pyx_v_match = 0;
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4896; __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[0]; __pyx_lineno = 4896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":3981
- *     cdef nc_type xtype
- *     match = False
- *     for cmpname, cmpdt in grp.cmptypes.items():             # <<<<<<<<<<<<<<
- *         xtype = cmpdt._nc_type
- *         names1 = dtype.names; names2 = cmpdt.dtype.names
+  /* "netCDF4/_netCDF4.pyx":4897
+ *         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_grp, __pyx_n_s_cmptypes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4897; __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 = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name_2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = NULL;
+
+  /* "netCDF4/_netCDF4.pyx":4899
+ *         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[0]; __pyx_lineno = 4899; __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[0]; __pyx_lineno = 4899; __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_2 = PyMethod_GET_SELF(__pyx_t_3);
-    if (likely(__pyx_t_2)) {
+    __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_2);
+      __Pyx_INCREF(__pyx_t_1);
       __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 = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  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[0]; __pyx_lineno = 4899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   } else {
-    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_GOTREF(__pyx_t_2);
   __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;
+  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_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4899; __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 = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4899; __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;
   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 = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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[0]; __pyx_lineno = 4899; __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 = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4899; __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 = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __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[0]; __pyx_lineno = 4899; __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 = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       }
     } else {
-      __pyx_t_1 = __pyx_t_5(__pyx_t_3);
-      if (unlikely(!__pyx_t_1)) {
+      __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[0]; __pyx_lineno = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
-      __Pyx_GOTREF(__pyx_t_1);
+      __Pyx_GOTREF(__pyx_t_2);
     }
-    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
-      PyObject* sequence = __pyx_t_1;
+    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
@@ -56382,36 +55801,36 @@ static PyObject *__pyx_f_7netCDF4__find_cmptype(PyObject *__pyx_v_grp, PyObject
       if (unlikely(size != 2)) {
         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4899; __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_1 = PyTuple_GET_ITEM(sequence, 0); 
         __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
       } else {
-        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
+        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
         __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
       }
-      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_1);
       __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 = 3981; __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 = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4899; __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[0]; __pyx_lineno = 4899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_6);
       #endif
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4899; __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_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 = 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[0]; __pyx_lineno = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4899; __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;
@@ -56419,1304 +55838,1457 @@ static PyObject *__pyx_f_7netCDF4__find_cmptype(PyObject *__pyx_v_grp, PyObject
       __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 = 3981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4899; __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_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;
 
-    /* "netCDF4.pyx":3982
- *     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()]
+    /* "netCDF4/_netCDF4.pyx":4900
+ *         # copy attributes from master.
+ *         for name, value in var.__dict__.items():
+ *             self.__dict__[name] = value             # <<<<<<<<<<<<<<
+ *     def typecode(self):
+ *         return self.dtype
  */
-    __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 = 3982; __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 = 3982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __pyx_v_xtype = __pyx_t_9;
+    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4900; __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[0]; __pyx_lineno = 4900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "netCDF4.pyx":3983
- *     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()]
+    /* "netCDF4/_netCDF4.pyx":4899
+ *         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_dtype, __pyx_n_s_names); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3983; __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 = 3983; __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 = 3983; __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;
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-    /* "netCDF4.pyx":3984
- *         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
+  /* "netCDF4/_netCDF4.pyx":4888
+ * 
+ * class _Variable(object):
+ *     def __init__(self, dset, varname, var, recdimname):             # <<<<<<<<<<<<<<
+ *         self.dimensions = var.dimensions
+ *         self._dset = dset
  */
-    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3984; __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 = 3984; __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 = 3984; __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 = 3984; __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 = 3984; __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 = 3984; __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 = 3984; __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 = 3984; __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 = 3984; __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 = 3984; __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 = 3984; __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 = 3984; __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 = 3984; __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 = 3984; __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":3985
- *         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).
+  /* 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._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;
+}
+
+/* "netCDF4/_netCDF4.pyx":4901
+ *         for name, value in var.__dict__.items():
+ *             self.__dict__[name] = value
+ *     def typecode(self):             # <<<<<<<<<<<<<<
+ *         return self.dtype
+ *     def ncattrs(self):
  */
-    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3985; __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 = 3985; __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 = 3985; __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 = 3985; __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 = 3985; __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 = 3985; __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 = 3985; __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 = 3985; __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 = 3985; __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 = 3985; __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 = 3985; __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 = 3985; __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 = 3985; __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 = 3985; __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 = 3985; __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":3988
- *         # match names, formats, but not offsets (they may be changed
- *         # by netcdf lib).
- *         if names1==names2 and formats1==formats2:             # <<<<<<<<<<<<<<
- *             match = True
- *             break
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_3typecode(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9_Variable_3typecode = {"typecode", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9_Variable_3typecode, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_9_Variable_2typecode(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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);
+
+  /* "netCDF4/_netCDF4.pyx":4902
+ *             self.__dict__[name] = value
+ *     def typecode(self):
+ *         return self.dtype             # <<<<<<<<<<<<<<
+ *     def ncattrs(self):
+ *         return self._mastervar.__dict__.keys()
  */
-    __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 = 3988; __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 = 3988; __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 = 3988; __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 = 3988; __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) {
+  __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[0]; __pyx_lineno = 4902; __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":3989
- *         # by netcdf lib).
- *         if names1==names2 and formats1==formats2:
- *             match = True             # <<<<<<<<<<<<<<
- *             break
- *     if not match:
+  /* "netCDF4/_netCDF4.pyx":4901
+ *         for name, value in var.__dict__.items():
+ *             self.__dict__[name] = value
+ *     def typecode(self):             # <<<<<<<<<<<<<<
+ *         return self.dtype
+ *     def ncattrs(self):
  */
-      __pyx_v_match = 1;
 
-      /* "netCDF4.pyx":3990
- *         if names1==names2 and formats1==formats2:
- *             match = True
- *             break             # <<<<<<<<<<<<<<
- *     if not match:
- *         try:
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("netCDF4._netCDF4._Variable.typecode", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":4903
+ *     def typecode(self):
+ *         return self.dtype
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         return self._mastervar.__dict__.keys()
+ *     def __getattr__(self,name):
  */
-      goto __pyx_L4_break;
-    }
 
-    /* "netCDF4.pyx":3981
- *     cdef nc_type xtype
- *     match = False
- *     for cmpname, cmpdt in grp.cmptypes.items():             # <<<<<<<<<<<<<<
- *         xtype = cmpdt._nc_type
- *         names1 = dtype.names; names2 = cmpdt.dtype.names
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_5ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9_Variable_5ncattrs = {"ncattrs", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9_Variable_5ncattrs, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_9_Variable_4ncattrs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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);
+
+  /* "netCDF4/_netCDF4.pyx":4904
+ *         return self.dtype
+ *     def ncattrs(self):
+ *         return self._mastervar.__dict__.keys()             # <<<<<<<<<<<<<<
+ *     def __getattr__(self,name):
+ *         if name == 'shape': return self._shape()
  */
-  }
-  __pyx_L4_break:;
+  __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[0]; __pyx_lineno = 4904; __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[0]; __pyx_lineno = 4904; __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[0]; __pyx_lineno = 4904; __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[0]; __pyx_lineno = 4904; __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 = 4904; __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":3991
- *             match = True
- *             break
- *     if not match:             # <<<<<<<<<<<<<<
- *         try:
- *             parent_grp = grp.parent
+  /* "netCDF4/_netCDF4.pyx":4903
+ *     def typecode(self):
+ *         return self.dtype
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         return self._mastervar.__dict__.keys()
+ *     def __getattr__(self,name):
  */
-  __pyx_t_12 = ((!(__pyx_v_match != 0)) != 0);
-  if (__pyx_t_12) {
 
-    /* "netCDF4.pyx":3992
- *             break
- *     if not match:
- *         try:             # <<<<<<<<<<<<<<
- *             parent_grp = grp.parent
- *         except AttributeError:
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4._netCDF4._Variable.ncattrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "netCDF4/_netCDF4.pyx":4905
+ *     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_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":3993
- *     if not match:
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_7__getattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9_Variable_7__getattr__ = {"__getattr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9_Variable_7__getattr__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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[0]; __pyx_lineno = 4905; __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[0]; __pyx_lineno = 4905; __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[0]; __pyx_lineno = 4905; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4._Variable.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_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_8_netCDF4_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);
+
+  /* "netCDF4/_netCDF4.pyx":4906
+ *         return self._mastervar.__dict__.keys()
+ *     def __getattr__(self,name):
+ *         if name == 'shape': return self._shape()             # <<<<<<<<<<<<<<
+ *         if name == 'ndim': return len(self._shape())
  *         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 = 3993; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __pyx_v_parent_grp = __pyx_t_3;
-        __pyx_t_3 = 0;
+  __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[0]; __pyx_lineno = 4906; __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[0]; __pyx_lineno = 4906; __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);
       }
-      __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;
+    }
+    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 = 4906; __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 = 4906; __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;
+  }
 
-      /* "netCDF4.pyx":3994
+  /* "netCDF4/_netCDF4.pyx":4907
+ *     def __getattr__(self,name):
+ *         if name == 'shape': return self._shape()
+ *         if name == 'ndim': return len(self._shape())             # <<<<<<<<<<<<<<
  *         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 = 3994; __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":3995
- *             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")
+ *             return self.__dict__[name]
  */
-        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3995; __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 = 3995; __pyx_clineno = __LINE__; goto __pyx_L17_except_error;}
+  __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[0]; __pyx_lineno = 4907; __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[0]; __pyx_lineno = 4907; __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);
       }
-      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:;
     }
+    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 = 4907; __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 = 4907; __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[0]; __pyx_lineno = 4907; __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[0]; __pyx_lineno = 4907; __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":3996
- *         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:
+  /* "netCDF4/_netCDF4.pyx":4908
+ *         if name == 'shape': return self._shape()
+ *         if name == 'ndim': return len(self._shape())
+ *         try:             # <<<<<<<<<<<<<<
+ *             return self.__dict__[name]
+ *         except:
  */
-    __pyx_t_12 = (__pyx_v_parent_grp == Py_None);
-    __pyx_t_13 = (__pyx_t_12 != 0);
-    if (__pyx_t_13) {
+  {
+    __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":3997
- *             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)
+      /* "netCDF4/_netCDF4.pyx":4909
+ *         if name == 'ndim': return len(self._shape())
+ *         try:
+ *             return self.__dict__[name]             # <<<<<<<<<<<<<<
+ *         except:
+ *             raise AttributeError(name)
  */
-      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__108, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3997; __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 = 3997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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[0]; __pyx_lineno = 4909; __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[0]; __pyx_lineno = 4909; __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;
     }
-    /*else*/ {
+    __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;
 
-      /* "netCDF4.pyx":3999
- *             raise ValueError("cannot find compound type in this group or parent groups")
- *         else:
- *             xtype = _find_cmptype(parent_grp,dtype)             # <<<<<<<<<<<<<<
- *     return xtype
- * 
+    /* "netCDF4/_netCDF4.pyx":4910
+ *         try:
+ *             return self.__dict__[name]
+ *         except:             # <<<<<<<<<<<<<<
+ *             raise AttributeError(name)
+ *     def __repr__(self):
  */
-      __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 = 3999; __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 = 3999; __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:;
+    /*except:*/ {
+      __Pyx_AddTraceback("netCDF4._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[0]; __pyx_lineno = 4910; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+      __Pyx_GOTREF(__pyx_t_3);
+      __Pyx_GOTREF(__pyx_t_2);
+      __Pyx_GOTREF(__pyx_t_4);
 
-  /* "netCDF4.pyx":4000
- *         else:
- *             xtype = _find_cmptype(parent_grp,dtype)
- *     return xtype             # <<<<<<<<<<<<<<
- * 
- * cdef _read_compound(group, nc_type xtype, endian=None):
+      /* "netCDF4/_netCDF4.pyx":4911
+ *             return self.__dict__[name]
+ *         except:
+ *             raise AttributeError(name)             # <<<<<<<<<<<<<<
+ *     def __repr__(self):
+ *         ncdump_var = ['%r\n' % type(self)]
  */
-  __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 = 4000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
+      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4911; __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[0]; __pyx_lineno = 4911; __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[0]; __pyx_lineno = 4911; __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;
+  }
 
-  /* "netCDF4.pyx":3976
- *     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.
+  /* "netCDF4/_netCDF4.pyx":4905
+ *     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_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_XDECREF(__pyx_t_4);
+  __Pyx_XDECREF(__pyx_t_9);
+  __Pyx_XDECREF(__pyx_t_10);
+  __Pyx_AddTraceback("netCDF4._netCDF4._Variable.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __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":4002
- *     return xtype
- * 
- * cdef _read_compound(group, nc_type xtype, endian=None):             # <<<<<<<<<<<<<<
- *     # read a compound data type id from an existing file,
- *     # construct a corresponding numpy dtype instance,
+/* "netCDF4/_netCDF4.pyx":4912
+ *         except:
+ *             raise AttributeError(name)
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         ncdump_var = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
  */
 
-static PyObject *__pyx_f_7netCDF4__read_compound(PyObject *__pyx_v_group, nc_type __pyx_v_xtype, struct __pyx_opt_args_7netCDF4__read_compound *__pyx_optional_args) {
-  PyObject *__pyx_v_endian = ((PyObject *)Py_None);
-  int __pyx_v_ierr;
-  int __pyx_v_nf;
-  int __pyx_v_numdims;
-  int __pyx_v_ndim;
-  int __pyx_v_classp;
-  int __pyx_v__grpid;
-  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)];
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_9__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9_Variable_9__repr__ = {"__repr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9_Variable_9__repr__, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_9_Variable_8__repr__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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_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_format = 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_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;
+  int __pyx_t_7;
   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_t_16;
-  struct __pyx_opt_args_7netCDF4__read_compound __pyx_t_17;
+  int __pyx_t_11;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("_read_compound", 0);
-  if (__pyx_optional_args) {
-    if (__pyx_optional_args->__pyx_n > 0) {
-      __pyx_v_endian = __pyx_optional_args->endian;
-    }
-  }
+  __Pyx_RefNannySetupContext("__repr__", 0);
 
-  /* "netCDF4.pyx":4015
- *     cdef char cmp_namstring[NC_MAX_NAME+1]
- *     # get name and number of fields.
- *     _grpid = group._grpid             # <<<<<<<<<<<<<<
- *     with nogil:
- *         ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields)
+  /* "netCDF4/_netCDF4.pyx":4913
+ *             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_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r_3, ((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4913; __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 = 4015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v__grpid = __pyx_t_2;
-
-  /* "netCDF4.pyx":4016
- *     # get name and number of fields.
- *     _grpid = group._grpid
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields)
- *     if ierr != NC_NOERR:
- */
-  {
-      #ifdef WITH_THREAD
-      PyThreadState *_save;
-      Py_UNBLOCK_THREADS
-      #endif
-      /*try:*/ {
+  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4913; __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;
 
-        /* "netCDF4.pyx":4017
- *     _grpid = group._grpid
- *     with nogil:
- *         ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields)             # <<<<<<<<<<<<<<
- *     if ierr != NC_NOERR:
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+  /* "netCDF4/_netCDF4.pyx":4914
+ *     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_v_ierr = nc_inq_compound(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_cmp_namstring, NULL, (&__pyx_v_nfields));
+  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4914; __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[0]; __pyx_lineno = 4914; __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[0]; __pyx_lineno = 4914; __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 = 4914; __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 = 4914; __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 = 4914; __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 = 4914; __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 = 4914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
       }
-
-      /* "netCDF4.pyx":4016
- *     # get name and number of fields.
- *     _grpid = group._grpid
- *     with nogil:             # <<<<<<<<<<<<<<
- *         ierr = nc_inq_compound(_grpid, xtype, cmp_namstring, NULL, &nfields)
- *     if ierr != NC_NOERR:
- */
-      /*finally:*/ {
-        /*normal exit:*/{
-          #ifdef WITH_THREAD
-          Py_BLOCK_THREADS
-          #endif
-          goto __pyx_L5;
+    } 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 = 4914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
-        __pyx_L5:;
+        break;
       }
-  }
-
-  /* "netCDF4.pyx":4018
- *     with nogil:
- *         ierr = nc_inq_compound(_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":4019
- *         ierr = nc_inq_compound(_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 = 4019; __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 = 4019; __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 = 4019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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[0]; __pyx_lineno = 4914; __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_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[0]; __pyx_lineno = 4914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4914; __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[0]; __pyx_lineno = 4914; __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":4020
- *     if ierr != NC_NOERR:
- *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *     name = cmp_namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
- *     # loop over fields.
- *     names = []
+  /* "netCDF4/_netCDF4.pyx":4915
+ *         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_5 = __Pyx_PyObject_FromString(__pyx_v_cmp_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4020; __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 = 4020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+
+  /* "netCDF4/_netCDF4.pyx":4916
+ *         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[0]; __pyx_lineno = 4916; __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 = 4020; __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 = 4020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __pyx_t_8 = NULL;
-  __pyx_t_9 = 0;
+  __pyx_t_1 = NULL;
   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)) {
+    __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_8);
+      __Pyx_INCREF(__pyx_t_1);
       __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 = 4020; __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;
+  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[0]; __pyx_lineno = 4916; __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[0]; __pyx_lineno = 4916; __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[0]; __pyx_lineno = 4916; __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[0]; __pyx_lineno = 4916; __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[0]; __pyx_lineno = 4916; __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[0]; __pyx_lineno = 4916; __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[0]; __pyx_lineno = 4916; __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[0]; __pyx_lineno = 4916; __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[0]; __pyx_lineno = 4916; __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;
+
+    /* "netCDF4/_netCDF4.pyx":4915
+ *         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[0]; __pyx_lineno = 4915; __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[0]; __pyx_lineno = 4915; __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[0]; __pyx_lineno = 4915; __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[0]; __pyx_lineno = 4915; __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[0]; __pyx_lineno = 4915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
-  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 = 4020; __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;
+  __pyx_v_attrs = ((PyObject*)__pyx_t_3);
+  __pyx_t_3 = 0;
 
-  /* "netCDF4.pyx":4022
- *     name = cmp_namstring.decode(default_encoding,unicode_error)
- *     # loop over fields.
- *     names = []             # <<<<<<<<<<<<<<
- *     formats = []
- *     offsets = []
+  /* "netCDF4/_netCDF4.pyx":4918
+ *                 self.ncattrs()]
+ *         ncdump_var.append('%s %s%s\n' %\
+ *         (self.dtype,self._name,dimnames))             # <<<<<<<<<<<<<<
+ *         ncdump_var = ncdump_var + attrs
+ *         unlimdims = []
  */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4918; __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[0]; __pyx_lineno = 4918; __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[0]; __pyx_lineno = 4918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_names = __pyx_t_1;
-  __pyx_t_1 = 0;
+  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;
 
-  /* "netCDF4.pyx":4023
- *     # loop over fields.
- *     names = []
- *     formats = []             # <<<<<<<<<<<<<<
- *     offsets = []
- *     for nf from 0 <= nf < nfields:
+  /* "netCDF4/_netCDF4.pyx":4917
+ *         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_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_formats = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4917; __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[0]; __pyx_lineno = 4917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-  /* "netCDF4.pyx":4024
- *     names = []
- *     formats = []
- *     offsets = []             # <<<<<<<<<<<<<<
- *     for nf from 0 <= nf < nfields:
- *         with nogil:
+  /* "netCDF4/_netCDF4.pyx":4919
+ *         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_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_offsets = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
+  __pyx_t_6 = PyNumber_Add(__pyx_v_ncdump_var, __pyx_v_attrs); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4919; __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;
 
-  /* "netCDF4.pyx":4025
- *     formats = []
- *     offsets = []
- *     for nf from 0 <= nf < nfields:             # <<<<<<<<<<<<<<
- *         with nogil:
- *             ierr = nc_inq_compound_field(_grpid,
+  /* "netCDF4/_netCDF4.pyx":4920
+ *         (self.dtype,self._name,dimnames))
+ *         ncdump_var = ncdump_var + attrs
+ *         unlimdims = []             # <<<<<<<<<<<<<<
+ *         for dimname in self.dimensions:
+ *             dim = _find_dim(self._grp, dimname)
  */
-  __pyx_t_11 = __pyx_v_nfields;
-  for (__pyx_v_nf = 0; __pyx_v_nf < __pyx_t_11; __pyx_v_nf++) {
+  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_v_unlimdims = ((PyObject*)__pyx_t_6);
+  __pyx_t_6 = 0;
 
-    /* "netCDF4.pyx":4026
- *     offsets = []
- *     for nf from 0 <= nf < nfields:
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_compound_field(_grpid,
- *                                          xtype,
+  /* "netCDF4/_netCDF4.pyx":4921
+ *         ncdump_var = ncdump_var + attrs
+ *         unlimdims = []
+ *         for dimname in self.dimensions:             # <<<<<<<<<<<<<<
+ *             dim = _find_dim(self._grp, dimname)
+ *             if dim.isunlimited():
  */
-    {
-        #ifdef WITH_THREAD
-        PyThreadState *_save;
-        Py_UNBLOCK_THREADS
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4921; __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[0]; __pyx_lineno = 4921; __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 = 4921; __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[0]; __pyx_lineno = 4921; __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[0]; __pyx_lineno = 4921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
-        /*try:*/ {
-
-          /* "netCDF4.pyx":4027
- *     for nf from 0 <= nf < nfields:
- *         with nogil:
- *             ierr = nc_inq_compound_field(_grpid,             # <<<<<<<<<<<<<<
- *                                          xtype,
- *                                          nf,
- */
-          __pyx_v_ierr = nc_inq_compound_field(__pyx_v__grpid, __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":4026
- *     offsets = []
- *     for nf from 0 <= nf < nfields:
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_compound_field(_grpid,
- *                                          xtype,
- */
-        /*finally:*/ {
-          /*normal exit:*/{
-            #ifdef WITH_THREAD
-            Py_BLOCK_THREADS
-            #endif
-            goto __pyx_L13;
-          }
-          __pyx_L13:;
+      } 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[0]; __pyx_lineno = 4921; __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[0]; __pyx_lineno = 4921; __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[0]; __pyx_lineno = 4921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
-    }
-
-    /* "netCDF4.pyx":4035
- *                                          &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":4036
- *                                          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 = 4036; __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 = 4036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        break;
+      }
       __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 = 4036; __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 = 4036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
+    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_6);
+    __pyx_t_6 = 0;
 
-    /* "netCDF4.pyx":4037
- *         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)
+    /* "netCDF4/_netCDF4.pyx":4922
+ *         unlimdims = []
+ *         for dimname in self.dimensions:
+ *             dim = _find_dim(self._grp, dimname)             # <<<<<<<<<<<<<<
+ *             if dim.isunlimited():
+ *                 unlimdims.append(str(dimname))
  */
-    __pyx_t_6 = __Pyx_PyObject_FromString(__pyx_v_field_namstring); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4037; __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 = 4037; __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 = 4037; __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 = 4037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_5 = NULL;
+    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4922; __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_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4922; __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 && 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);
+    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_10, function);
+        __Pyx_DECREF_SET(__pyx_t_3, 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 = 4037; __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;
+    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4922; __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_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 = 4037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+    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[0]; __pyx_lineno = 4922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-    __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_1);
-    __pyx_t_1 = 0;
+    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_6);
+    __pyx_t_6 = 0;
 
-    /* "netCDF4.pyx":4038
- *             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.
+    /* "netCDF4/_netCDF4.pyx":4923
+ *         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_12 = __Pyx_PyObject_Append(__pyx_v_names, __pyx_v_field_name); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4923; __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[0]; __pyx_lineno = 4923; __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[0]; __pyx_lineno = 4923; __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[0]; __pyx_lineno = 4923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+    if (__pyx_t_11) {
 
-    /* "netCDF4.pyx":4039
- *         field_name = field_namstring.decode(default_encoding,unicode_error)
- *         names.append(field_name)
- *         offsets.append(offset)             # <<<<<<<<<<<<<<
- *         # if numdims=0, not an array.
- *         field_shape = ()
+      /* "netCDF4/_netCDF4.pyx":4924
+ *             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_1 = __Pyx_PyInt_FromSize_t(__pyx_v_offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4039; __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 = 4039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4924; __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[0]; __pyx_lineno = 4924; __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[0]; __pyx_lineno = 4924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      goto __pyx_L9;
+    }
+    __pyx_L9:;
 
-    /* "netCDF4.pyx":4041
- *         offsets.append(offset)
- *         # if numdims=0, not an array.
- *         field_shape = ()             # <<<<<<<<<<<<<<
- *         if numdims != 0:
- *             for ndim from 0 <= ndim < numdims:
+    /* "netCDF4/_netCDF4.pyx":4921
+ *         ncdump_var = ncdump_var + attrs
+ *         unlimdims = []
+ *         for dimname in self.dimensions:             # <<<<<<<<<<<<<<
+ *             dim = _find_dim(self._grp, dimname)
+ *             if dim.isunlimited():
  */
-    __Pyx_INCREF(__pyx_empty_tuple);
-    __Pyx_XDECREF_SET(__pyx_v_field_shape, __pyx_empty_tuple);
+  }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":4042
- *         # if numdims=0, not an array.
- *         field_shape = ()
- *         if numdims != 0:             # <<<<<<<<<<<<<<
- *             for ndim from 0 <= ndim < numdims:
- *                 field_shape = field_shape + (dim_sizes[ndim],)
+  /* "netCDF4/_netCDF4.pyx":4925
+ *             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_3 = ((__pyx_v_numdims != 0) != 0);
-    if (__pyx_t_3) {
+  __pyx_t_1 = PyList_AsTuple(__pyx_v_unlimdims); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4925; __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[0]; __pyx_lineno = 4925; __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_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4925; __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[0]; __pyx_lineno = 4925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-      /* "netCDF4.pyx":4043
- *         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.
+  /* "netCDF4/_netCDF4.pyx":4926
+ *                 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_2 = __pyx_v_numdims;
-      for (__pyx_v_ndim = 0; __pyx_v_ndim < __pyx_t_2; __pyx_v_ndim++) {
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4926; __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[0]; __pyx_lineno = 4926; __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[0]; __pyx_lineno = 4926; __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[0]; __pyx_lineno = 4926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-        /* "netCDF4.pyx":4044
- *         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:
+  /* "netCDF4/_netCDF4.pyx":4927
+ *         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_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 = 4044; __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 = 4044; __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 = 4044; __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_L15;
-    }
-    __pyx_L15:;
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_v_ncdump_var); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4927; __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":4046
- *                 field_shape = field_shape + (dim_sizes[ndim],)
- *         # check to see if this field is a nested compound type.
- *         try:             # <<<<<<<<<<<<<<
- *             field_type =  _nctonptype[field_typeid]
- *             if endian is not None:
+  /* "netCDF4/_netCDF4.pyx":4912
+ *         except:
+ *             raise AttributeError(name)
+ *     def __repr__(self):             # <<<<<<<<<<<<<<
+ *         ncdump_var = ['%r\n' % type(self)]
+ *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
  */
-    {
-      __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":4047
- *         # check to see if this field is a nested compound type.
- *         try:
- *             field_type =  _nctonptype[field_typeid]             # <<<<<<<<<<<<<<
- *             if endian is not None:
- *                 format = endian + format
- */
-        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4047; __pyx_clineno = __LINE__; goto __pyx_L18_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 = 4047; __pyx_clineno = __LINE__; goto __pyx_L18_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;
+  /* 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._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;
+}
 
-        /* "netCDF4.pyx":4048
- *         try:
- *             field_type =  _nctonptype[field_typeid]
- *             if endian is not None:             # <<<<<<<<<<<<<<
- *                 format = endian + format
- *         except KeyError:
+/* "netCDF4/_netCDF4.pyx":4928
+ *         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_3 = (__pyx_v_endian != Py_None);
-        __pyx_t_16 = (__pyx_t_3 != 0);
-        if (__pyx_t_16) {
 
-          /* "netCDF4.pyx":4049
- *             field_type =  _nctonptype[field_typeid]
- *             if endian is not None:
- *                 format = endian + format             # <<<<<<<<<<<<<<
- *         except KeyError:
- *             with nogil:
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_11__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9_Variable_11__len__ = {"__len__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9_Variable_11__len__, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_9_Variable_10__len__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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);
+
+  /* "netCDF4/_netCDF4.pyx":4929
+ *         return ''.join(ncdump_var)
+ *     def __len__(self):
+ *         return self._shape()[0]             # <<<<<<<<<<<<<<
+ *     def _shape(self):
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])
  */
-          if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4049; __pyx_clineno = __LINE__; goto __pyx_L18_error;} }
-          __pyx_t_10 = PyNumber_Add(__pyx_v_endian, __pyx_v_format); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4049; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
-          __Pyx_GOTREF(__pyx_t_10);
-          __Pyx_XDECREF_SET(__pyx_v_format, __pyx_t_10);
-          __pyx_t_10 = 0;
-          goto __pyx_L26;
-        }
-        __pyx_L26:;
-      }
-      __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_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_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;
+  __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[0]; __pyx_lineno = 4929; __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 = 4929; __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 = 4929; __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[0]; __pyx_lineno = 4929; __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":4050
- *             if endian is not None:
- *                 format = endian + format
- *         except KeyError:             # <<<<<<<<<<<<<<
- *             with nogil:
- *                 ierr = nc_inq_user_type(_grpid,
+  /* "netCDF4/_netCDF4.pyx":4928
+ *         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_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 = 4050; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_GOTREF(__pyx_t_1);
-        __Pyx_GOTREF(__pyx_t_8);
 
-        /* "netCDF4.pyx":4051
- *                 format = endian + format
- *         except KeyError:
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_user_type(_grpid,
- *                        field_typeid,NULL,NULL,NULL,NULL,&classp)
- */
-        {
-            #ifdef WITH_THREAD
-            PyThreadState *_save;
-            Py_UNBLOCK_THREADS
-            #endif
-            /*try:*/ {
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4._netCDF4._Variable.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-              /* "netCDF4.pyx":4052
- *         except KeyError:
- *             with nogil:
- *                 ierr = nc_inq_user_type(_grpid,             # <<<<<<<<<<<<<<
- *                        field_typeid,NULL,NULL,NULL,NULL,&classp)
- *             if classp == NC_COMPOUND: # a compound type
+/* "netCDF4/_netCDF4.pyx":4930
+ *     def __len__(self):
+ *         return self._shape()[0]
+ *     def _shape(self):             # <<<<<<<<<<<<<<
+ *         recdimlen = len(self._dset.dimensions[self._recdimname])
+ *         return (recdimlen,) + self._mastervar.shape[1:]
  */
-              __pyx_v_ierr = nc_inq_user_type(__pyx_v__grpid, __pyx_v_field_typeid, NULL, NULL, NULL, NULL, (&__pyx_v_classp));
-            }
 
-            /* "netCDF4.pyx":4051
- *                 format = endian + format
- *         except KeyError:
- *             with nogil:             # <<<<<<<<<<<<<<
- *                 ierr = nc_inq_user_type(_grpid,
- *                        field_typeid,NULL,NULL,NULL,NULL,&classp)
- */
-            /*finally:*/ {
-              /*normal exit:*/{
-                #ifdef WITH_THREAD
-                Py_BLOCK_THREADS
-                #endif
-                goto __pyx_L33;
-              }
-              __pyx_L33:;
-            }
-        }
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_13_shape(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9_Variable_13_shape = {"_shape", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9_Variable_13_shape, METH_O, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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_8_netCDF4_9_Variable_12_shape(__pyx_self, ((PyObject *)__pyx_v_self));
 
-        /* "netCDF4.pyx":4054
- *                 ierr = nc_inq_user_type(_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, endian=endian)
- */
-        __pyx_t_16 = ((__pyx_v_classp == NC_COMPOUND) != 0);
-        if (__pyx_t_16) {
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-          /* "netCDF4.pyx":4056
- *             if classp == NC_COMPOUND: # a compound type
- *                 # recursively call this function?
- *                 field_type = _read_compound(group, field_typeid, endian=endian)             # <<<<<<<<<<<<<<
- *             else:
- *                 raise KeyError('compound field of an unsupported data type')
- */
-          __pyx_t_17.__pyx_n = 1;
-          __pyx_t_17.endian = __pyx_v_endian;
-          __pyx_t_7 = __pyx_f_7netCDF4__read_compound(__pyx_v_group, __pyx_v_field_typeid, &__pyx_t_17); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4056; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          __Pyx_XDECREF_SET(__pyx_v_field_type, __pyx_t_7);
-          __pyx_t_7 = 0;
-          goto __pyx_L34;
-        }
-        /*else*/ {
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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);
 
-          /* "netCDF4.pyx":4058
- *                 field_type = _read_compound(group, field_typeid, endian=endian)
- *             else:
- *                 raise KeyError('compound field of an unsupported data type')             # <<<<<<<<<<<<<<
- *         if field_shape != ():
- *             formats.append((field_type,field_shape))
+  /* "netCDF4/_netCDF4.pyx":4931
+ *         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_7 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4058; __pyx_clineno = __LINE__; goto __pyx_L20_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 = 4058; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
-        }
-        __pyx_L34:;
-        __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_L19_exception_handled;
-      }
-      goto __pyx_L20_except_error;
-      __pyx_L20_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_L19_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_L25_try_end:;
-    }
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dset_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4931; __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[0]; __pyx_lineno = 4931; __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[0]; __pyx_lineno = 4931; __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[0]; __pyx_lineno = 4931; __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[0]; __pyx_lineno = 4931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+  __pyx_v_recdimlen = __pyx_t_4;
 
-    /* "netCDF4.pyx":4059
- *             else:
- *                 raise KeyError('compound field of an unsupported data type')
- *         if field_shape != ():             # <<<<<<<<<<<<<<
- *             formats.append((field_type,field_shape))
- *         else:
+  /* "netCDF4/_netCDF4.pyx":4932
+ *     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_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 = 4059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-    if (__pyx_t_16) {
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_recdimlen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4932; __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[0]; __pyx_lineno = 4932; __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[0]; __pyx_lineno = 4932; __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[0]; __pyx_lineno = 4932; __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__109, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4932; __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 = 4932; __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":4060
- *                 raise KeyError('compound field of an unsupported data type')
- *         if field_shape != ():
- *             formats.append((field_type,field_shape))             # <<<<<<<<<<<<<<
- *         else:
- *             formats.append(field_type)
+  /* "netCDF4/_netCDF4.pyx":4930
+ *     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_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4060; __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 = 4060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-      goto __pyx_L35;
-    }
-    /*else*/ {
 
-      /* "netCDF4.pyx":4062
- *             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 = 4062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    __pyx_L35:;
-  }
+  /* function exit code */
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("netCDF4._netCDF4._Variable._shape", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-  /* "netCDF4.pyx":4064
- *             formats.append(field_type)
- *     # make sure entries in lists sorted by offset.
- *     names = _sortbylist(names, offsets)             # <<<<<<<<<<<<<<
- *     formats = _sortbylist(formats, offsets)
- *     offsets.sort()
+/* "netCDF4/_netCDF4.pyx":4933
+ *         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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4064; __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;
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_15set_auto_maskandscale(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9_Variable_15set_auto_maskandscale = {"set_auto_maskandscale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9_Variable_15set_auto_maskandscale, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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[0]; __pyx_lineno = 4933; __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[0]; __pyx_lineno = 4933; __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];
   }
-  __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4064; __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 = 4064; __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;
+  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[0]; __pyx_lineno = 4933; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._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_8_netCDF4_9_Variable_14set_auto_maskandscale(__pyx_self, __pyx_v_self, __pyx_v_val);
 
-  /* "netCDF4.pyx":4065
- *     # 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.
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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);
+
+  /* "netCDF4/_netCDF4.pyx":4934
+ *         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_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4934; __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 = 4065; __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;
+  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[0]; __pyx_lineno = 4934; __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[0]; __pyx_lineno = 4934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __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 = 4065; __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":4066
- *     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 = 4066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  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[0]; __pyx_lineno = 4934; __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[0]; __pyx_lineno = 4934; __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[0]; __pyx_lineno = 4934; __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[0]; __pyx_lineno = 4934; __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[0]; __pyx_lineno = 4934; __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;
 
-  /* "netCDF4.pyx":4068
- *     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)
- * 
+    /* "netCDF4/_netCDF4.pyx":4935
+ *     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_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4068; __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 = 4068; __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 = 4068; __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 = 4068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_dtype_dict = ((PyObject*)__pyx_t_8);
-  __pyx_t_8 = 0;
+    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4935; __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[0]; __pyx_lineno = 4935; __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 = 4935; __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[0]; __pyx_lineno = 4935; __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;
 
-  /* "netCDF4.pyx":4069
- *     # 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.
+    /* "netCDF4/_netCDF4.pyx":4934
+ *         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_XDECREF(__pyx_r);
-  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4069; __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 = 4069; __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 = 4069; __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 = 4069; __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 = 4069; __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;
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":4002
- *     return xtype
- * 
- * cdef _read_compound(group, nc_type xtype, endian=None):             # <<<<<<<<<<<<<<
- *     # read a compound data type id from an existing file,
- *     # construct a corresponding numpy dtype instance,
+  /* "netCDF4/_netCDF4.pyx":4933
+ *         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_XDECREF(__pyx_t_8);
-  __Pyx_XDECREF(__pyx_t_10);
-  __Pyx_AddTraceback("netCDF4._read_compound", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
+  __Pyx_AddTraceback("netCDF4._netCDF4._Variable.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __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_format);
-  __Pyx_XDECREF(__pyx_v_dtype_dict);
+  __Pyx_XDECREF(__pyx_v_v);
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":4107
- *     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:
+/* "netCDF4/_netCDF4.pyx":4936
+ *         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 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;
+
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_9_Variable_17__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_9_Variable_16__getitem__[] = "Get records from a concatenated set of variables.";
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_9_Variable_17__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9_Variable_17__getitem__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_9_Variable_16__getitem__};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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;
-  int __pyx_r;
+  PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
-  __Pyx_GOTREF(__pyx_v_kwargs);
+  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
   {
-    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};
+    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  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;
@@ -57725,1677 +57297,3127 @@ static int __pyx_pw_7netCDF4_6VLType_1__init__(PyObject *__pyx_v_self, PyObject
       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--;
+        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_dt)) != 0)) kw_args--;
-        else {
-          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4107; __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--;
+        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elem)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4107; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4936; __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 = 4107; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4936; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
-    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+    } 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);
-      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
     }
-    __pyx_v_grp = values[0];
-    __pyx_v_dt = values[1];
-    __pyx_v_dtype_name = values[2];
+    __pyx_v_self = values[0];
+    __pyx_v_elem = values[1];
   }
   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 = 4107; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4936; __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_AddTraceback("netCDF4._netCDF4._Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
-  return -1;
+  return NULL;
   __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);
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_9_Variable_16__getitem__(__pyx_self, __pyx_v_self, __pyx_v_elem);
 
   /* 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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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
-  int __pyx_t_1;
-  int __pyx_t_2;
+  PyObject *__pyx_t_1 = NULL;
+  PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
-  nc_type __pyx_t_4;
-  PyObject *__pyx_t_5 = 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("__init__", 0);
-  __Pyx_INCREF(__pyx_v_dt);
+  __Pyx_RefNannySetupContext("__getitem__", 0);
 
-  /* "netCDF4.pyx":4109
- *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
- *         cdef nc_type xtype
- *         if 'typeid' in kwargs:             # <<<<<<<<<<<<<<
- *             xtype = kwargs['typeid']
- *         else:
+  /* "netCDF4/_netCDF4.pyx":4945
+ *         # 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_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 = 4109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = (__pyx_t_1 != 0);
-  if (__pyx_t_2) {
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4945; __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[0]; __pyx_lineno = 4945; __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 = 4945; __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 = 4945; __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 = 4944; __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 = 4944; __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 = 4944; __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 = 4944; __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 = 4944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_L4_unpacking_done:;
+  }
+
+  /* "netCDF4/_netCDF4.pyx":4944
+ *         # 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;
+
+  /* "netCDF4/_netCDF4.pyx":4946
+ *         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[0]; __pyx_lineno = 4946; __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 = 4946; __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 = 4946; __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 = 4946; __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/_netCDF4.pyx":4947
+ *         _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[0]; __pyx_lineno = 4947; __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 = 4947; __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 = 4947; __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 = 4947; __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[0]; __pyx_lineno = 4947; __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[0]; __pyx_lineno = 4947; __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[0]; __pyx_lineno = 4947; __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;
+
+  /* "netCDF4/_netCDF4.pyx":4953
+ *         # 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[0]; __pyx_lineno = 4953; __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[0]; __pyx_lineno = 4953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __Pyx_INCREF(__pyx_slice__110);
+  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_slice__110);
+  __Pyx_GIVEREF(__pyx_slice__110);
+  __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4953; __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;
+
+  /* "netCDF4/_netCDF4.pyx":4954
+ *         # 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[0]; __pyx_lineno = 4954; __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__111, 0, 1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4954; __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[0]; __pyx_lineno = 4954; __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[0]; __pyx_lineno = 4954; __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[0]; __pyx_lineno = 4954; __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[0]; __pyx_lineno = 4954; __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[0]; __pyx_lineno = 4954; __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[0]; __pyx_lineno = 4954; __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[0]; __pyx_lineno = 4954; __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[0]; __pyx_lineno = 4954; __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;
+
+    /* "netCDF4/_netCDF4.pyx":4955
+ *         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[0]; __pyx_lineno = 4955; __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[0]; __pyx_lineno = 4955; __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[0]; __pyx_lineno = 4955; __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[0]; __pyx_lineno = 4955; __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[0]; __pyx_lineno = 4955; __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[0]; __pyx_lineno = 4955; __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[0]; __pyx_lineno = 4955; __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[0]; __pyx_lineno = 4955; __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[0]; __pyx_lineno = 4955; __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[0]; __pyx_lineno = 4955; __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) {
+
+      /* "netCDF4/_netCDF4.pyx":4956
+ *         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 = 4956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L7;
+    }
+    __pyx_L7:;
+
+    /* "netCDF4/_netCDF4.pyx":4954
+ *         # 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;
+
+  /* "netCDF4/_netCDF4.pyx":4959
+ * 
+ *         # 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[0]; __pyx_lineno = 4959; __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[0]; __pyx_lineno = 4959; __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[0]; __pyx_lineno = 4959; __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[0]; __pyx_lineno = 4959; __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[0]; __pyx_lineno = 4959; __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[0]; __pyx_lineno = 4959; __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[0]; __pyx_lineno = 4959; __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[0]; __pyx_lineno = 4959; __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;
+
+  /* "netCDF4/_netCDF4.pyx":4960
+ *         # 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[0]; __pyx_lineno = 4960; __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[0]; __pyx_lineno = 4960; __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[0]; __pyx_lineno = 4960; __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[0]; __pyx_lineno = 4960; __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[0]; __pyx_lineno = 4960; __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[0]; __pyx_lineno = 4960; __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[0]; __pyx_lineno = 4960; __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[0]; __pyx_lineno = 4960; __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;
+
+  /* "netCDF4/_netCDF4.pyx":4961
+ *         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[0]; __pyx_lineno = 4961; __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[0]; __pyx_lineno = 4961; __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[0]; __pyx_lineno = 4961; __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[0]; __pyx_lineno = 4961; __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[0]; __pyx_lineno = 4961; __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[0]; __pyx_lineno = 4961; __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[0]; __pyx_lineno = 4961; __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[0]; __pyx_lineno = 4961; __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;
 
-    /* "netCDF4.pyx":4110
- *         cdef nc_type xtype
- *         if 'typeid' in kwargs:
- *             xtype = kwargs['typeid']             # <<<<<<<<<<<<<<
- *         else:
- *             xtype, dt = _def_vlen(grp, dt, dtype_name)
+  /* "netCDF4/_netCDF4.pyx":4962
+ *         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_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_typeid); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4110; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4962; __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[0]; __pyx_lineno = 4962; __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[0]; __pyx_lineno = 4962; __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[0]; __pyx_lineno = 4962; __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[0]; __pyx_lineno = 4962; __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[0]; __pyx_lineno = 4962; __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[0]; __pyx_lineno = 4962; __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 = 4110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    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[0]; __pyx_lineno = 4962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_v_xtype = __pyx_t_4;
-    goto __pyx_L3;
   }
-  /*else*/ {
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+  __Pyx_DECREF_SET(__pyx_v_put_ind, __pyx_t_1);
+  __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":4112
- *             xtype = kwargs['typeid']
- *         else:
- *             xtype, dt = _def_vlen(grp, dt, dtype_name)             # <<<<<<<<<<<<<<
- *         self._nc_type = xtype
- *         self.dtype = dt
+  /* "netCDF4/_netCDF4.pyx":4966
+ *         # 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_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 = 4112; __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;
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4966; __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[0]; __pyx_lineno = 4966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_nv = __pyx_t_5;
+
+  /* "netCDF4/_netCDF4.pyx":4967
+ *         # 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[0]; __pyx_lineno = 4967; __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[0]; __pyx_lineno = 4967; __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[0]; __pyx_lineno = 4967; __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[0]; __pyx_lineno = 4967; __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[0]; __pyx_lineno = 4967; __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[0]; __pyx_lineno = 4967; __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[0]; __pyx_lineno = 4967; __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[0]; __pyx_lineno = 4967; __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[0]; __pyx_lineno = 4967; __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[0]; __pyx_lineno = 4967; __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);
+      if (unlikely(size != 4)) {
+        if (size > 4) __Pyx_RaiseTooManyValuesError(4);
         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4967; __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); 
+        __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_5 = PyList_GET_ITEM(sequence, 0); 
-        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
+        __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_5);
-      __Pyx_INCREF(__pyx_t_6);
+      __Pyx_INCREF(__pyx_t_4);
+      __Pyx_INCREF(__pyx_t_3);
+      __Pyx_INCREF(__pyx_t_2);
+      __Pyx_INCREF(__pyx_t_7);
       #else
-      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4112; __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 = 4112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_6);
+      {
+        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[0]; __pyx_lineno = 4967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          __Pyx_GOTREF(item);
+          *(temps[i]) = item;
+        }
+      }
       #endif
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 4112; __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 = 4112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      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[0]; __pyx_lineno = 4967; __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[0]; __pyx_lineno = 4967; __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_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[0]; __pyx_lineno = 4112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_L5_unpacking_done:;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_L21_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 = 4112; __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:;
+    __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;
 
-  /* "netCDF4.pyx":4113
- *         else:
- *             xtype, dt = _def_vlen(grp, dt, dtype_name)
- *         self._nc_type = xtype             # <<<<<<<<<<<<<<
- *         self.dtype = dt
- *         if dt == str:
+    /* "netCDF4/_netCDF4.pyx":4969
+ *         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_v_self->_nc_type = __pyx_v_xtype;
+    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4969; __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[0]; __pyx_lineno = 4969; __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[0]; __pyx_lineno = 4969; __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[0]; __pyx_lineno = 4969; __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[0]; __pyx_lineno = 4969; __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[0]; __pyx_lineno = 4969; __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[0]; __pyx_lineno = 4969; __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[0]; __pyx_lineno = 4969; __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[0]; __pyx_lineno = 4969; __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[0]; __pyx_lineno = 4969; __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;
 
-  /* "netCDF4.pyx":4114
- *             xtype, dt = _def_vlen(grp, dt, dtype_name)
- *         self._nc_type = xtype
- *         self.dtype = dt             # <<<<<<<<<<<<<<
- *         if dt == str:
- *             self.name = None
+    /* "netCDF4/_netCDF4.pyx":4970
+ *             # 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_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;
+    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4970; __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[0]; __pyx_lineno = 4970; __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[0]; __pyx_lineno = 4970; __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[0]; __pyx_lineno = 4970; __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[0]; __pyx_lineno = 4970; __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[0]; __pyx_lineno = 4970; __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[0]; __pyx_lineno = 4970; __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[0]; __pyx_lineno = 4970; __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[0]; __pyx_lineno = 4970; __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[0]; __pyx_lineno = 4970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    if (__pyx_t_10) {
 
-  /* "netCDF4.pyx":4115
- *         self._nc_type = xtype
- *         self.dtype = dt
- *         if dt == str:             # <<<<<<<<<<<<<<
- *             self.name = None
- *         else:
+      /* "netCDF4/_netCDF4.pyx":4971
+ *             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_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 = 4115; __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 = 4115; __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_Call(__pyx_builtin_IndexError, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4971; __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 = 4971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-    /* "netCDF4.pyx":4116
- *         self.dtype = dt
- *         if dt == str:
- *             self.name = None             # <<<<<<<<<<<<<<
- *         else:
- *             self.name = dtype_name
+    /* "netCDF4/_netCDF4.pyx":4974
+ *             # Start, stop and step along 1st dimension, eg the unlimited
+ *             # dimension.
+ *             sta = start[0]             # <<<<<<<<<<<<<<
+ *             step = stride[0]
+ *             stop = sta + count[0] * step
  */
-    __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*/ {
+    __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[0]; __pyx_lineno = 4974; __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;
 
-    /* "netCDF4.pyx":4118
- *             self.name = None
- *         else:
- *             self.name = dtype_name             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":4975
+ *             # dimension.
+ *             sta = start[0]
+ *             step = stride[0]             # <<<<<<<<<<<<<<
+ *             stop = sta + count[0] * step
  * 
- *     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:;
+    __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[0]; __pyx_lineno = 4975; __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;
 
-  /* "netCDF4.pyx":4107
- *     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:
+    /* "netCDF4/_netCDF4.pyx":4976
+ *             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[0]; __pyx_lineno = 4976; __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[0]; __pyx_lineno = 4976; __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[0]; __pyx_lineno = 4976; __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;
+
+    /* "netCDF4/_netCDF4.pyx":4983
+ *             #  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[0]; __pyx_lineno = 4983; __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;
+
+    /* "netCDF4/_netCDF4.pyx":4984
+ *             #  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[0]; __pyx_lineno = 4984; __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;
+
+    /* "netCDF4/_netCDF4.pyx":4985
+ *             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[0]; __pyx_lineno = 4985; __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[0]; __pyx_lineno = 4985; __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[0]; __pyx_lineno = 4985; __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[0]; __pyx_lineno = 4985; __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[0]; __pyx_lineno = 4985; __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[0]; __pyx_lineno = 4985; __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[0]; __pyx_lineno = 4985; __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[0]; __pyx_lineno = 4985; __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[0]; __pyx_lineno = 4985; __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[0]; __pyx_lineno = 4985; __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/_netCDF4.pyx":4986
+ *             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[0]; __pyx_lineno = 4986; __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[0]; __pyx_lineno = 4986; __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;
 
-  /* 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":4120
- *             self.name = dtype_name
+      /* "netCDF4/_netCDF4.pyx":4987
+ *             for n in range(nv):
+ *                 k = self._recLen[n]     # number of records in this variable
+ *                 idx.extend(range(k))             # <<<<<<<<<<<<<<
+ *                 vid.extend([n] * k)
  * 
- *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         if python3:
- *            return self.__unicode__()
  */
+      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4987; __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[0]; __pyx_lineno = 4987; __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[0]; __pyx_lineno = 4987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-/* 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":4121
+      /* "netCDF4/_netCDF4.pyx":4988
+ *                 k = self._recLen[n]     # number of records in this variable
+ *                 idx.extend(range(k))
+ *                 vid.extend([n] * k)             # <<<<<<<<<<<<<<
  * 
- *     def __repr__(self):
- *         if python3:             # <<<<<<<<<<<<<<
- *            return self.__unicode__()
- *         else:
+ *             # Merge the two lists to get a list of 2-elem lists.
  */
-  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4121; __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 = 4121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
+      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4988; __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[0]; __pyx_lineno = 4988; __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[0]; __pyx_lineno = 4988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":4122
- *     def __repr__(self):
- *         if python3:
- *            return self.__unicode__()             # <<<<<<<<<<<<<<
- *         else:
- *            return unicode(self).encode(default_encoding)
+      /* "netCDF4/_netCDF4.pyx":4985
+ *             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_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 = 4122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
+    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":4992
+ *             # 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[0]; __pyx_lineno = 4992; __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_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[0]; __pyx_lineno = 4992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
     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 = 4122; __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 = 4122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      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[0]; __pyx_lineno = 4992; __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;
-  }
-  /*else*/ {
-
-    /* "netCDF4.pyx":4124
- *            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 = 4124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4992; __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 = 4124; __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_t_3, __pyx_n_s_getitem); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __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 = 4124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PySlice_New(__pyx_v_sta, __pyx_v_stop, __pyx_v_step); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4992; __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 = 4124; __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_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_3, function);
+        __Pyx_DECREF_SET(__pyx_t_1, 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 = 4124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    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[0]; __pyx_lineno = 4992; __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[0]; __pyx_lineno = 4992; __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[0]; __pyx_lineno = 4992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-      __Pyx_GOTREF(__pyx_t_1);
+    }
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_XDECREF_SET(__pyx_v_lst, __pyx_t_7);
+    __pyx_t_7 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":4995
+ * 
+ *             # 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[0]; __pyx_lineno = 4995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __Pyx_INCREF(__pyx_slice__113);
+    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_slice__113);
+    __Pyx_GIVEREF(__pyx_slice__113);
+    __Pyx_XDECREF_SET(__pyx_v_newSlice, ((PyObject*)__pyx_t_7));
+    __pyx_t_7 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":4996
+ *             # 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[0]; __pyx_lineno = 4996; __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[0]; __pyx_lineno = 4996; __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[0]; __pyx_lineno = 4996; __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[0]; __pyx_lineno = 4996; __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_6 = PyTuple_New(1+1); 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);
-      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 = 4124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_13 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+      __pyx_t_14 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __pyx_r = __pyx_t_1;
+    __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[0]; __pyx_lineno = 4996; __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[0]; __pyx_lineno = 4996; __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[0]; __pyx_lineno = 4996; __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[0]; __pyx_lineno = 4996; __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[0]; __pyx_lineno = 4996; __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;
+
+      /* "netCDF4/_netCDF4.pyx":4997
+ *             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[0]; __pyx_lineno = 4997; __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[0]; __pyx_lineno = 4997; __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[0]; __pyx_lineno = 4997; __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[0]; __pyx_lineno = 4997; __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[0]; __pyx_lineno = 4997; __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[0]; __pyx_lineno = 4997; __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[0]; __pyx_lineno = 4997; __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[0]; __pyx_lineno = 4997; __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;
+
+      /* "netCDF4/_netCDF4.pyx":4998
+ *             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[0]; __pyx_lineno = 4998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+      /* "netCDF4/_netCDF4.pyx":4996
+ *             # 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;
+
+    /* "netCDF4/_netCDF4.pyx":5002
+ *             # 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[0]; __pyx_lineno = 5002; __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;
-    goto __pyx_L0;
-  }
 
-  /* "netCDF4.pyx":4120
- *             self.name = dtype_name
- * 
- *     def __repr__(self):             # <<<<<<<<<<<<<<
- *         if python3:
- *            return self.__unicode__()
+    /* "netCDF4/_netCDF4.pyx":5003
+ *             # 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;
+
+    /* "netCDF4/_netCDF4.pyx":5004
+ *             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[0]; __pyx_lineno = 5004; __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 = 5004; __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 = 5004; __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[0]; __pyx_lineno = 5004; __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[0]; __pyx_lineno = 5004; __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[0]; __pyx_lineno = 5004; __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[0]; __pyx_lineno = 5004; __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[0]; __pyx_lineno = 5004; __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[0]; __pyx_lineno = 5004; __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[0]; __pyx_lineno = 5004; __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/_netCDF4.pyx":5006
+ *             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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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 = 5006; __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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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[0]; __pyx_lineno = 5006; __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;
+
+      /* "netCDF4/_netCDF4.pyx":5007
+ *                 # 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) {
+
+        /* "netCDF4/_netCDF4.pyx":5009
+ *                 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[0]; __pyx_lineno = 5009; __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[0]; __pyx_lineno = 5009; __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[0]; __pyx_lineno = 5009; __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[0]; __pyx_lineno = 5009; __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[0]; __pyx_lineno = 5009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+
+        /* "netCDF4/_netCDF4.pyx":5012
+ *                     # 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_8_netCDF4_Variable)), __pyx_n_s_getitem); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5012; __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[0]; __pyx_lineno = 5012; __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[0]; __pyx_lineno = 5012; __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[0]; __pyx_lineno = 5012; __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[0]; __pyx_lineno = 5012; __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[0]; __pyx_lineno = 5012; __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;
+
+        /* "netCDF4/_netCDF4.pyx":5013
+ *                     # 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[0]; __pyx_lineno = 5013; __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[0]; __pyx_lineno = 5013; __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[0]; __pyx_lineno = 5013; __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[0]; __pyx_lineno = 5013; __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[0]; __pyx_lineno = 5013; __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[0]; __pyx_lineno = 5013; __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) {
+
+          /* "netCDF4/_netCDF4.pyx":5014
+ *                     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;
 
-  /* 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":4126
- *            return unicode(self).encode(default_encoding)
- * 
- *     def __unicode__(self):             # <<<<<<<<<<<<<<
- *         if self.dtype == str:
- *             return repr(type(self))+': string type'
+          /* "netCDF4/_netCDF4.pyx":5015
+ *                     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[0]; __pyx_lineno = 5015; __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:;
 
-/* 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/_netCDF4.pyx":5016
+ *                         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[0]; __pyx_lineno = 5016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        goto __pyx_L36;
+      }
+      __pyx_L36:;
 
-  /* "netCDF4.pyx":4127
- * 
- *     def __unicode__(self):
- *         if self.dtype == str:             # <<<<<<<<<<<<<<
- *             return repr(type(self))+': string type'
- *         else:
+      /* "netCDF4/_netCDF4.pyx":5004
+ *             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 = 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 = 4127; __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 = 4127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
+    }
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
-    /* "netCDF4.pyx":4128
- *     def __unicode__(self):
- *         if self.dtype == str:
- *             return repr(type(self))+': string type'             # <<<<<<<<<<<<<<
- *         else:
- *             return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
+    /* "netCDF4/_netCDF4.pyx":5017
+ *                         fill_value = dat.fill_value
+ *                     lstArr.append(dat)
+ *             if ismasked:             # <<<<<<<<<<<<<<
+ *                 lstArr = ma.concatenate(lstArr)
+ *             else:
  */
-    __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 = 4128; __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 = 4128; __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*/ {
+    __pyx_t_10 = (__pyx_v_ismasked != 0);
+    if (__pyx_t_10) {
 
-    /* "netCDF4.pyx":4130
- *             return repr(type(self))+': string type'
- *         else:
- *             return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\             # <<<<<<<<<<<<<<
- *             (self.name, self.dtype)
- * 
+      /* "netCDF4/_netCDF4.pyx":5018
+ *                     lstArr.append(dat)
+ *             if ismasked:
+ *                 lstArr = ma.concatenate(lstArr)             # <<<<<<<<<<<<<<
+ *             else:
+ *                 lstArr = numpy.concatenate(lstArr)
  */
-    __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 = 4130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
+      __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5018; __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[0]; __pyx_lineno = 5018; __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[0]; __pyx_lineno = 5018; __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 = 5018; __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[0]; __pyx_lineno = 5018; __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*/ {
 
-    /* "netCDF4.pyx":4131
- *         else:
- *             return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
- *             (self.name, self.dtype)             # <<<<<<<<<<<<<<
- * 
- * cdef _def_vlen(grp, object dt, object dtype_name):
+      /* "netCDF4/_netCDF4.pyx":5020
+ *                 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_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4131; __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);
+      __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5020; __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[0]; __pyx_lineno = 5020; __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[0]; __pyx_lineno = 5020; __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[0]; __pyx_lineno = 5020; __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[0]; __pyx_lineno = 5020; __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:;
 
-    /* "netCDF4.pyx":4130
- *             return repr(type(self))+': string type'
- *         else:
- *             return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\             # <<<<<<<<<<<<<<
- *             (self.name, self.dtype)
- * 
+    /* "netCDF4/_netCDF4.pyx":5021
+ *             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_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 = 4130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5021; __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 = 4130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+    __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[0]; __pyx_lineno = 5021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    __pyx_r = __pyx_t_1;
-    __pyx_t_1 = 0;
-    goto __pyx_L0;
-  }
+    __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[0]; __pyx_lineno = 5021; __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[0]; __pyx_lineno = 5021; __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[0]; __pyx_lineno = 5021; __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[0]; __pyx_lineno = 5021; __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[0]; __pyx_lineno = 5021; __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[0]; __pyx_lineno = 5021; __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:;
 
-  /* "netCDF4.pyx":4126
- *            return unicode(self).encode(default_encoding)
- * 
- *     def __unicode__(self):             # <<<<<<<<<<<<<<
- *         if self.dtype == str:
- *             return repr(type(self))+': string type'
+    /* "netCDF4/_netCDF4.pyx":5025
+ *             # 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:*/ {
 
-  /* 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":4105
- * @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):
+        /* "netCDF4/_netCDF4.pyx":5026
+ *             # 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[0]; __pyx_lineno = 5026; __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[0]; __pyx_lineno = 5026; __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[0]; __pyx_lineno = 5026; __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[0]; __pyx_lineno = 5026; __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[0]; __pyx_lineno = 5026; __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;
 
-/* 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 = 4105; __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 = 4105; __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":4106
- * """
- *     cdef public nc_type _nc_type
- *     cdef public dtype, name             # <<<<<<<<<<<<<<
- *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
- *         cdef nc_type xtype
+      /* "netCDF4/_netCDF4.pyx":5027
+ *             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._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[0]; __pyx_lineno = 5027; __pyx_clineno = __LINE__; goto __pyx_L44_except_error;}
+        __Pyx_GOTREF(__pyx_t_12);
+        __Pyx_GOTREF(__pyx_t_1);
+        __Pyx_GOTREF(__pyx_t_2);
 
-/* 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;
-}
+        /* "netCDF4/_netCDF4.pyx":5028
+ *                 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[0]; __pyx_lineno = 5028; __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[0]; __pyx_lineno = 5028; __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:;
+    }
 
-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;
+    /* "netCDF4/_netCDF4.pyx":4967
+ *         # 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;
 
-  /* function exit code */
-  __pyx_r = 0;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+  /* "netCDF4/_netCDF4.pyx":5031
+ * 
+ *         # 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[0]; __pyx_lineno = 5031; __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[0]; __pyx_lineno = 5031; __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;
 
-/* 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));
+  /* "netCDF4/_netCDF4.pyx":5034
+ * 
+ *         # 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[0]; __pyx_lineno = 5034; __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[0]; __pyx_lineno = 5034; __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[0]; __pyx_lineno = 5034; __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[0]; __pyx_lineno = 5034; __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[0]; __pyx_lineno = 5034; __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[0]; __pyx_lineno = 5034; __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[0]; __pyx_lineno = 5034; __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[0]; __pyx_lineno = 5034; __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[0]; __pyx_lineno = 5034; __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[0]; __pyx_lineno = 5034; __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[0]; __pyx_lineno = 5034; __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) {
 
-  /* function exit code */
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
+    /* "netCDF4/_netCDF4.pyx":5035
+ *         # 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[0]; __pyx_lineno = 5035; __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[0]; __pyx_lineno = 5035; __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[0]; __pyx_lineno = 5035; __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:;
 
-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);
+  /* "netCDF4/_netCDF4.pyx":5037
+ *             data = data.filled()
+ * 
+ *         return data             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
   __Pyx_XDECREF(__pyx_r);
-  __Pyx_INCREF(__pyx_v_self->name);
-  __pyx_r = __pyx_v_self->name;
+  __Pyx_INCREF(__pyx_v_data);
+  __pyx_r = __pyx_v_data;
   goto __pyx_L0;
 
+  /* "netCDF4/_netCDF4.pyx":4936
+ *         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._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;
 }
 
-/* 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;
-}
+/* "netCDF4/_netCDF4.pyx":5076
+ *     """
+ * 
+ *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
+ *         """
+ * Create a time Variable with units consistent across a multifile
+ */
 
 /* 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;
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6MFTime_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7netCDF4_8_netCDF4_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_8_netCDF4_6MFTime_1__init__ = {"__init__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_6MFTime_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_6MFTime___init__};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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("__del__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_7netCDF4_6VLType_4name_4__del__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));
-
-  /* function exit code */
+  __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[0]; __pyx_lineno = 5076; __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[0]; __pyx_lineno = 5076; __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[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.MFTime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __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;
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_6MFTime___init__(__pyx_self, __pyx_v_self, __pyx_v_time, __pyx_v_units);
 
   /* function exit code */
-  __pyx_r = 0;
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "netCDF4.pyx":4133
- *             (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;
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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;
-  int __pyx_t_2;
-  char *__pyx_t_3;
-  PyObject *__pyx_t_4 = NULL;
-  PyObject *__pyx_t_5 = 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;
-  nc_type __pyx_t_8;
+  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("_def_vlen", 0);
-  __Pyx_INCREF(__pyx_v_dt);
-
-  /* "netCDF4.pyx":4142
- *     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 = 4142; __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 = 4142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
-
-    /* "netCDF4.pyx":4143
- *     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*/ {
+  __Pyx_RefNannySetupContext("__init__", 0);
 
-    /* "netCDF4.pyx":4146
- *         # dtype_name ignored
- *     else: # numpy datatype
- *         bytestr = _strencode(dtype_name)             # <<<<<<<<<<<<<<
- *         namstring = bytestr
- *         dt = numpy.dtype(dt) # convert to numpy datatype.
+  /* "netCDF4/_netCDF4.pyx":5086
+ * the units from the master variable.
+ *         """
+ *         import datetime             # <<<<<<<<<<<<<<
+ *         self.__time = time
+ * 
  */
-    __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_dtype_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __pyx_v_bytestr = __pyx_t_1;
-    __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_datetime, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_datetime = __pyx_t_1;
+  __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":4147
- *     else: # numpy datatype
- *         bytestr = _strencode(dtype_name)
- *         namstring = bytestr             # <<<<<<<<<<<<<<
- *         dt = numpy.dtype(dt) # convert to numpy datatype.
- *         if dt.str[1:] in _supportedtypes:
+  /* "netCDF4/_netCDF4.pyx":5087
+ *         """
+ *         import datetime
+ *         self.__time = time             # <<<<<<<<<<<<<<
+ * 
+ *         # copy attributes from master time variable.
  */
-    __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_namstring = __pyx_t_3;
+  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__time, __pyx_v_time) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-    /* "netCDF4.pyx":4148
- *         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
+  /* "netCDF4/_netCDF4.pyx":5090
+ * 
+ *         # copy attributes from master time variable.
+ *         for name, value in time.__dict__.items():             # <<<<<<<<<<<<<<
+ *             self.__dict__[name] = value
+ * 
  */
-    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4148; __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 = 4148; __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);
-      }
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5090; __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 = 5090; __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_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 = 4148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
+  }
+  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 = 5090; __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 = 5090; __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 = 5090; __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 = 5090; __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 = 5090; __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 = 5090; __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 = 5090; __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 = 5090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
+      }
     } else {
-      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4148; __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 = 4148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __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 = 5090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        }
+        break;
+      }
       __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":4149
- *         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 = 4149; __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__110, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4149; __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 = 4149; __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 = 4149; __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":4152
- *             # 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 = 4152; __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 = 4152; __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__111, 1, 0, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    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 = 5090; __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 = 5090; __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 = 5090; __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 = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-      __Pyx_GOTREF(__pyx_t_5);
+      #endif
       __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 = 4152; __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":4153
- *             # 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 = 4153; __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 = 4153; __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));
+    } 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 = 5090; __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 = 5090; __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 = 5090; __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;
 
-      /* "netCDF4.pyx":4154
- *             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:
+    /* "netCDF4/_netCDF4.pyx":5091
+ *         # 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_7 = ((__pyx_v_ierr != NC_NOERR) != 0);
-      if (__pyx_t_7) {
+    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5091; __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 = 5091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-        /* "netCDF4.pyx":4155
- *             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")
+    /* "netCDF4/_netCDF4.pyx":5090
+ * 
+ *         # copy attributes from master time variable.
+ *         for name, value in time.__dict__.items():             # <<<<<<<<<<<<<<
+ *             self.__dict__[name] = value
+ * 
  */
-        __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 = 4155; __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 = 4155; __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 = 4155; __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 = 4155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      }
-      goto __pyx_L4;
-    }
-    /*else*/ {
+  }
+  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-      /* "netCDF4.pyx":4157
- *                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         else:
- *             raise KeyError("unsupported datatype specified for VLEN")             # <<<<<<<<<<<<<<
- *     return xtype, dt
+  /* "netCDF4/_netCDF4.pyx":5094
  * 
+ *         # 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_5 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4157; __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 = 4157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
-    __pyx_L4:;
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5094; __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[0]; __pyx_lineno = 5094; __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 = 5094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_L3:;
+  __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[0]; __pyx_lineno = 5094; __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[0]; __pyx_lineno = 5094; __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[0]; __pyx_lineno = 5094; __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[0]; __pyx_lineno = 5094; __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[0]; __pyx_lineno = 5094; __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;
 
-  /* "netCDF4.pyx":4158
- *         else:
- *             raise KeyError("unsupported datatype specified for VLEN")
- *     return xtype, dt             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":5095
+ *         # 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')
  * 
- * cdef _read_vlen(group, nc_type xtype, endian=None):
  */
-  __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 = 4158; __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 = 4158; __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;
+    __pyx_t_9 = PyObject_HasAttr(__pyx_v_t, __pyx_n_s_calendar); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = ((!(__pyx_t_9 != 0)) != 0);
+    if (__pyx_t_10) {
 
-  /* "netCDF4.pyx":4133
- *             (self.name, self.dtype)
+      /* "netCDF4/_netCDF4.pyx":5096
+ *         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')             # <<<<<<<<<<<<<<
  * 
- * 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__.
+ *         # Check that calendar is the same in all files.
  */
+      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5096; __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 = 5096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    }
 
-  /* 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":4160
- *     return xtype, dt
+    /* "netCDF4/_netCDF4.pyx":5094
  * 
- * cdef _read_vlen(group, nc_type xtype, endian=None):             # <<<<<<<<<<<<<<
- *     # read a VLEN data type id from an existing file,
- *     # construct a corresponding numpy dtype instance,
+ *         # 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')
  */
-
-static PyObject *__pyx_f_7netCDF4__read_vlen(PyObject *__pyx_v_group, nc_type __pyx_v_xtype, struct __pyx_opt_args_7netCDF4__read_vlen *__pyx_optional_args) {
-  PyObject *__pyx_v_endian = ((PyObject *)Py_None);
-  int __pyx_v_ierr;
-  int __pyx_v__grpid;
-  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_v_datatype = 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;
-  PyObject *__pyx_t_11 = NULL;
-  PyObject *__pyx_t_12 = NULL;
-  PyObject *__pyx_t_13 = NULL;
-  int __pyx_t_14;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_RefNannySetupContext("_read_vlen", 0);
-  if (__pyx_optional_args) {
-    if (__pyx_optional_args->__pyx_n > 0) {
-      __pyx_v_endian = __pyx_optional_args->endian;
-    }
   }
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":4169
- *     cdef nc_type base_xtype
- *     cdef char vl_namstring[NC_MAX_NAME+1]
- *     _grpid = group._grpid             # <<<<<<<<<<<<<<
- *     if xtype == NC_STRING:
- *         dt = str
+  /* "netCDF4/_netCDF4.pyx":5099
+ * 
+ *         # 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 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5099; __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 = 4169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5099; __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[0]; __pyx_lineno = 5099; __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[0]; __pyx_lineno = 5099; __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[0]; __pyx_lineno = 5099; __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[0]; __pyx_lineno = 5099; __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[0]; __pyx_lineno = 5099; __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[0]; __pyx_lineno = 5099; __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[0]; __pyx_lineno = 5099; __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[0]; __pyx_lineno = 5099; __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[0]; __pyx_lineno = 5099; __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[0]; __pyx_lineno = 5099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v__grpid = __pyx_t_2;
-
-  /* "netCDF4.pyx":4170
- *     cdef char vl_namstring[NC_MAX_NAME+1]
- *     _grpid = group._grpid
- *     if xtype == NC_STRING:             # <<<<<<<<<<<<<<
- *         dt = str
- *         name = None
- */
-  __pyx_t_3 = ((__pyx_v_xtype == NC_STRING) != 0);
-  if (__pyx_t_3) {
-
-    /* "netCDF4.pyx":4171
- *     _grpid = group._grpid
- *     if xtype == NC_STRING:
- *         dt = str             # <<<<<<<<<<<<<<
- *         name = None
- *     else:
- */
-    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
-    __pyx_v_dt = ((PyObject *)((PyObject*)(&PyString_Type)));
+  __pyx_t_4 = PySet_Size(__pyx_t_6); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5099; __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) {
 
-    /* "netCDF4.pyx":4172
- *     if xtype == NC_STRING:
- *         dt = str
- *         name = None             # <<<<<<<<<<<<<<
- *     else:
- *         with nogil:
+    /* "netCDF4/_netCDF4.pyx":5100
+ *         # 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_INCREF(Py_None);
-    __pyx_v_name = Py_None;
-    goto __pyx_L3;
+    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5100; __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 = 5100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  /*else*/ {
 
-    /* "netCDF4.pyx":4174
- *         name = None
- *     else:
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype)
- *         if ierr != NC_NOERR:
+  /* "netCDF4/_netCDF4.pyx":5103
+ * 
+ *         # Override units if units is specified.
+ *         self.units = units or time.units             # <<<<<<<<<<<<<<
+ * 
+ *         # Reference date to compute the difference between different time units.
  */
-    {
-        #ifdef WITH_THREAD
-        PyThreadState *_save;
-        Py_UNBLOCK_THREADS
-        #endif
-        /*try:*/ {
+  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_units); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5103; __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[0]; __pyx_lineno = 5103; __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[0]; __pyx_lineno = 5103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
-          /* "netCDF4.pyx":4175
- *     else:
- *         with nogil:
- *             ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype)             # <<<<<<<<<<<<<<
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+  /* "netCDF4/_netCDF4.pyx":5106
+ * 
+ *         # 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_v_ierr = nc_inq_vlen(__pyx_v__grpid, __pyx_v_xtype, __pyx_v_vl_namstring, (&__pyx_v_vlsize), (&__pyx_v_base_xtype));
-        }
+  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetime, __pyx_n_s_datetime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_6);
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__116, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5106; __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;
 
-        /* "netCDF4.pyx":4174
- *         name = None
- *     else:
- *         with nogil:             # <<<<<<<<<<<<<<
- *             ierr = nc_inq_vlen(_grpid, xtype, vl_namstring, &vlsize, &base_xtype)
- *         if ierr != NC_NOERR:
+  /* "netCDF4/_netCDF4.pyx":5107
+ *         # 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)
  */
-        /*finally:*/ {
-          /*normal exit:*/{
-            #ifdef WITH_THREAD
-            Py_BLOCK_THREADS
-            #endif
-            goto __pyx_L6;
-          }
-          __pyx_L6:;
-        }
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5107; __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[0]; __pyx_lineno = 5107; __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[0]; __pyx_lineno = 5107; __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[0]; __pyx_lineno = 5107; __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[0]; __pyx_lineno = 5107; __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;
 
-    /* "netCDF4.pyx":4176
- *         with nogil:
- *             ierr = nc_inq_vlen(_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)
+  /* "netCDF4/_netCDF4.pyx":5111
+ *         # 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_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
-    if (__pyx_t_3) {
+  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5111; __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 = 5111; __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[0]; __pyx_lineno = 5111; __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[0]; __pyx_lineno = 5111; __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[0]; __pyx_lineno = 5111; __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[0]; __pyx_lineno = 5111; __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[0]; __pyx_lineno = 5111; __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[0]; __pyx_lineno = 5111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-      /* "netCDF4.pyx":4177
- *             ierr = nc_inq_vlen(_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:
+  /* "netCDF4/_netCDF4.pyx":5113
+ *         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_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 = 4177; __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 = 4177; __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 = 4177; __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 = 4177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    }
+  __Pyx_INCREF(__pyx_int_0);
+  __pyx_v_i0 = __pyx_int_0;
+  __Pyx_INCREF(__pyx_int_0);
+  __pyx_v_i1 = __pyx_int_0;
 
-    /* "netCDF4.pyx":4178
- *         if ierr != NC_NOERR:
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         name = vl_namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
- *         try:
- *             datatype = _nctonptype[base_xtype]
+  /* "netCDF4/_netCDF4.pyx":5114
+ * 
+ *         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_t_5 = __Pyx_PyObject_FromString(__pyx_v_vl_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4178; __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 = 4178; __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 = 4178; __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 = 4178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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[0]; __pyx_lineno = 5114; __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[0]; __pyx_lineno = 5114; __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_5 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5114; __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[0]; __pyx_lineno = 5114; __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[0]; __pyx_lineno = 5114; __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[0]; __pyx_lineno = 5114; __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[0]; __pyx_lineno = 5114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        #endif
       }
-    }
-    __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4178; __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 = 4178; __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":4179
- *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
- *         name = vl_namstring.decode(default_encoding,unicode_error)
- *         try:             # <<<<<<<<<<<<<<
- *             datatype = _nctonptype[base_xtype]
- *             if endian is not None: datatype = endian + datatype
- */
-    {
-      __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:*/ {
+    } 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[0]; __pyx_lineno = 5114; __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[0]; __pyx_lineno = 5114; __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;
 
-        /* "netCDF4.pyx":4180
- *         name = vl_namstring.decode(default_encoding,unicode_error)
- *         try:
- *             datatype = _nctonptype[base_xtype]             # <<<<<<<<<<<<<<
- *             if endian is not None: datatype = endian + datatype
- *             dt = numpy.dtype(datatype) # see if it is a primitive type
+    /* "netCDF4/_netCDF4.pyx":5115
+ *         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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4180; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_base_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 = 4180; __pyx_clineno = __LINE__; goto __pyx_L8_error;};
-        __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __pyx_v_datatype = __pyx_t_6;
-        __pyx_t_6 = 0;
+    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5115; __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[0]; __pyx_lineno = 5115; __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;
 
-        /* "netCDF4.pyx":4181
- *         try:
- *             datatype = _nctonptype[base_xtype]
- *             if endian is not None: datatype = endian + datatype             # <<<<<<<<<<<<<<
- *             dt = numpy.dtype(datatype) # see if it is a primitive type
- *         except KeyError:
+    /* "netCDF4/_netCDF4.pyx":5116
+ *         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_3 = (__pyx_v_endian != Py_None);
-        __pyx_t_14 = (__pyx_t_3 != 0);
-        if (__pyx_t_14) {
-          __pyx_t_6 = PyNumber_Add(__pyx_v_endian, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4181; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-          __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_6);
-          __pyx_t_6 = 0;
-          goto __pyx_L16;
-        }
-        __pyx_L16:;
+    __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5116; __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[0]; __pyx_lineno = 5116; __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[0]; __pyx_lineno = 5116; __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[0]; __pyx_lineno = 5116; __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[0]; __pyx_lineno = 5116; __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;
 
-        /* "netCDF4.pyx":4182
- *             datatype = _nctonptype[base_xtype]
- *             if endian is not None: datatype = endian + datatype
- *             dt = numpy.dtype(datatype) # see if it is a primitive type             # <<<<<<<<<<<<<<
- *         except KeyError:
- *             raise KeyError("unsupported component type for VLEN")
+    /* "netCDF4/_netCDF4.pyx":5117
+ *             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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4182; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
-        __Pyx_GOTREF(__pyx_t_1);
-        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4182; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-        __pyx_t_1 = NULL;
-        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);
-          }
-        }
-        if (!__pyx_t_1) {
-          __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_datatype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4182; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-        } else {
-          __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4182; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
-          __Pyx_GOTREF(__pyx_t_7);
-          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = NULL;
-          __Pyx_INCREF(__pyx_v_datatype);
-          PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_datatype);
-          __Pyx_GIVEREF(__pyx_v_datatype);
-          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4182; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
-          __Pyx_GOTREF(__pyx_t_6);
-          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-        }
-        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-        __pyx_v_dt = __pyx_t_6;
-        __pyx_t_6 = 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_L15_try_end;
-      __pyx_L8_error:;
-      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
-      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i1, __pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5117; __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;
 
-      /* "netCDF4.pyx":4183
- *             if endian is not None: datatype = endian + datatype
- *             dt = numpy.dtype(datatype) # see if it is a primitive type
- *         except KeyError:             # <<<<<<<<<<<<<<
- *             raise KeyError("unsupported component type for VLEN")
- *     return VLType(group, dt, name, typeid=xtype)
+    /* "netCDF4/_netCDF4.pyx":5118
+ *             num = date2num(ref_date, v.units, self.calendar)
+ *             i1 += n
+ *             self.__delta[i0:i1] = ref_num - num             # <<<<<<<<<<<<<<
+ *             i0 += n
+ * 
  */
-      __pyx_t_2 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
-      if (__pyx_t_2) {
-        __Pyx_AddTraceback("netCDF4._read_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
-        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4183; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
-        __Pyx_GOTREF(__pyx_t_6);
-        __Pyx_GOTREF(__pyx_t_10);
-        __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_2 = PyNumber_Subtract(__pyx_v_ref_num, __pyx_v_num); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5118; __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[0]; __pyx_lineno = 5118; __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[0]; __pyx_lineno = 5118; __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;
 
-        /* "netCDF4.pyx":4184
- *             dt = numpy.dtype(datatype) # see if it is a primitive type
- *         except KeyError:
- *             raise KeyError("unsupported component type for VLEN")             # <<<<<<<<<<<<<<
- *     return VLType(group, dt, name, typeid=xtype)
+    /* "netCDF4/_netCDF4.pyx":5119
+ *             i1 += n
+ *             self.__delta[i0:i1] = ref_num - num
+ *             i0 += n             # <<<<<<<<<<<<<<
+ * 
  * 
  */
-        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L10_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 = 4184; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
-      }
-      goto __pyx_L10_except_error;
-      __pyx_L10_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_L15_try_end:;
-    }
-  }
-  __pyx_L3:;
+    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i0, __pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5119; __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;
 
-  /* "netCDF4.pyx":4185
- *         except KeyError:
- *             raise KeyError("unsupported component type for VLEN")
- *     return VLType(group, dt, name, typeid=xtype)             # <<<<<<<<<<<<<<
+    /* "netCDF4/_netCDF4.pyx":5114
  * 
- * cdef _strencode(pystr,encoding=None):
+ *         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_XDECREF(__pyx_r);
-  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __Pyx_INCREF(__pyx_v_group);
-  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_group);
-  __Pyx_GIVEREF(__pyx_v_group);
-  __Pyx_INCREF(__pyx_v_dt);
-  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_dt);
-  __Pyx_GIVEREF(__pyx_v_dt);
-  __Pyx_INCREF(__pyx_v_name);
-  PyTuple_SET_ITEM(__pyx_t_7, 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 = 4185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_10);
-  __pyx_t_6 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_6);
-  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_typeid, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_VLType)), __pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4185; __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_10); __pyx_t_10 = 0;
-  __pyx_r = __pyx_t_6;
-  __pyx_t_6 = 0;
-  goto __pyx_L0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":4160
- *     return xtype, dt
+  /* "netCDF4/_netCDF4.pyx":5076
+ *     """
  * 
- * cdef _read_vlen(group, nc_type xtype, endian=None):             # <<<<<<<<<<<<<<
- *     # read a VLEN data type id from an existing file,
- *     # construct a corresponding numpy dtype instance,
+ *     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_5);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
   __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_XDECREF(__pyx_t_11);
+  __Pyx_XDECREF(__pyx_t_12);
+  __Pyx_XDECREF(__pyx_t_14);
+  __Pyx_AddTraceback("netCDF4._netCDF4.MFTime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_dt);
+  __Pyx_XDECREF(__pyx_v_datetime);
   __Pyx_XDECREF(__pyx_v_name);
-  __Pyx_XDECREF(__pyx_v_datatype);
+  __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;
 }
 
-/* "netCDF4.pyx":4187
- *     return VLType(group, dt, name, typeid=xtype)
+/* "netCDF4/_netCDF4.pyx":5122
  * 
- * cdef _strencode(pystr,encoding=None):             # <<<<<<<<<<<<<<
- *     # encode a string into bytes.  If already bytes, do nothing.
- *     # uses default_encoding module variable for default encoding.
+ * 
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         return self.__time[elem] + self.__delta[elem]
  */
 
-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;
+/* Python wrapper */
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_6MFTime_3__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_7netCDF4_8_netCDF4_6MFTime_3__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_6MFTime_3__getitem__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_7netCDF4_8_netCDF4_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;
-  __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":4190
- *     # 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":4191
- *     # 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 = 4191; __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":4192
- *     if encoding is None:
- *         encoding = default_encoding
- *     try:             # <<<<<<<<<<<<<<
- *         return pystr.encode(encoding)
- *     except (AttributeError, UnicodeDecodeError):
- */
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
   {
-    __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":4193
- *         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 = 4193; __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);
+    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[0]; __pyx_lineno = 5122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
-      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 = 4193; __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 = 4193; __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 = 4193; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
-        __Pyx_GOTREF(__pyx_t_3);
-        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+      if (unlikely(kw_args > 0)) {
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
-      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-      __pyx_r = __pyx_t_3;
-      __pyx_t_3 = 0;
-      goto __pyx_L8_try_return;
+    } 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_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;
+    __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[0]; __pyx_lineno = 5122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("netCDF4._netCDF4.MFTime.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_7netCDF4_8_netCDF4_6MFTime_2__getitem__(__pyx_self, __pyx_v_self, __pyx_v_elem);
 
-    /* "netCDF4.pyx":4194
- *     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 = 4194; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_GOTREF(__pyx_t_7);
-      __Pyx_GOTREF(__pyx_t_9);
+  /* function exit code */
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
 
-      /* "netCDF4.pyx":4195
- *         return pystr.encode(encoding)
- *     except (AttributeError, UnicodeDecodeError):
- *         return pystr # already bytes or unicode?             # <<<<<<<<<<<<<<
+static PyObject *__pyx_pf_7netCDF4_8_netCDF4_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);
+
+  /* "netCDF4/_netCDF4.pyx":5123
+ * 
+ *     def __getitem__(self, elem):
+ *         return self.__time[elem] + self.__delta[elem]             # <<<<<<<<<<<<<<
  */
-      __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;
-  }
+  __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[0]; __pyx_lineno = 5123; __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[0]; __pyx_lineno = 5123; __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[0]; __pyx_lineno = 5123; __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[0]; __pyx_lineno = 5123; __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[0]; __pyx_lineno = 5123; __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;
 
-  /* "netCDF4.pyx":4187
- *     return VLType(group, dt, name, typeid=xtype)
+  /* "netCDF4/_netCDF4.pyx":5122
  * 
- * cdef _strencode(pystr,encoding=None):             # <<<<<<<<<<<<<<
- *     # encode a string into bytes.  If already bytes, do nothing.
- *     # uses default_encoding module variable for default encoding.
+ * 
+ *     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_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_AddTraceback("netCDF4._netCDF4.MFTime.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
   __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;
+static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_Dataset(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *p;
   PyObject *o;
   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
     o = (*t->tp_alloc)(t, 0);
@@ -59403,7 +60425,7 @@ static PyObject *__pyx_tp_new_7netCDF4_Dataset(PyTypeObject *t, CYTHON_UNUSED Py
     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   }
   if (unlikely(!o)) return 0;
-  p = ((struct __pyx_obj_7netCDF4_Dataset *)o);
+  p = ((struct __pyx_obj_7netCDF4_8_netCDF4_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);
@@ -59415,11 +60437,12 @@ static PyObject *__pyx_tp_new_7netCDF4_Dataset(PyTypeObject *t, CYTHON_UNUSED Py
   p->cmptypes = Py_None; Py_INCREF(Py_None);
   p->vltypes = Py_None; Py_INCREF(Py_None);
   p->keepweakref = Py_None; Py_INCREF(Py_None);
+  p->__orthogonal_indexing__ = 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;
+static void __pyx_tp_dealloc_7netCDF4_8_netCDF4_Dataset(PyObject *o) {
+  struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *p = (struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)o;
   #if PY_VERSION_HEX >= 0x030400a1
   if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
     if (PyObject_CallFinalizerFromDealloc(o)) return;
@@ -59430,7 +60453,7 @@ static void __pyx_tp_dealloc_7netCDF4_Dataset(PyObject *o) {
     PyObject *etype, *eval, *etb;
     PyErr_Fetch(&etype, &eval, &etb);
     ++Py_REFCNT(o);
-    __pyx_pw_7netCDF4_7Dataset_15__dealloc__(o);
+    __pyx_pw_7netCDF4_8_netCDF4_7Dataset_17__dealloc__(o);
     --Py_REFCNT(o);
     PyErr_Restore(etype, eval, etb);
   }
@@ -59446,12 +60469,13 @@ static void __pyx_tp_dealloc_7netCDF4_Dataset(PyObject *o) {
   Py_CLEAR(p->cmptypes);
   Py_CLEAR(p->vltypes);
   Py_CLEAR(p->keepweakref);
+  Py_CLEAR(p->__orthogonal_indexing__);
   (*Py_TYPE(o)->tp_free)(o);
 }
 
-static int __pyx_tp_traverse_7netCDF4_Dataset(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_7netCDF4_8_netCDF4_Dataset(PyObject *o, visitproc v, void *a) {
   int e;
-  struct __pyx_obj_7netCDF4_Dataset *p = (struct __pyx_obj_7netCDF4_Dataset *)o;
+  struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *p = (struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)o;
   if (p->groups) {
     e = (*v)(p->groups, a); if (e) return e;
   }
@@ -59485,12 +60509,15 @@ static int __pyx_tp_traverse_7netCDF4_Dataset(PyObject *o, visitproc v, void *a)
   if (p->keepweakref) {
     e = (*v)(p->keepweakref, a); if (e) return e;
   }
+  if (p->__orthogonal_indexing__) {
+    e = (*v)(p->__orthogonal_indexing__, a); if (e) return e;
+  }
   return 0;
 }
 
-static int __pyx_tp_clear_7netCDF4_Dataset(PyObject *o) {
+static int __pyx_tp_clear_7netCDF4_8_netCDF4_Dataset(PyObject *o) {
   PyObject* tmp;
-  struct __pyx_obj_7netCDF4_Dataset *p = (struct __pyx_obj_7netCDF4_Dataset *)o;
+  struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *p = (struct __pyx_obj_7netCDF4_8_netCDF4_Dataset *)o;
   tmp = ((PyObject*)p->groups);
   p->groups = Py_None; Py_INCREF(Py_None);
   Py_XDECREF(tmp);
@@ -59524,34 +60551,44 @@ static int __pyx_tp_clear_7netCDF4_Dataset(PyObject *o) {
   tmp = ((PyObject*)p->keepweakref);
   p->keepweakref = Py_None; Py_INCREF(Py_None);
   Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__orthogonal_indexing__);
+  p->__orthogonal_indexing__ = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
   return 0;
 }
+static PyObject *__pyx_sq_item_7netCDF4_8_netCDF4_Dataset(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 PyObject *__pyx_tp_getattro_7netCDF4_Dataset(PyObject *o, PyObject *n) {
+static PyObject *__pyx_tp_getattro_7netCDF4_8_netCDF4_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);
+    v = __pyx_pw_7netCDF4_8_netCDF4_7Dataset_57__getattr__(o, n);
   }
   return v;
 }
 
-static int __pyx_tp_setattro_7netCDF4_Dataset(PyObject *o, PyObject *n, PyObject *v) {
+static int __pyx_tp_setattro_7netCDF4_8_netCDF4_Dataset(PyObject *o, PyObject *n, PyObject *v) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_53__setattr__(o, n, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_55__setattr__(o, n, v);
   }
   else {
-    return __pyx_pw_7netCDF4_7Dataset_49__delattr__(o, n);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_51__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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset__grpid(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6_grpid_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_7Dataset__grpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset__grpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_6_grpid_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6_grpid_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -59559,13 +60596,13 @@ static int __pyx_setprop_7netCDF4_7Dataset__grpid(PyObject *o, PyObject *v, CYTH
   }
 }
 
-static PyObject *__pyx_getprop_7netCDF4_7Dataset__isopen(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_7netCDF4_7Dataset_7_isopen_1__get__(o);
+static PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset__isopen(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_7_isopen_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_7Dataset__isopen(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset__isopen(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_7_isopen_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_7_isopen_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -59573,204 +60610,237 @@ static int __pyx_setprop_7netCDF4_7Dataset__isopen(PyObject *o, PyObject *v, CYT
   }
 }
 
-static PyObject *__pyx_getprop_7netCDF4_7Dataset_groups(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_7netCDF4_7Dataset_6groups_1__get__(o);
+static PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset_groups(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6groups_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_groups(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6groups_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6groups_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset_dimensions(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_10dimensions_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_7Dataset_groups(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_dimensions(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_6groups_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_10dimensions_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_7Dataset_6groups_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_10dimensions_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset_variables(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_9variables_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_7Dataset_dimensions(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_variables(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_10dimensions_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_9variables_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_7Dataset_10dimensions_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_9variables_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset_disk_format(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11disk_format_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_7Dataset_variables(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_disk_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_9variables_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11disk_format_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_7Dataset_9variables_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11disk_format_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset_path(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_4path_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_7Dataset_disk_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_path(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_11disk_format_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_4path_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_7Dataset_11disk_format_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_4path_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset_parent(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6parent_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_7Dataset_path(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_4path_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6parent_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_7Dataset_4path_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_6parent_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset_file_format(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11file_format_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_7Dataset_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_file_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_6parent_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11file_format_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_7Dataset_6parent_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11file_format_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset_data_model(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_10data_model_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_7Dataset_file_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_data_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_11file_format_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_10data_model_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_7Dataset_11file_format_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_10data_model_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset_cmptypes(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_8cmptypes_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_7Dataset_data_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_cmptypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_10data_model_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_8cmptypes_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_7Dataset_10data_model_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_8cmptypes_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset_vltypes(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_7vltypes_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_7Dataset_cmptypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_vltypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_8cmptypes_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_7vltypes_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_7Dataset_8cmptypes_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_7vltypes_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset_keepweakref(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11keepweakref_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_7Dataset_vltypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_keepweakref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_7vltypes_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11keepweakref_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_7Dataset_7vltypes_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11keepweakref_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_7Dataset___orthogonal_indexing__(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_7Dataset_keepweakref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_7Dataset___orthogonal_indexing__(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_7Dataset_11keepweakref_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___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},
+    return __pyx_pw_7netCDF4_8_netCDF4_7Dataset_23__orthogonal_indexing___5__del__(o);
+  }
+}
+
+static PyMethodDef __pyx_methods_7netCDF4_8_netCDF4_Dataset[] = {
+  {"__enter__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_3__enter__, METH_NOARGS, 0},
+  {"__exit__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_5__exit__, METH_VARARGS|METH_KEYWORDS, 0},
+  {"filepath", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_9filepath, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_8filepath},
+  {"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_13__unicode__, METH_NOARGS, 0},
+  {"close", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_15close, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_14close},
+  {"sync", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_19sync, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_18sync},
+  {"_redef", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_21_redef, METH_NOARGS, 0},
+  {"_enddef", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_23_enddef, METH_NOARGS, 0},
+  {"set_fill_on", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_25set_fill_on, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_24set_fill_on},
+  {"set_fill_off", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_27set_fill_off, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_26set_fill_off},
+  {"createDimension", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_29createDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_28createDimension},
+  {"renameDimension", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_31renameDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_30renameDimension},
+  {"createCompoundType", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_33createCompoundType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_32createCompoundType},
+  {"createVLType", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_35createVLType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_34createVLType},
+  {"createVariable", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_37createVariable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_36createVariable},
+  {"renameVariable", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_39renameVariable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_38renameVariable},
+  {"createGroup", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_41createGroup, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_40createGroup},
+  {"ncattrs", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_43ncattrs, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_42ncattrs},
+  {"setncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45setncattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_44setncattr},
+  {"setncatts", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_47setncatts, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_46setncatts},
+  {"getncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_49getncattr, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_48getncattr},
+  {"delncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_53delncattr, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_52delncattr},
+  {"__getattr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_57__getattr__, METH_O|METH_COEXIST, 0},
+  {"renameAttribute", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_59renameAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_58renameAttribute},
+  {"renameGroup", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_61renameGroup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_60renameGroup},
+  {"set_auto_maskandscale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_63set_auto_maskandscale, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_62set_auto_maskandscale},
+  {"set_auto_mask", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_65set_auto_mask, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_64set_auto_mask},
+  {"set_auto_scale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_7Dataset_67set_auto_scale, METH_O, __pyx_doc_7netCDF4_8_netCDF4_7Dataset_66set_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},
+static struct PyGetSetDef __pyx_getsets_7netCDF4_8_netCDF4_Dataset[] = {
+  {(char *)"_grpid", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset__grpid, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset__grpid, 0, 0},
+  {(char *)"_isopen", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset__isopen, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset__isopen, 0, 0},
+  {(char *)"groups", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset_groups, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_groups, 0, 0},
+  {(char *)"dimensions", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset_dimensions, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_dimensions, 0, 0},
+  {(char *)"variables", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset_variables, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_variables, 0, 0},
+  {(char *)"disk_format", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset_disk_format, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_disk_format, 0, 0},
+  {(char *)"path", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset_path, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_path, 0, 0},
+  {(char *)"parent", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset_parent, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_parent, 0, 0},
+  {(char *)"file_format", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset_file_format, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_file_format, 0, 0},
+  {(char *)"data_model", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset_data_model, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_data_model, 0, 0},
+  {(char *)"cmptypes", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset_cmptypes, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_cmptypes, 0, 0},
+  {(char *)"vltypes", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset_vltypes, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_vltypes, 0, 0},
+  {(char *)"keepweakref", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset_keepweakref, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset_keepweakref, 0, 0},
+  {(char *)"__orthogonal_indexing__", __pyx_getprop_7netCDF4_8_netCDF4_7Dataset___orthogonal_indexing__, __pyx_setprop_7netCDF4_8_netCDF4_7Dataset___orthogonal_indexing__, 0, 0},
   {0, 0, 0, 0, 0}
 };
 
-static PyTypeObject __pyx_type_7netCDF4_Dataset = {
+static PySequenceMethods __pyx_tp_as_sequence_Dataset = {
+  0, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  __pyx_sq_item_7netCDF4_8_netCDF4_Dataset, /*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_Dataset = {
+  0, /*mp_length*/
+  __pyx_pw_7netCDF4_8_netCDF4_7Dataset_7__getitem__, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyTypeObject __pyx_type_7netCDF4_8_netCDF4_Dataset = {
   PyVarObject_HEAD_INIT(0, 0)
-  "netCDF4.Dataset", /*tp_name*/
-  sizeof(struct __pyx_obj_7netCDF4_Dataset), /*tp_basicsize*/
+  "netCDF4._netCDF4.Dataset", /*tp_name*/
+  sizeof(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_7netCDF4_Dataset, /*tp_dealloc*/
+  __pyx_tp_dealloc_7netCDF4_8_netCDF4_Dataset, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -59779,35 +60849,35 @@ static PyTypeObject __pyx_type_7netCDF4_Dataset = {
   #else
   0, /*reserved*/
   #endif
-  __pyx_pw_7netCDF4_7Dataset_9__repr__, /*tp_repr*/
+  __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11__repr__, /*tp_repr*/
   0, /*tp_as_number*/
-  0, /*tp_as_sequence*/
-  0, /*tp_as_mapping*/
+  &__pyx_tp_as_sequence_Dataset, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_Dataset, /*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*/
+  __pyx_tp_getattro_7netCDF4_8_netCDF4_Dataset, /*tp_getattro*/
+  __pyx_tp_setattro_7netCDF4_8_netCDF4_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*/
+  "\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} means  [...]
+  __pyx_tp_traverse_7netCDF4_8_netCDF4_Dataset, /*tp_traverse*/
+  __pyx_tp_clear_7netCDF4_8_netCDF4_Dataset, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
   0, /*tp_iter*/
   0, /*tp_iternext*/
-  __pyx_methods_7netCDF4_Dataset, /*tp_methods*/
+  __pyx_methods_7netCDF4_8_netCDF4_Dataset, /*tp_methods*/
   0, /*tp_members*/
-  __pyx_getsets_7netCDF4_Dataset, /*tp_getset*/
+  __pyx_getsets_7netCDF4_8_netCDF4_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*/
+  __pyx_pw_7netCDF4_8_netCDF4_7Dataset_1__init__, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_7netCDF4_Dataset, /*tp_new*/
+  __pyx_tp_new_7netCDF4_8_netCDF4_Dataset, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -59822,19 +60892,19 @@ static PyTypeObject __pyx_type_7netCDF4_Dataset = {
   #endif
 };
 
-static PyObject *__pyx_tp_new_7netCDF4_Group(PyTypeObject *t, PyObject *a, PyObject *k) {
-  PyObject *o = __pyx_tp_new_7netCDF4_Dataset(t, a, k);
+static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_Group(PyTypeObject *t, PyObject *a, PyObject *k) {
+  PyObject *o = __pyx_tp_new_7netCDF4_8_netCDF4_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_5Group_name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_5Group_4name_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_5Group_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_5Group_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_5Group_4name_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_5Group_4name_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -59842,23 +60912,23 @@ static int __pyx_setprop_7netCDF4_5Group_name(PyObject *o, PyObject *v, CYTHON_U
   }
 }
 
-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},
+static PyMethodDef __pyx_methods_7netCDF4_8_netCDF4_Group[] = {
+  {"close", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_5Group_3close, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_5Group_2close},
+  {"_getname", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_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},
+static struct PyGetSetDef __pyx_getsets_7netCDF4_8_netCDF4_Group[] = {
+  {(char *)"name", __pyx_getprop_7netCDF4_8_netCDF4_5Group_name, __pyx_setprop_7netCDF4_8_netCDF4_5Group_name, __pyx_k_string_name_of_Group_instance, 0},
   {0, 0, 0, 0, 0}
 };
 
-static PyTypeObject __pyx_type_7netCDF4_Group = {
+static PyTypeObject __pyx_type_7netCDF4_8_netCDF4_Group = {
   PyVarObject_HEAD_INIT(0, 0)
-  "netCDF4.Group", /*tp_name*/
-  sizeof(struct __pyx_obj_7netCDF4_Group), /*tp_basicsize*/
+  "netCDF4._netCDF4.Group", /*tp_name*/
+  sizeof(struct __pyx_obj_7netCDF4_8_netCDF4_Group), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_7netCDF4_Dataset, /*tp_dealloc*/
+  __pyx_tp_dealloc_7netCDF4_8_netCDF4_Dataset, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -59868,7 +60938,7 @@ static PyTypeObject __pyx_type_7netCDF4_Group = {
   0, /*reserved*/
   #endif
   #if CYTHON_COMPILING_IN_PYPY
-  __pyx_pw_7netCDF4_7Dataset_9__repr__, /*tp_repr*/
+  __pyx_pw_7netCDF4_8_netCDF4_7Dataset_11__repr__, /*tp_repr*/
   #else
   0, /*tp_repr*/
   #endif
@@ -59882,24 +60952,24 @@ static PyTypeObject __pyx_type_7netCDF4_Group = {
   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*/
+  "\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{Parameters: [...]
+  __pyx_tp_traverse_7netCDF4_8_netCDF4_Dataset, /*tp_traverse*/
+  __pyx_tp_clear_7netCDF4_8_netCDF4_Dataset, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
   0, /*tp_iter*/
   0, /*tp_iternext*/
-  __pyx_methods_7netCDF4_Group, /*tp_methods*/
+  __pyx_methods_7netCDF4_8_netCDF4_Group, /*tp_methods*/
   0, /*tp_members*/
-  __pyx_getsets_7netCDF4_Group, /*tp_getset*/
+  __pyx_getsets_7netCDF4_8_netCDF4_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*/
+  __pyx_pw_7netCDF4_8_netCDF4_5Group_1__init__, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_7netCDF4_Group, /*tp_new*/
+  __pyx_tp_new_7netCDF4_8_netCDF4_Group, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -59914,8 +60984,8 @@ static PyTypeObject __pyx_type_7netCDF4_Group = {
   #endif
 };
 
-static PyObject *__pyx_tp_new_7netCDF4_Dimension(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_7netCDF4_Dimension *p;
+static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_Dimension(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *p;
   PyObject *o;
   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
     o = (*t->tp_alloc)(t, 0);
@@ -59923,15 +60993,15 @@ static PyObject *__pyx_tp_new_7netCDF4_Dimension(PyTypeObject *t, CYTHON_UNUSED
     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   }
   if (unlikely(!o)) return 0;
-  p = ((struct __pyx_obj_7netCDF4_Dimension *)o);
+  p = ((struct __pyx_obj_7netCDF4_8_netCDF4_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;
+static void __pyx_tp_dealloc_7netCDF4_8_netCDF4_Dimension(PyObject *o) {
+  struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *p = (struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)o;
   #if PY_VERSION_HEX >= 0x030400a1
   if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
     if (PyObject_CallFinalizerFromDealloc(o)) return;
@@ -59944,9 +61014,9 @@ static void __pyx_tp_dealloc_7netCDF4_Dimension(PyObject *o) {
   (*Py_TYPE(o)->tp_free)(o);
 }
 
-static int __pyx_tp_traverse_7netCDF4_Dimension(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_7netCDF4_8_netCDF4_Dimension(PyObject *o, visitproc v, void *a) {
   int e;
-  struct __pyx_obj_7netCDF4_Dimension *p = (struct __pyx_obj_7netCDF4_Dimension *)o;
+  struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *p = (struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)o;
   if (p->_data_model) {
     e = (*v)(p->_data_model, a); if (e) return e;
   }
@@ -59959,9 +61029,9 @@ static int __pyx_tp_traverse_7netCDF4_Dimension(PyObject *o, visitproc v, void *
   return 0;
 }
 
-static int __pyx_tp_clear_7netCDF4_Dimension(PyObject *o) {
+static int __pyx_tp_clear_7netCDF4_8_netCDF4_Dimension(PyObject *o) {
   PyObject* tmp;
-  struct __pyx_obj_7netCDF4_Dimension *p = (struct __pyx_obj_7netCDF4_Dimension *)o;
+  struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *p = (struct __pyx_obj_7netCDF4_8_netCDF4_Dimension *)o;
   tmp = ((PyObject*)p->_data_model);
   p->_data_model = Py_None; Py_INCREF(Py_None);
   Py_XDECREF(tmp);
@@ -59974,13 +61044,13 @@ static int __pyx_tp_clear_7netCDF4_Dimension(PyObject *o) {
   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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_9Dimension_name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_9Dimension_4name_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_9Dimension_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_9Dimension_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_9Dimension_4name_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_9Dimension_4name_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -59988,13 +61058,13 @@ static int __pyx_setprop_7netCDF4_9Dimension_name(PyObject *o, PyObject *v, CYTH
   }
 }
 
-static PyObject *__pyx_getprop_7netCDF4_9Dimension__dimid(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_7netCDF4_9Dimension_6_dimid_1__get__(o);
+static PyObject *__pyx_getprop_7netCDF4_8_netCDF4_9Dimension__dimid(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_9Dimension_6_dimid_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_9Dimension__dimid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_9Dimension__dimid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_9Dimension_6_dimid_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_9Dimension_6_dimid_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -60002,13 +61072,13 @@ static int __pyx_setprop_7netCDF4_9Dimension__dimid(PyObject *o, PyObject *v, CY
   }
 }
 
-static PyObject *__pyx_getprop_7netCDF4_9Dimension__grpid(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_7netCDF4_9Dimension_6_grpid_1__get__(o);
+static PyObject *__pyx_getprop_7netCDF4_8_netCDF4_9Dimension__grpid(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_9Dimension_6_grpid_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_9Dimension__grpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_9Dimension__grpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_9Dimension_6_grpid_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_9Dimension_6_grpid_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -60016,65 +61086,65 @@ static int __pyx_setprop_7netCDF4_9Dimension__grpid(PyObject *o, PyObject *v, CY
   }
 }
 
-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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_9Dimension__data_model(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_9Dimension_11_data_model_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_9Dimension__data_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_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);
+    return __pyx_pw_7netCDF4_8_netCDF4_9Dimension_11_data_model_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_9Dimension_11_data_model_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_9Dimension__name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_9Dimension_5_name_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_9Dimension__name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_9Dimension__name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_9Dimension_5_name_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_9Dimension_5_name_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_9Dimension_5_name_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_9Dimension__grp(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_9Dimension_4_grp_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_9Dimension__grp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_9Dimension__grp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_9Dimension_4_grp_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_9Dimension_4_grp_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_9Dimension_4_grp_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_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},
+static PyMethodDef __pyx_methods_7netCDF4_8_netCDF4_Dimension[] = {
+  {"_getname", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9Dimension_3_getname, METH_NOARGS, 0},
+  {"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9Dimension_7__unicode__, METH_NOARGS, 0},
+  {"group", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9Dimension_11group, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_9Dimension_10group},
+  {"isunlimited", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_9Dimension_13isunlimited, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_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},
+static struct PyGetSetDef __pyx_getsets_7netCDF4_8_netCDF4_Dimension[] = {
+  {(char *)"name", __pyx_getprop_7netCDF4_8_netCDF4_9Dimension_name, __pyx_setprop_7netCDF4_8_netCDF4_9Dimension_name, __pyx_k_string_name_of_Dimension_instanc, 0},
+  {(char *)"_dimid", __pyx_getprop_7netCDF4_8_netCDF4_9Dimension__dimid, __pyx_setprop_7netCDF4_8_netCDF4_9Dimension__dimid, 0, 0},
+  {(char *)"_grpid", __pyx_getprop_7netCDF4_8_netCDF4_9Dimension__grpid, __pyx_setprop_7netCDF4_8_netCDF4_9Dimension__grpid, 0, 0},
+  {(char *)"_data_model", __pyx_getprop_7netCDF4_8_netCDF4_9Dimension__data_model, __pyx_setprop_7netCDF4_8_netCDF4_9Dimension__data_model, 0, 0},
+  {(char *)"_name", __pyx_getprop_7netCDF4_8_netCDF4_9Dimension__name, __pyx_setprop_7netCDF4_8_netCDF4_9Dimension__name, 0, 0},
+  {(char *)"_grp", __pyx_getprop_7netCDF4_8_netCDF4_9Dimension__grp, __pyx_setprop_7netCDF4_8_netCDF4_9Dimension__grp, 0, 0},
   {0, 0, 0, 0, 0}
 };
 
 static PySequenceMethods __pyx_tp_as_sequence_Dimension = {
-  __pyx_pw_7netCDF4_9Dimension_9__len__, /*sq_length*/
+  __pyx_pw_7netCDF4_8_netCDF4_9Dimension_9__len__, /*sq_length*/
   0, /*sq_concat*/
   0, /*sq_repeat*/
   0, /*sq_item*/
@@ -60087,17 +61157,17 @@ static PySequenceMethods __pyx_tp_as_sequence_Dimension = {
 };
 
 static PyMappingMethods __pyx_tp_as_mapping_Dimension = {
-  __pyx_pw_7netCDF4_9Dimension_9__len__, /*mp_length*/
+  __pyx_pw_7netCDF4_8_netCDF4_9Dimension_9__len__, /*mp_length*/
   0, /*mp_subscript*/
   0, /*mp_ass_subscript*/
 };
 
-static PyTypeObject __pyx_type_7netCDF4_Dimension = {
+static PyTypeObject __pyx_type_7netCDF4_8_netCDF4_Dimension = {
   PyVarObject_HEAD_INIT(0, 0)
-  "netCDF4.Dimension", /*tp_name*/
-  sizeof(struct __pyx_obj_7netCDF4_Dimension), /*tp_basicsize*/
+  "netCDF4._netCDF4.Dimension", /*tp_name*/
+  sizeof(struct __pyx_obj_7netCDF4_8_netCDF4_Dimension), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_7netCDF4_Dimension, /*tp_dealloc*/
+  __pyx_tp_dealloc_7netCDF4_8_netCDF4_Dimension, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -60106,7 +61176,7 @@ static PyTypeObject __pyx_type_7netCDF4_Dimension = {
   #else
   0, /*reserved*/
   #endif
-  __pyx_pw_7netCDF4_9Dimension_5__repr__, /*tp_repr*/
+  __pyx_pw_7netCDF4_8_netCDF4_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*/
@@ -60117,24 +61187,24 @@ static PyTypeObject __pyx_type_7netCDF4_Dimension = {
   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*/
+  "\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_8_netCDF4_Dimension, /*tp_traverse*/
+  __pyx_tp_clear_7netCDF4_8_netCDF4_Dimension, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
   0, /*tp_iter*/
   0, /*tp_iternext*/
-  __pyx_methods_7netCDF4_Dimension, /*tp_methods*/
+  __pyx_methods_7netCDF4_8_netCDF4_Dimension, /*tp_methods*/
   0, /*tp_members*/
-  __pyx_getsets_7netCDF4_Dimension, /*tp_getset*/
+  __pyx_getsets_7netCDF4_8_netCDF4_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*/
+  __pyx_pw_7netCDF4_8_netCDF4_9Dimension_1__init__, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_7netCDF4_Dimension, /*tp_new*/
+  __pyx_tp_new_7netCDF4_8_netCDF4_Dimension, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -60149,8 +61219,8 @@ static PyTypeObject __pyx_type_7netCDF4_Dimension = {
   #endif
 };
 
-static PyObject *__pyx_tp_new_7netCDF4_Variable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_7netCDF4_Variable *p;
+static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_Variable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_7netCDF4_8_netCDF4_Variable *p;
   PyObject *o;
   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
     o = (*t->tp_alloc)(t, 0);
@@ -60158,7 +61228,7 @@ static PyObject *__pyx_tp_new_7netCDF4_Variable(PyTypeObject *t, CYTHON_UNUSED P
     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   }
   if (unlikely(!o)) return 0;
-  p = ((struct __pyx_obj_7netCDF4_Variable *)o);
+  p = ((struct __pyx_obj_7netCDF4_8_netCDF4_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);
@@ -60170,11 +61240,12 @@ static PyObject *__pyx_tp_new_7netCDF4_Variable(PyTypeObject *t, CYTHON_UNUSED P
   p->_grp = Py_None; Py_INCREF(Py_None);
   p->_cmptype = Py_None; Py_INCREF(Py_None);
   p->_vltype = Py_None; Py_INCREF(Py_None);
+  p->__orthogonal_indexing__ = 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;
+static void __pyx_tp_dealloc_7netCDF4_8_netCDF4_Variable(PyObject *o) {
+  struct __pyx_obj_7netCDF4_8_netCDF4_Variable *p = (struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)o;
   #if PY_VERSION_HEX >= 0x030400a1
   if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
     if (PyObject_CallFinalizerFromDealloc(o)) return;
@@ -60192,12 +61263,13 @@ static void __pyx_tp_dealloc_7netCDF4_Variable(PyObject *o) {
   Py_CLEAR(p->_grp);
   Py_CLEAR(p->_cmptype);
   Py_CLEAR(p->_vltype);
+  Py_CLEAR(p->__orthogonal_indexing__);
   (*Py_TYPE(o)->tp_free)(o);
 }
 
-static int __pyx_tp_traverse_7netCDF4_Variable(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_7netCDF4_8_netCDF4_Variable(PyObject *o, visitproc v, void *a) {
   int e;
-  struct __pyx_obj_7netCDF4_Variable *p = (struct __pyx_obj_7netCDF4_Variable *)o;
+  struct __pyx_obj_7netCDF4_8_netCDF4_Variable *p = (struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)o;
   if (p->_name) {
     e = (*v)(p->_name, a); if (e) return e;
   }
@@ -60231,12 +61303,15 @@ static int __pyx_tp_traverse_7netCDF4_Variable(PyObject *o, visitproc v, void *a
   if (p->_vltype) {
     e = (*v)(p->_vltype, a); if (e) return e;
   }
+  if (p->__orthogonal_indexing__) {
+    e = (*v)(p->__orthogonal_indexing__, a); if (e) return e;
+  }
   return 0;
 }
 
-static int __pyx_tp_clear_7netCDF4_Variable(PyObject *o) {
+static int __pyx_tp_clear_7netCDF4_8_netCDF4_Variable(PyObject *o) {
   PyObject* tmp;
-  struct __pyx_obj_7netCDF4_Variable *p = (struct __pyx_obj_7netCDF4_Variable *)o;
+  struct __pyx_obj_7netCDF4_8_netCDF4_Variable *p = (struct __pyx_obj_7netCDF4_8_netCDF4_Variable *)o;
   tmp = ((PyObject*)p->_name);
   p->_name = Py_None; Py_INCREF(Py_None);
   Py_XDECREF(tmp);
@@ -60270,9 +61345,12 @@ static int __pyx_tp_clear_7netCDF4_Variable(PyObject *o) {
   tmp = ((PyObject*)p->_vltype);
   p->_vltype = Py_None; Py_INCREF(Py_None);
   Py_XDECREF(tmp);
+  tmp = ((PyObject*)p->__orthogonal_indexing__);
+  p->__orthogonal_indexing__ = Py_None; Py_INCREF(Py_None);
+  Py_XDECREF(tmp);
   return 0;
 }
-static PyObject *__pyx_sq_item_7netCDF4_Variable(PyObject *o, Py_ssize_t i) {
+static PyObject *__pyx_sq_item_7netCDF4_8_netCDF4_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);
@@ -60280,9 +61358,9 @@ static PyObject *__pyx_sq_item_7netCDF4_Variable(PyObject *o, Py_ssize_t i) {
   return r;
 }
 
-static int __pyx_mp_ass_subscript_7netCDF4_Variable(PyObject *o, PyObject *i, PyObject *v) {
+static int __pyx_mp_ass_subscript_7netCDF4_8_netCDF4_Variable(PyObject *o, PyObject *i, PyObject *v) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_49__setitem__(o, i, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_49__setitem__(o, i, v);
   }
   else {
     PyErr_Format(PyExc_NotImplementedError,
@@ -60291,31 +61369,31 @@ static int __pyx_mp_ass_subscript_7netCDF4_Variable(PyObject *o, PyObject *i, Py
   }
 }
 
-static PyObject *__pyx_tp_getattro_7netCDF4_Variable(PyObject *o, PyObject *n) {
+static PyObject *__pyx_tp_getattro_7netCDF4_8_netCDF4_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);
+    v = __pyx_pw_7netCDF4_8_netCDF4_8Variable_39__getattr__(o, n);
   }
   return v;
 }
 
-static int __pyx_tp_setattro_7netCDF4_Variable(PyObject *o, PyObject *n, PyObject *v) {
+static int __pyx_tp_setattro_7netCDF4_8_netCDF4_Variable(PyObject *o, PyObject *n, PyObject *v) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_37__setattr__(o, n, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_37__setattr__(o, n, v);
   }
   else {
-    return __pyx_pw_7netCDF4_8Variable_35__delattr__(o, n);
+    return __pyx_pw_7netCDF4_8_netCDF4_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable_name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_4name_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_4name_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_4name_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -60323,17 +61401,17 @@ static int __pyx_setprop_7netCDF4_8Variable_name(PyObject *o, PyObject *v, CYTHO
   }
 }
 
-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_8_netCDF4_8Variable_datatype(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable_shape(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_5shape_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable_shape(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable_shape(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_5shape_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_5shape_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -60341,17 +61419,17 @@ static int __pyx_setprop_7netCDF4_8Variable_shape(PyObject *o, PyObject *v, CYTH
   }
 }
 
-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_8_netCDF4_8Variable_size(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable_dimensions(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_10dimensions_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable_dimensions(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable_dimensions(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_10dimensions_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_10dimensions_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -60359,13 +61437,13 @@ static int __pyx_setprop_7netCDF4_8Variable_dimensions(PyObject *o, PyObject *v,
   }
 }
 
-static PyObject *__pyx_getprop_7netCDF4_8Variable__varid(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_7netCDF4_8Variable_6_varid_1__get__(o);
+static PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable__varid(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_6_varid_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable__varid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable__varid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_6_varid_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_6_varid_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -60373,13 +61451,13 @@ static int __pyx_setprop_7netCDF4_8Variable__varid(PyObject *o, PyObject *v, CYT
   }
 }
 
-static PyObject *__pyx_getprop_7netCDF4_8Variable__grpid(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_7netCDF4_8Variable_6_grpid_1__get__(o);
+static PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable__grpid(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_6_grpid_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable__grpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable__grpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_6_grpid_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_6_grpid_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -60387,13 +61465,13 @@ static int __pyx_setprop_7netCDF4_8Variable__grpid(PyObject *o, PyObject *v, CYT
   }
 }
 
-static PyObject *__pyx_getprop_7netCDF4_8Variable__nunlimdim(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_7netCDF4_8Variable_10_nunlimdim_1__get__(o);
+static PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable__nunlimdim(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_10_nunlimdim_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable__nunlimdim(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable__nunlimdim(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_10_nunlimdim_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_10_nunlimdim_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -60401,207 +61479,221 @@ static int __pyx_setprop_7netCDF4_8Variable__nunlimdim(PyObject *o, PyObject *v,
   }
 }
 
-static PyObject *__pyx_getprop_7netCDF4_8Variable__name(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_7netCDF4_8Variable_5_name_1__get__(o);
+static PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable__name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_5_name_1__get__(o);
+}
+
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable__name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+  if (v) {
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_5_name_3__set__(o, v);
+  }
+  else {
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_5_name_5__del__(o);
+  }
+}
+
+static PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable_ndim(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_4ndim_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable__name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable_ndim(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_5_name_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_4ndim_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_8Variable_5_name_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_4ndim_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable_dtype(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_5dtype_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable_ndim(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_4ndim_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_5dtype_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_8Variable_4ndim_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_5dtype_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable_mask(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_4mask_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable_mask(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_5dtype_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_4mask_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_8Variable_5dtype_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_4mask_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable_scale(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_5scale_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable_mask(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable_scale(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_4mask_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_5scale_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_8Variable_4mask_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_5scale_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable__isprimitive(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_12_isprimitive_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable_scale(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable__isprimitive(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_5scale_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_12_isprimitive_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_8Variable_5scale_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_12_isprimitive_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable__iscompound(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_11_iscompound_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable__isprimitive(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable__iscompound(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_12_isprimitive_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_11_iscompound_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_8Variable_12_isprimitive_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_11_iscompound_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable__isvlen(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_7_isvlen_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable__iscompound(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable__isvlen(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_11_iscompound_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_7_isvlen_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_8Variable_11_iscompound_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_7_isvlen_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable__grp(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_4_grp_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable__isvlen(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable__grp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_7_isvlen_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_4_grp_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_8Variable_7_isvlen_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_4_grp_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable__cmptype(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_8_cmptype_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable__grp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable__cmptype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_4_grp_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_8_cmptype_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_8Variable_4_grp_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_8_cmptype_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable__vltype(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_7_vltype_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable__cmptype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable__vltype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_8_cmptype_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_7_vltype_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_8Variable_8_cmptype_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_7_vltype_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_8Variable___orthogonal_indexing__(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_8Variable__vltype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_8Variable___orthogonal_indexing__(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_8Variable_7_vltype_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___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},
+    return __pyx_pw_7netCDF4_8_netCDF4_8Variable_23__orthogonal_indexing___5__del__(o);
+  }
+}
+
+static PyMethodDef __pyx_methods_7netCDF4_8_netCDF4_Variable[] = {
+  {"__array__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_3__array__, METH_NOARGS, 0},
+  {"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_7__unicode__, METH_NOARGS, 0},
+  {"_getdims", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_9_getdims, METH_NOARGS, 0},
+  {"_getname", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_11_getname, METH_NOARGS, 0},
+  {"group", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_13group, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_12group},
+  {"ncattrs", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_15ncattrs, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_14ncattrs},
+  {"setncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_17setncattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_16setncattr},
+  {"setncatts", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_19setncatts, METH_O, __pyx_doc_7netCDF4_8_netCDF4_8Variable_18setncatts},
+  {"getncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_21getncattr, METH_O, __pyx_doc_7netCDF4_8_netCDF4_8Variable_20getncattr},
+  {"delncattr", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_23delncattr, METH_O, __pyx_doc_7netCDF4_8_netCDF4_8Variable_22delncattr},
+  {"filters", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_25filters, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_24filters},
+  {"endian", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_27endian, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_26endian},
+  {"chunking", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_29chunking, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_28chunking},
+  {"get_var_chunk_cache", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_31get_var_chunk_cache, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_30get_var_chunk_cache},
+  {"set_var_chunk_cache", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_33set_var_chunk_cache, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_32set_var_chunk_cache},
+  {"__getattr__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_39__getattr__, METH_O|METH_COEXIST, 0},
+  {"renameAttribute", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_41renameAttribute, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_40renameAttribute},
+  {"_toma", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_45_toma, METH_O, 0},
+  {"_assign_vlen", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_47_assign_vlen, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_46_assign_vlen},
+  {"assignValue", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_53assignValue, METH_O, __pyx_doc_7netCDF4_8_netCDF4_8Variable_52assignValue},
+  {"getValue", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_55getValue, METH_NOARGS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_54getValue},
+  {"set_auto_maskandscale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_57set_auto_maskandscale, METH_O, __pyx_doc_7netCDF4_8_netCDF4_8Variable_56set_auto_maskandscale},
+  {"set_auto_scale", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_59set_auto_scale, METH_O, __pyx_doc_7netCDF4_8_netCDF4_8Variable_58set_auto_scale},
+  {"set_auto_mask", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_61set_auto_mask, METH_O, __pyx_doc_7netCDF4_8_netCDF4_8Variable_60set_auto_mask},
+  {"_put", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_63_put, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_8Variable_62_put},
+  {"_get", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_8Variable_65_get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7netCDF4_8_netCDF4_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},
+static struct PyGetSetDef __pyx_getsets_7netCDF4_8_netCDF4_Variable[] = {
+  {(char *)"name", __pyx_getprop_7netCDF4_8_netCDF4_8Variable_name, __pyx_setprop_7netCDF4_8_netCDF4_8Variable_name, __pyx_k_string_name_of_Variable_instance, 0},
+  {(char *)"datatype", __pyx_getprop_7netCDF4_8_netCDF4_8Variable_datatype, 0, __pyx_k_numpy_data_type_for_primitive_da, 0},
+  {(char *)"shape", __pyx_getprop_7netCDF4_8_netCDF4_8Variable_shape, __pyx_setprop_7netCDF4_8_netCDF4_8Variable_shape, __pyx_k_find_current_sizes_of_all_variab, 0},
+  {(char *)"size", __pyx_getprop_7netCDF4_8_netCDF4_8Variable_size, 0, __pyx_k_Return_the_number_of_stored_elem, 0},
+  {(char *)"dimensions", __pyx_getprop_7netCDF4_8_netCDF4_8Variable_dimensions, __pyx_setprop_7netCDF4_8_netCDF4_8Variable_dimensions, __pyx_k_get_variables_s_dimension_names, 0},
+  {(char *)"_varid", __pyx_getprop_7netCDF4_8_netCDF4_8Variable__varid, __pyx_setprop_7netCDF4_8_netCDF4_8Variable__varid, 0, 0},
+  {(char *)"_grpid", __pyx_getprop_7netCDF4_8_netCDF4_8Variable__grpid, __pyx_setprop_7netCDF4_8_netCDF4_8Variable__grpid, 0, 0},
+  {(char *)"_nunlimdim", __pyx_getprop_7netCDF4_8_netCDF4_8Variable__nunlimdim, __pyx_setprop_7netCDF4_8_netCDF4_8Variable__nunlimdim, 0, 0},
+  {(char *)"_name", __pyx_getprop_7netCDF4_8_netCDF4_8Variable__name, __pyx_setprop_7netCDF4_8_netCDF4_8Variable__name, 0, 0},
+  {(char *)"ndim", __pyx_getprop_7netCDF4_8_netCDF4_8Variable_ndim, __pyx_setprop_7netCDF4_8_netCDF4_8Variable_ndim, 0, 0},
+  {(char *)"dtype", __pyx_getprop_7netCDF4_8_netCDF4_8Variable_dtype, __pyx_setprop_7netCDF4_8_netCDF4_8Variable_dtype, 0, 0},
+  {(char *)"mask", __pyx_getprop_7netCDF4_8_netCDF4_8Variable_mask, __pyx_setprop_7netCDF4_8_netCDF4_8Variable_mask, 0, 0},
+  {(char *)"scale", __pyx_getprop_7netCDF4_8_netCDF4_8Variable_scale, __pyx_setprop_7netCDF4_8_netCDF4_8Variable_scale, 0, 0},
+  {(char *)"_isprimitive", __pyx_getprop_7netCDF4_8_netCDF4_8Variable__isprimitive, __pyx_setprop_7netCDF4_8_netCDF4_8Variable__isprimitive, 0, 0},
+  {(char *)"_iscompound", __pyx_getprop_7netCDF4_8_netCDF4_8Variable__iscompound, __pyx_setprop_7netCDF4_8_netCDF4_8Variable__iscompound, 0, 0},
+  {(char *)"_isvlen", __pyx_getprop_7netCDF4_8_netCDF4_8Variable__isvlen, __pyx_setprop_7netCDF4_8_netCDF4_8Variable__isvlen, 0, 0},
+  {(char *)"_grp", __pyx_getprop_7netCDF4_8_netCDF4_8Variable__grp, __pyx_setprop_7netCDF4_8_netCDF4_8Variable__grp, 0, 0},
+  {(char *)"_cmptype", __pyx_getprop_7netCDF4_8_netCDF4_8Variable__cmptype, __pyx_setprop_7netCDF4_8_netCDF4_8Variable__cmptype, 0, 0},
+  {(char *)"_vltype", __pyx_getprop_7netCDF4_8_netCDF4_8Variable__vltype, __pyx_setprop_7netCDF4_8_netCDF4_8Variable__vltype, 0, 0},
+  {(char *)"__orthogonal_indexing__", __pyx_getprop_7netCDF4_8_netCDF4_8Variable___orthogonal_indexing__, __pyx_setprop_7netCDF4_8_netCDF4_8Variable___orthogonal_indexing__, 0, 0},
   {0, 0, 0, 0, 0}
 };
 
 static PySequenceMethods __pyx_tp_as_sequence_Variable = {
-  __pyx_pw_7netCDF4_8Variable_51__len__, /*sq_length*/
+  __pyx_pw_7netCDF4_8_netCDF4_8Variable_51__len__, /*sq_length*/
   0, /*sq_concat*/
   0, /*sq_repeat*/
-  __pyx_sq_item_7netCDF4_Variable, /*sq_item*/
+  __pyx_sq_item_7netCDF4_8_netCDF4_Variable, /*sq_item*/
   0, /*sq_slice*/
   0, /*sq_ass_item*/
   0, /*sq_ass_slice*/
@@ -60611,17 +61703,17 @@ static PySequenceMethods __pyx_tp_as_sequence_Variable = {
 };
 
 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*/
+  __pyx_pw_7netCDF4_8_netCDF4_8Variable_51__len__, /*mp_length*/
+  __pyx_pw_7netCDF4_8_netCDF4_8Variable_43__getitem__, /*mp_subscript*/
+  __pyx_mp_ass_subscript_7netCDF4_8_netCDF4_Variable, /*mp_ass_subscript*/
 };
 
-static PyTypeObject __pyx_type_7netCDF4_Variable = {
+static PyTypeObject __pyx_type_7netCDF4_8_netCDF4_Variable = {
   PyVarObject_HEAD_INIT(0, 0)
-  "netCDF4.Variable", /*tp_name*/
-  sizeof(struct __pyx_obj_7netCDF4_Variable), /*tp_basicsize*/
+  "netCDF4._netCDF4.Variable", /*tp_name*/
+  sizeof(struct __pyx_obj_7netCDF4_8_netCDF4_Variable), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_7netCDF4_Variable, /*tp_dealloc*/
+  __pyx_tp_dealloc_7netCDF4_8_netCDF4_Variable, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -60630,35 +61722,35 @@ static PyTypeObject __pyx_type_7netCDF4_Variable = {
   #else
   0, /*reserved*/
   #endif
-  __pyx_pw_7netCDF4_8Variable_5__repr__, /*tp_repr*/
+  __pyx_pw_7netCDF4_8_netCDF4_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*/
+  __pyx_tp_getattro_7netCDF4_8_netCDF4_Variable, /*tp_getattro*/
+  __pyx_tp_setattro_7netCDF4_8_netCDF4_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*/
+  "\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 directly [...]
+  __pyx_tp_traverse_7netCDF4_8_netCDF4_Variable, /*tp_traverse*/
+  __pyx_tp_clear_7netCDF4_8_netCDF4_Variable, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
   0, /*tp_iter*/
   0, /*tp_iternext*/
-  __pyx_methods_7netCDF4_Variable, /*tp_methods*/
+  __pyx_methods_7netCDF4_8_netCDF4_Variable, /*tp_methods*/
   0, /*tp_members*/
-  __pyx_getsets_7netCDF4_Variable, /*tp_getset*/
+  __pyx_getsets_7netCDF4_8_netCDF4_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*/
+  __pyx_pw_7netCDF4_8_netCDF4_8Variable_1__init__, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_7netCDF4_Variable, /*tp_new*/
+  __pyx_tp_new_7netCDF4_8_netCDF4_Variable, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -60673,8 +61765,8 @@ static PyTypeObject __pyx_type_7netCDF4_Variable = {
   #endif
 };
 
-static PyObject *__pyx_tp_new_7netCDF4_CompoundType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_7netCDF4_CompoundType *p;
+static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_CompoundType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *p;
   PyObject *o;
   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
     o = (*t->tp_alloc)(t, 0);
@@ -60682,14 +61774,14 @@ static PyObject *__pyx_tp_new_7netCDF4_CompoundType(PyTypeObject *t, CYTHON_UNUS
     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   }
   if (unlikely(!o)) return 0;
-  p = ((struct __pyx_obj_7netCDF4_CompoundType *)o);
+  p = ((struct __pyx_obj_7netCDF4_8_netCDF4_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;
+static void __pyx_tp_dealloc_7netCDF4_8_netCDF4_CompoundType(PyObject *o) {
+  struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *p = (struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)o;
   #if PY_VERSION_HEX >= 0x030400a1
   if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
     if (PyObject_CallFinalizerFromDealloc(o)) return;
@@ -60701,9 +61793,9 @@ static void __pyx_tp_dealloc_7netCDF4_CompoundType(PyObject *o) {
   (*Py_TYPE(o)->tp_free)(o);
 }
 
-static int __pyx_tp_traverse_7netCDF4_CompoundType(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_7netCDF4_8_netCDF4_CompoundType(PyObject *o, visitproc v, void *a) {
   int e;
-  struct __pyx_obj_7netCDF4_CompoundType *p = (struct __pyx_obj_7netCDF4_CompoundType *)o;
+  struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *p = (struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)o;
   if (p->dtype) {
     e = (*v)(p->dtype, a); if (e) return e;
   }
@@ -60713,9 +61805,9 @@ static int __pyx_tp_traverse_7netCDF4_CompoundType(PyObject *o, visitproc v, voi
   return 0;
 }
 
-static int __pyx_tp_clear_7netCDF4_CompoundType(PyObject *o) {
+static int __pyx_tp_clear_7netCDF4_8_netCDF4_CompoundType(PyObject *o) {
   PyObject* tmp;
-  struct __pyx_obj_7netCDF4_CompoundType *p = (struct __pyx_obj_7netCDF4_CompoundType *)o;
+  struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *p = (struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType *)o;
   tmp = ((PyObject*)p->dtype);
   p->dtype = Py_None; Py_INCREF(Py_None);
   Py_XDECREF(tmp);
@@ -60725,13 +61817,13 @@ static int __pyx_tp_clear_7netCDF4_CompoundType(PyObject *o) {
   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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_12CompoundType__nc_type(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_8_nc_type_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_12CompoundType__nc_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_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);
+    return __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_8_nc_type_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -60739,50 +61831,50 @@ static int __pyx_setprop_7netCDF4_12CompoundType__nc_type(PyObject *o, PyObject
   }
 }
 
-static PyObject *__pyx_getprop_7netCDF4_12CompoundType_dtype(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_7netCDF4_12CompoundType_5dtype_1__get__(o);
+static PyObject *__pyx_getprop_7netCDF4_8_netCDF4_12CompoundType_dtype(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_5dtype_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_12CompoundType_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_12CompoundType_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_12CompoundType_5dtype_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_5dtype_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_12CompoundType_5dtype_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_12CompoundType_name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_4name_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_12CompoundType_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_12CompoundType_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_12CompoundType_4name_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_4name_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_12CompoundType_4name_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_4name_5__del__(o);
   }
 }
 
-static PyMethodDef __pyx_methods_7netCDF4_CompoundType[] = {
-  {"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_12CompoundType_5__unicode__, METH_NOARGS, 0},
+static PyMethodDef __pyx_methods_7netCDF4_8_netCDF4_CompoundType[] = {
+  {"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_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},
+static struct PyGetSetDef __pyx_getsets_7netCDF4_8_netCDF4_CompoundType[] = {
+  {(char *)"_nc_type", __pyx_getprop_7netCDF4_8_netCDF4_12CompoundType__nc_type, __pyx_setprop_7netCDF4_8_netCDF4_12CompoundType__nc_type, 0, 0},
+  {(char *)"dtype", __pyx_getprop_7netCDF4_8_netCDF4_12CompoundType_dtype, __pyx_setprop_7netCDF4_8_netCDF4_12CompoundType_dtype, 0, 0},
+  {(char *)"name", __pyx_getprop_7netCDF4_8_netCDF4_12CompoundType_name, __pyx_setprop_7netCDF4_8_netCDF4_12CompoundType_name, 0, 0},
   {0, 0, 0, 0, 0}
 };
 
-static PyTypeObject __pyx_type_7netCDF4_CompoundType = {
+static PyTypeObject __pyx_type_7netCDF4_8_netCDF4_CompoundType = {
   PyVarObject_HEAD_INIT(0, 0)
-  "netCDF4.CompoundType", /*tp_name*/
-  sizeof(struct __pyx_obj_7netCDF4_CompoundType), /*tp_basicsize*/
+  "netCDF4._netCDF4.CompoundType", /*tp_name*/
+  sizeof(struct __pyx_obj_7netCDF4_8_netCDF4_CompoundType), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_7netCDF4_CompoundType, /*tp_dealloc*/
+  __pyx_tp_dealloc_7netCDF4_8_netCDF4_CompoundType, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -60791,7 +61883,7 @@ static PyTypeObject __pyx_type_7netCDF4_CompoundType = {
   #else
   0, /*reserved*/
   #endif
-  __pyx_pw_7netCDF4_12CompoundType_3__repr__, /*tp_repr*/
+  __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_3__repr__, /*tp_repr*/
   0, /*tp_as_number*/
   0, /*tp_as_sequence*/
   0, /*tp_as_mapping*/
@@ -60802,24 +61894,24 @@ static PyTypeObject __pyx_type_7netCDF4_CompoundType = {
   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*/
+  "\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_8_netCDF4_CompoundType, /*tp_traverse*/
+  __pyx_tp_clear_7netCDF4_8_netCDF4_CompoundType, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
   0, /*tp_iter*/
   0, /*tp_iternext*/
-  __pyx_methods_7netCDF4_CompoundType, /*tp_methods*/
+  __pyx_methods_7netCDF4_8_netCDF4_CompoundType, /*tp_methods*/
   0, /*tp_members*/
-  __pyx_getsets_7netCDF4_CompoundType, /*tp_getset*/
+  __pyx_getsets_7netCDF4_8_netCDF4_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*/
+  __pyx_pw_7netCDF4_8_netCDF4_12CompoundType_1__init__, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_7netCDF4_CompoundType, /*tp_new*/
+  __pyx_tp_new_7netCDF4_8_netCDF4_CompoundType, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -60834,8 +61926,8 @@ static PyTypeObject __pyx_type_7netCDF4_CompoundType = {
   #endif
 };
 
-static PyObject *__pyx_tp_new_7netCDF4_VLType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-  struct __pyx_obj_7netCDF4_VLType *p;
+static PyObject *__pyx_tp_new_7netCDF4_8_netCDF4_VLType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+  struct __pyx_obj_7netCDF4_8_netCDF4_VLType *p;
   PyObject *o;
   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
     o = (*t->tp_alloc)(t, 0);
@@ -60843,14 +61935,14 @@ static PyObject *__pyx_tp_new_7netCDF4_VLType(PyTypeObject *t, CYTHON_UNUSED PyO
     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   }
   if (unlikely(!o)) return 0;
-  p = ((struct __pyx_obj_7netCDF4_VLType *)o);
+  p = ((struct __pyx_obj_7netCDF4_8_netCDF4_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;
+static void __pyx_tp_dealloc_7netCDF4_8_netCDF4_VLType(PyObject *o) {
+  struct __pyx_obj_7netCDF4_8_netCDF4_VLType *p = (struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)o;
   #if PY_VERSION_HEX >= 0x030400a1
   if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
     if (PyObject_CallFinalizerFromDealloc(o)) return;
@@ -60862,9 +61954,9 @@ static void __pyx_tp_dealloc_7netCDF4_VLType(PyObject *o) {
   (*Py_TYPE(o)->tp_free)(o);
 }
 
-static int __pyx_tp_traverse_7netCDF4_VLType(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_7netCDF4_8_netCDF4_VLType(PyObject *o, visitproc v, void *a) {
   int e;
-  struct __pyx_obj_7netCDF4_VLType *p = (struct __pyx_obj_7netCDF4_VLType *)o;
+  struct __pyx_obj_7netCDF4_8_netCDF4_VLType *p = (struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)o;
   if (p->dtype) {
     e = (*v)(p->dtype, a); if (e) return e;
   }
@@ -60874,9 +61966,9 @@ static int __pyx_tp_traverse_7netCDF4_VLType(PyObject *o, visitproc v, void *a)
   return 0;
 }
 
-static int __pyx_tp_clear_7netCDF4_VLType(PyObject *o) {
+static int __pyx_tp_clear_7netCDF4_8_netCDF4_VLType(PyObject *o) {
   PyObject* tmp;
-  struct __pyx_obj_7netCDF4_VLType *p = (struct __pyx_obj_7netCDF4_VLType *)o;
+  struct __pyx_obj_7netCDF4_8_netCDF4_VLType *p = (struct __pyx_obj_7netCDF4_8_netCDF4_VLType *)o;
   tmp = ((PyObject*)p->dtype);
   p->dtype = Py_None; Py_INCREF(Py_None);
   Py_XDECREF(tmp);
@@ -60886,13 +61978,13 @@ static int __pyx_tp_clear_7netCDF4_VLType(PyObject *o) {
   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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_6VLType__nc_type(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_6VLType_8_nc_type_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_6VLType__nc_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_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);
+    return __pyx_pw_7netCDF4_8_netCDF4_6VLType_8_nc_type_3__set__(o, v);
   }
   else {
     PyErr_SetString(PyExc_NotImplementedError, "__del__");
@@ -60900,50 +61992,50 @@ static int __pyx_setprop_7netCDF4_6VLType__nc_type(PyObject *o, PyObject *v, CYT
   }
 }
 
-static PyObject *__pyx_getprop_7netCDF4_6VLType_dtype(PyObject *o, CYTHON_UNUSED void *x) {
-  return __pyx_pw_7netCDF4_6VLType_5dtype_1__get__(o);
+static PyObject *__pyx_getprop_7netCDF4_8_netCDF4_6VLType_dtype(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_6VLType_5dtype_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_6VLType_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_6VLType_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_6VLType_5dtype_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_6VLType_5dtype_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_6VLType_5dtype_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_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 PyObject *__pyx_getprop_7netCDF4_8_netCDF4_6VLType_name(PyObject *o, CYTHON_UNUSED void *x) {
+  return __pyx_pw_7netCDF4_8_netCDF4_6VLType_4name_1__get__(o);
 }
 
-static int __pyx_setprop_7netCDF4_6VLType_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_setprop_7netCDF4_8_netCDF4_6VLType_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
   if (v) {
-    return __pyx_pw_7netCDF4_6VLType_4name_3__set__(o, v);
+    return __pyx_pw_7netCDF4_8_netCDF4_6VLType_4name_3__set__(o, v);
   }
   else {
-    return __pyx_pw_7netCDF4_6VLType_4name_5__del__(o);
+    return __pyx_pw_7netCDF4_8_netCDF4_6VLType_4name_5__del__(o);
   }
 }
 
-static PyMethodDef __pyx_methods_7netCDF4_VLType[] = {
-  {"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_6VLType_5__unicode__, METH_NOARGS, 0},
+static PyMethodDef __pyx_methods_7netCDF4_8_netCDF4_VLType[] = {
+  {"__unicode__", (PyCFunction)__pyx_pw_7netCDF4_8_netCDF4_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},
+static struct PyGetSetDef __pyx_getsets_7netCDF4_8_netCDF4_VLType[] = {
+  {(char *)"_nc_type", __pyx_getprop_7netCDF4_8_netCDF4_6VLType__nc_type, __pyx_setprop_7netCDF4_8_netCDF4_6VLType__nc_type, 0, 0},
+  {(char *)"dtype", __pyx_getprop_7netCDF4_8_netCDF4_6VLType_dtype, __pyx_setprop_7netCDF4_8_netCDF4_6VLType_dtype, 0, 0},
+  {(char *)"name", __pyx_getprop_7netCDF4_8_netCDF4_6VLType_name, __pyx_setprop_7netCDF4_8_netCDF4_6VLType_name, 0, 0},
   {0, 0, 0, 0, 0}
 };
 
-static PyTypeObject __pyx_type_7netCDF4_VLType = {
+static PyTypeObject __pyx_type_7netCDF4_8_netCDF4_VLType = {
   PyVarObject_HEAD_INIT(0, 0)
-  "netCDF4.VLType", /*tp_name*/
-  sizeof(struct __pyx_obj_7netCDF4_VLType), /*tp_basicsize*/
+  "netCDF4._netCDF4.VLType", /*tp_name*/
+  sizeof(struct __pyx_obj_7netCDF4_8_netCDF4_VLType), /*tp_basicsize*/
   0, /*tp_itemsize*/
-  __pyx_tp_dealloc_7netCDF4_VLType, /*tp_dealloc*/
+  __pyx_tp_dealloc_7netCDF4_8_netCDF4_VLType, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*tp_getattr*/
   0, /*tp_setattr*/
@@ -60952,7 +62044,7 @@ static PyTypeObject __pyx_type_7netCDF4_VLType = {
   #else
   0, /*reserved*/
   #endif
-  __pyx_pw_7netCDF4_6VLType_3__repr__, /*tp_repr*/
+  __pyx_pw_7netCDF4_8_netCDF4_6VLType_3__repr__, /*tp_repr*/
   0, /*tp_as_number*/
   0, /*tp_as_sequence*/
   0, /*tp_as_mapping*/
@@ -60963,24 +62055,24 @@ static PyTypeObject __pyx_type_7netCDF4_VLType = {
   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*/
+  "\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 length [...]
+  __pyx_tp_traverse_7netCDF4_8_netCDF4_VLType, /*tp_traverse*/
+  __pyx_tp_clear_7netCDF4_8_netCDF4_VLType, /*tp_clear*/
   0, /*tp_richcompare*/
   0, /*tp_weaklistoffset*/
   0, /*tp_iter*/
   0, /*tp_iternext*/
-  __pyx_methods_7netCDF4_VLType, /*tp_methods*/
+  __pyx_methods_7netCDF4_8_netCDF4_VLType, /*tp_methods*/
   0, /*tp_members*/
-  __pyx_getsets_7netCDF4_VLType, /*tp_getset*/
+  __pyx_getsets_7netCDF4_8_netCDF4_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*/
+  __pyx_pw_7netCDF4_8_netCDF4_6VLType_1__init__, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_7netCDF4_VLType, /*tp_new*/
+  __pyx_tp_new_7netCDF4_8_netCDF4_VLType, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
@@ -61006,7 +62098,7 @@ static struct PyModuleDef __pyx_moduledef = {
   #else
     PyModuleDef_HEAD_INIT,
   #endif
-    "netCDF4",
+    "_netCDF4",
     __pyx_k_Introduction_Python_interface_t, /* m_doc */
     -1, /* m_size */
     __pyx_methods /* m_methods */,
@@ -61018,9 +62110,10 @@ static struct PyModuleDef __pyx_moduledef = {
 #endif
 
 static __Pyx_StringTabEntry __pyx_string_tab[] = {
+  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
   {&__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_7, __pyx_k_1_1_7, sizeof(__pyx_k_1_1_7), 0, 0, 1, 0},
+  {&__pyx_kp_s_1_1_8, __pyx_k_1_1_8, sizeof(__pyx_k_1_1_8), 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},
@@ -61075,7 +62168,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__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},
@@ -61090,20 +62182,19 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__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__115, __pyx_k__115, sizeof(__pyx_k__115), 0, 0, 1, 0},
+  {&__pyx_kp_s__118, __pyx_k__118, sizeof(__pyx_k__118), 0, 0, 1, 0},
+  {&__pyx_kp_s__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 1, 0},
+  {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0},
   {&__pyx_kp_s__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 1, 0},
-  {&__pyx_kp_s__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 0, 1, 0},
-  {&__pyx_kp_s__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 0, 1, 0},
+  {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0},
+  {&__pyx_kp_s__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 1, 0},
+  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
+  {&__pyx_kp_s__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 0, 1, 0},
+  {&__pyx_kp_s__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 0, 1, 0},
+  {&__pyx_kp_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 0},
+  {&__pyx_n_s__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 0, 1, 1},
+  {&__pyx_kp_s__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 0, 1, 0},
   {&__pyx_kp_s__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 0, 1, 0},
-  {&__pyx_kp_s__35, __pyx_k__35, sizeof(__pyx_k__35), 0, 0, 1, 0},
-  {&__pyx_kp_s__37, __pyx_k__37, sizeof(__pyx_k__37), 0, 0, 1, 0},
-  {&__pyx_kp_s__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 0, 1, 0},
-  {&__pyx_kp_s__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 0, 1, 0},
-  {&__pyx_kp_s__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 0, 1, 0},
-  {&__pyx_kp_s__43, __pyx_k__43, sizeof(__pyx_k__43), 0, 0, 1, 0},
-  {&__pyx_n_s__45, __pyx_k__45, sizeof(__pyx_k__45), 0, 0, 1, 1},
-  {&__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_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},
@@ -61168,6 +62259,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__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_n_s_createGroup, __pyx_k_createGroup, sizeof(__pyx_k_createGroup), 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},
@@ -61189,6 +62281,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__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_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1},
+  {&__pyx_n_s_day_units, __pyx_k_day_units, sizeof(__pyx_k_day_units), 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},
@@ -61286,7 +62379,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__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_hr_units, __pyx_k_hr_units, sizeof(__pyx_k_hr_units), 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},
@@ -61345,13 +62438,12 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__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_microsec_units, __pyx_k_microsec_units, sizeof(__pyx_k_microsec_units), 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_n_s_millisec_units, __pyx_k_millisec_units, sizeof(__pyx_k_millisec_units), 0, 0, 1, 1},
+  {&__pyx_n_s_min_units, __pyx_k_min_units, sizeof(__pyx_k_min_units), 0, 0, 1, 1},
   {&__pyx_n_s_minorvers, __pyx_k_minorvers, sizeof(__pyx_k_minorvers), 0, 0, 1, 1},
   {&__pyx_n_s_minute, __pyx_k_minute, sizeof(__pyx_k_minute), 0, 0, 1, 1},
-  {&__pyx_n_s_minutes, __pyx_k_minutes, sizeof(__pyx_k_minutes), 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},
@@ -61378,13 +62470,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__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_netCDF4__netCDF4, __pyx_k_netCDF4__netCDF4, sizeof(__pyx_k_netCDF4__netCDF4), 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_normpath, __pyx_k_normpath, sizeof(__pyx_k_normpath), 0, 0, 1, 1},
   {&__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},
@@ -61399,6 +62491,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__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_orthogoral_indexing, __pyx_k_orthogoral_indexing, sizeof(__pyx_k_orthogoral_indexing), 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_date, __pyx_k_parse_date, sizeof(__pyx_k_parse_date), 0, 0, 1, 1},
@@ -61423,8 +62516,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__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_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
+  {&__pyx_kp_s_r_2, __pyx_k_r_2, sizeof(__pyx_k_r_2), 0, 0, 1, 0},
   {&__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},
@@ -61451,11 +62544,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__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_not_found_in_s, __pyx_k_s_not_found_in_s, sizeof(__pyx_k_s_not_found_in_s), 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_sec_units, __pyx_k_sec_units, sizeof(__pyx_k_sec_units), 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},
@@ -61473,1651 +62568,1686 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__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_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 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_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_n_s_utc_offset, __pyx_k_utc_offset, sizeof(__pyx_k_utc_offset), 0, 0, 1, 1},
-  {&__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_year, __pyx_k_year, sizeof(__pyx_k_year), 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 = 777; __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 = 564; __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 = 15; __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 = 410; __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 = 499; __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 = 603; __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 = 646; __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 = 663; __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 = 893; __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 = 940; __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 = 1058; __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 = 4194; __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":15
- *     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_ = PyTuple_Pack(1, __pyx_kp_s_no_since_in_unit_string); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple_);
-  __Pyx_GIVEREF(__pyx_tuple_);
-
-  /* "utils.pyx":17
- *         raise ValueError("no 'since' in unit_string")
- *     # parse the date string.
- *     n = timestr.find('since')+6             # <<<<<<<<<<<<<<
- *     isostring = timestr[n:]
- *     year, month, day, hour, minute, second, utc_offset =\
- */
-  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_since); 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":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__3 = PyTuple_Pack(1, __pyx_kp_s_dtype_must_string_or_unicode_S_o); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__3);
-  __Pyx_GIVEREF(__pyx_tuple__3);
-
-  /* "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__4 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__4);
-  __Pyx_GIVEREF(__pyx_tuple__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_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 = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__5);
-  __Pyx_GIVEREF(__pyx_tuple__5);
-
-  /* "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__6 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__6);
-  __Pyx_GIVEREF(__pyx_slice__6);
-
-  /* "utils.pyx":382
- *         # 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__7 = PyTuple_Pack(1, __pyx_n_s_http); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__7);
-  __Pyx_GIVEREF(__pyx_tuple__7);
-
-  /* "utils.pyx":444
- *         # 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__8 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__8);
-  __Pyx_GIVEREF(__pyx_slice__8);
-
-  /* "utils.pyx":455
- *                     #if not vInst.dimensions[0] != aggDimName:
- * 
- *                     masterDims, masterShape, masterType = masterRecVar[v][:3]             # <<<<<<<<<<<<<<
- *                     extDims, extShape, extType = varInfo[v][:3]
- *                     extDims = varInfo[v].dimensions
- */
-  __pyx_slice__9 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__9);
-  __Pyx_GIVEREF(__pyx_slice__9);
-
-  /* "utils.pyx":456
- * 
- *                     masterDims, masterShape, masterType = masterRecVar[v][:3]
- *                     extDims, extShape, extType = varInfo[v][:3]             # <<<<<<<<<<<<<<
- *                     extDims = varInfo[v].dimensions
- *                     extShape = varInfo[v].shape
- */
-  __pyx_slice__10 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__10);
-  __Pyx_GIVEREF(__pyx_slice__10);
-
-  /* "utils.pyx":473
- *                                        "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__11 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__11);
-  __Pyx_GIVEREF(__pyx_slice__11);
-  __pyx_slice__12 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__12);
-  __Pyx_GIVEREF(__pyx_slice__12);
-
-  /* "utils.pyx":516
- *         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__13 = PyTuple_Pack(1, __pyx_kp_s_MFNetCDF4_only_works_with_NETCDF); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__13);
-  __Pyx_GIVEREF(__pyx_tuple__13);
-
-  /* "utils.pyx":624
- *     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__16 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__16)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__16);
-  __Pyx_GIVEREF(__pyx_slice__16);
-
-  /* "utils.pyx":645
- *         # 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__17 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__17);
-  __Pyx_GIVEREF(__pyx_slice__17);
-
-  /* "utils.pyx":646
- *         # 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__18 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__18)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__18);
-  __Pyx_GIVEREF(__pyx_slice__18);
-
-  /* "utils.pyx":663
- *             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__19 = PyTuple_Pack(1, __pyx_kp_s_negative_strides_not_allowed_whe); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__19);
-  __Pyx_GIVEREF(__pyx_tuple__19);
-
-  /* "utils.pyx":687
- * 
- *             # 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__20 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__20)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__20);
-  __Pyx_GIVEREF(__pyx_slice__20);
-
-  /* "utils.pyx":788
- *         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__21 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_time_va); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__21);
-  __Pyx_GIVEREF(__pyx_tuple__21);
-
-  /* "utils.pyx":792
- *         # 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__22 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_same_ti); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__22);
-  __Pyx_GIVEREF(__pyx_tuple__22);
+  {&__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_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 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_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_unsupported_time_units, __pyx_k_unsupported_time_units, sizeof(__pyx_k_unsupported_time_units), 0, 0, 1, 0},
+  {&__pyx_n_s_utc_offset, __pyx_k_utc_offset, sizeof(__pyx_k_utc_offset), 0, 0, 1, 1},
+  {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
+  {&__pyx_n_s_utils, __pyx_k_utils, sizeof(__pyx_k_utils), 0, 0, 1, 1},
+  {&__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_year, __pyx_k_year, sizeof(__pyx_k_year), 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 = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4872; __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 = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __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 = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __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 = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3783; __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 = 4310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  return 0;
+  __pyx_L1_error:;
+  return -1;
+}
 
-  /* "utils.pyx":798
- * 
- *         # 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__23 = PyTuple_Pack(3, __pyx_int_1900, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__23)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__23);
-  __Pyx_GIVEREF(__pyx_tuple__23);
+static int __Pyx_InitCachedConstants(void) {
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
 
-  /* "netCDF4.pyx":931
+  /* "netCDF4/_netCDF4.pyx":975
  *         else:
  *             pstring =\
  *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')             # <<<<<<<<<<<<<<
  *         return pstring
  *     elif att_type == NC_STRING:
  */
-  __pyx_tuple__25 = PyTuple_Pack(2, __pyx_kp_s__24, __pyx_kp_s__15); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__25);
-  __Pyx_GIVEREF(__pyx_tuple__25);
+  __pyx_tuple__3 = PyTuple_Pack(2, __pyx_kp_s_, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__3);
+  __Pyx_GIVEREF(__pyx_tuple__3);
 
-  /* "netCDF4.pyx":937
+  /* "netCDF4/_netCDF4.pyx":981
  *             with nogil:
  *                 ierr = nc_get_att_string(_grpid, varid, attname, &stratt)
  *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')             # <<<<<<<<<<<<<<
  *             return pstring
  *         else:
  */
-  __pyx_tuple__26 = PyTuple_Pack(2, __pyx_kp_s__24, __pyx_kp_s__15); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__26);
-  __Pyx_GIVEREF(__pyx_tuple__26);
+  __pyx_tuple__4 = PyTuple_Pack(2, __pyx_kp_s_, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__4);
+  __Pyx_GIVEREF(__pyx_tuple__4);
 
-  /* "netCDF4.pyx":940
+  /* "netCDF4/_netCDF4.pyx":984
  *             return pstring
  *         else:
  *             raise KeyError('vlen string array attributes not supported')             # <<<<<<<<<<<<<<
  *     else:
  *     # a regular numeric or compound type.
  */
-  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_vlen_string_array_attributes_not); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__27);
-  __Pyx_GIVEREF(__pyx_tuple__27);
+  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_vlen_string_array_attributes_not); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__5);
+  __Pyx_GIVEREF(__pyx_tuple__5);
 
-  /* "netCDF4.pyx":1034
+  /* "netCDF4/_netCDF4.pyx":1078
  *     # 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__28 = PyTuple_Pack(1, __pyx_n_s_NETCDF3); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__28);
-  __Pyx_GIVEREF(__pyx_tuple__28);
+  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_n_s_NETCDF3); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__6);
+  __Pyx_GIVEREF(__pyx_tuple__6);
 
-  /* "netCDF4.pyx":1035
+  /* "netCDF4/_netCDF4.pyx":1079
  *     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__29 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__29);
-  __Pyx_GIVEREF(__pyx_slice__29);
+  __pyx_slice__7 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__7);
+  __Pyx_GIVEREF(__pyx_slice__7);
 
-  /* "netCDF4.pyx":1037
+  /* "netCDF4/_netCDF4.pyx":1081
  *     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 array contains ascii strings, write a text attribute (stored as bytes).
+ *     # if array contains unicode strings, and data model is NETCDF4,
  */
-  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__30);
-  __Pyx_GIVEREF(__pyx_tuple__30);
+  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__8);
+  __Pyx_GIVEREF(__pyx_tuple__8);
 
-  /* "netCDF4.pyx":1057
+  /* "netCDF4/_netCDF4.pyx":1107
  *         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__31 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__31);
-  __Pyx_GIVEREF(__pyx_slice__31);
+  __pyx_slice__9 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__9);
+  __Pyx_GIVEREF(__pyx_slice__9);
 
-  /* "netCDF4.pyx":1058
+  /* "netCDF4/_netCDF4.pyx":1108
  *             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__32 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__32);
-  __Pyx_GIVEREF(__pyx_slice__32);
+  __pyx_slice__10 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__10);
+  __Pyx_GIVEREF(__pyx_slice__10);
 
-  /* "netCDF4.pyx":1060
+  /* "netCDF4/_netCDF4.pyx":1110
  *             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__33 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__33);
-  __Pyx_GIVEREF(__pyx_slice__33);
+  __pyx_slice__11 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__11);
+  __Pyx_GIVEREF(__pyx_slice__11);
+
+  /* "netCDF4/_netCDF4.pyx":1587
+ *         # last name in path, could be a variable or group
+ *         dirname, lastname = posixpath.split(elem)
+ *         nestedgroups = dirname.split('/')             # <<<<<<<<<<<<<<
+ *         group = self
+ *         # iterate over groups in path.
+ */
+  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s__14); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__15);
+  __Pyx_GIVEREF(__pyx_tuple__15);
 
-  /* "netCDF4.pyx":1560
+  /* "netCDF4/_netCDF4.pyx":1632
  *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
  *         (((_tostr(self.variables[varname].dimensions)
  *         .replace("u'",""))\             # <<<<<<<<<<<<<<
  *         .replace("'",""))\
  *         .replace(", ",","))\
  */
-  __pyx_tuple__36 = PyTuple_Pack(2, __pyx_kp_s_u, __pyx_kp_s__15); if (unlikely(!__pyx_tuple__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__36);
-  __Pyx_GIVEREF(__pyx_tuple__36);
+  __pyx_tuple__16 = PyTuple_Pack(2, __pyx_kp_s_u, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__16);
+  __Pyx_GIVEREF(__pyx_tuple__16);
 
-  /* "netCDF4.pyx":1561
+  /* "netCDF4/_netCDF4.pyx":1633
  *         (((_tostr(self.variables[varname].dimensions)
  *         .replace("u'",""))\
  *         .replace("'",""))\             # <<<<<<<<<<<<<<
  *         .replace(", ",","))\
  *         .replace(",)",")") for varname in self.variables.keys()])
  */
-  __pyx_tuple__38 = PyTuple_Pack(2, __pyx_kp_s__37, __pyx_kp_s__15); if (unlikely(!__pyx_tuple__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__38);
-  __Pyx_GIVEREF(__pyx_tuple__38);
+  __pyx_tuple__18 = PyTuple_Pack(2, __pyx_kp_s__17, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__18);
+  __Pyx_GIVEREF(__pyx_tuple__18);
 
-  /* "netCDF4.pyx":1562
+  /* "netCDF4/_netCDF4.pyx":1634
  *         .replace("u'",""))\
  *         .replace("'",""))\
  *         .replace(", ",","))\             # <<<<<<<<<<<<<<
  *         .replace(",)",")") for varname in self.variables.keys()])
  *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
  */
-  __pyx_tuple__41 = PyTuple_Pack(2, __pyx_kp_s__39, __pyx_kp_s__40); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__41);
-  __Pyx_GIVEREF(__pyx_tuple__41);
+  __pyx_tuple__21 = PyTuple_Pack(2, __pyx_kp_s__19, __pyx_kp_s__20); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__21);
+  __Pyx_GIVEREF(__pyx_tuple__21);
 
-  /* "netCDF4.pyx":1563
+  /* "netCDF4/_netCDF4.pyx":1635
  *         .replace("'",""))\
  *         .replace(", ",","))\
  *         .replace(",)",")") for varname in self.variables.keys()])             # <<<<<<<<<<<<<<
  *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
  *         if self.path == '/':
  */
-  __pyx_tuple__44 = PyTuple_Pack(2, __pyx_kp_s__42, __pyx_kp_s__43); if (unlikely(!__pyx_tuple__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__44);
-  __Pyx_GIVEREF(__pyx_tuple__44);
+  __pyx_tuple__24 = PyTuple_Pack(2, __pyx_kp_s__22, __pyx_kp_s__23); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__24);
+  __Pyx_GIVEREF(__pyx_tuple__24);
+
+  /* "netCDF4/_netCDF4.pyx":1966
+ *         # if group specified as a path, split out group names
+ *         groupname = posixpath.normpath(groupname)
+ *         nestedgroups = groupname.split('/')             # <<<<<<<<<<<<<<
+ *         group = self
+ *         # loop over group names, create parent groups if they do not already
+ */
+  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s__14); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__25);
+  __Pyx_GIVEREF(__pyx_tuple__25);
 
-  /* "netCDF4.pyx":1942
+  /* "netCDF4/_netCDF4.pyx":2049
  *         if name not in _private_atts:
  *             self.setncattr(name, value)
  *         elif not name.endswith('__'):             # <<<<<<<<<<<<<<
  *             if hasattr(self,name):
  *                 raise AttributeError(
  */
-  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_n_s__45); if (unlikely(!__pyx_tuple__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__46);
-  __Pyx_GIVEREF(__pyx_tuple__46);
+  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_s__26); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__27);
+  __Pyx_GIVEREF(__pyx_tuple__27);
 
-  /* "netCDF4.pyx":1952
+  /* "netCDF4/_netCDF4.pyx":2059
  *         # 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__47 = PyTuple_Pack(1, __pyx_n_s__45); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__47);
-  __Pyx_GIVEREF(__pyx_tuple__47);
-  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_n_s__45); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__48);
-  __Pyx_GIVEREF(__pyx_tuple__48);
+  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_s__26); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__28);
+  __Pyx_GIVEREF(__pyx_tuple__28);
+  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s__26); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__29);
+  __Pyx_GIVEREF(__pyx_tuple__29);
 
-  /* "netCDF4.pyx":2158
+  /* "netCDF4/_netCDF4.pyx":2267
  * 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__49 = PyTuple_Pack(1, __pyx_kp_s_cannot_close_a_L_Group_only_appl); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__49);
-  __Pyx_GIVEREF(__pyx_tuple__49);
+  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_cannot_close_a_L_Group_only_appl); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__30);
+  __Pyx_GIVEREF(__pyx_tuple__30);
 
-  /* "netCDF4.pyx":2175
+  /* "netCDF4/_netCDF4.pyx":2284
  *             return self._getname()
  *         def __set__(self,value):
  *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
  * 
  * 
  */
-  __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 = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__50);
-  __Pyx_GIVEREF(__pyx_tuple__50);
+  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__31);
+  __Pyx_GIVEREF(__pyx_tuple__31);
 
-  /* "netCDF4.pyx":2254
+  /* "netCDF4/_netCDF4.pyx":2363
  *             return self._getname()
  *         def __set__(self,value):
  *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
  * 
  *     def __repr__(self):
  */
-  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__51);
-  __Pyx_GIVEREF(__pyx_tuple__51);
+  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__32);
+  __Pyx_GIVEREF(__pyx_tuple__32);
 
-  /* "netCDF4.pyx":2524
+  /* "netCDF4/_netCDF4.pyx":2640
  *             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__54 = PyTuple_Pack(1, __pyx_kp_s_Variable_length_strings_are_only); if (unlikely(!__pyx_tuple__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__54);
-  __Pyx_GIVEREF(__pyx_tuple__54);
+  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_Variable_length_strings_are_only); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__35);
+  __Pyx_GIVEREF(__pyx_tuple__35);
 
-  /* "netCDF4.pyx":2534
+  /* "netCDF4/_netCDF4.pyx":2650
  *             # 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__55 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__55);
-  __Pyx_GIVEREF(__pyx_slice__55);
+  __pyx_slice__36 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__36);
+  __Pyx_GIVEREF(__pyx_slice__36);
 
-  /* "netCDF4.pyx":2538
+  /* "netCDF4/_netCDF4.pyx":2654
  *             # 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__56 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__56);
-  __Pyx_GIVEREF(__pyx_slice__56);
+  __pyx_slice__37 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__37);
+  __Pyx_GIVEREF(__pyx_slice__37);
 
-  /* "netCDF4.pyx":2574
+  /* "netCDF4/_netCDF4.pyx":2690
  *             # 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__57 = PyTuple_Pack(1, __pyx_n_s_NETCDF4); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__57);
-  __Pyx_GIVEREF(__pyx_tuple__57);
+  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_NETCDF4); if (unlikely(!__pyx_tuple__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__38);
+  __Pyx_GIVEREF(__pyx_tuple__38);
 
-  /* "netCDF4.pyx":2616
+  /* "netCDF4/_netCDF4.pyx":2732
  *                         icontiguous = NC_CONTIGUOUS
  *                         if chunksizes is not None:
  *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')             # <<<<<<<<<<<<<<
  *                     else:
  *                         icontiguous = NC_CHUNKED
  */
-  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_cannot_specify_chunksizes_for_a); if (unlikely(!__pyx_tuple__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__58);
-  __Pyx_GIVEREF(__pyx_tuple__58);
+  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_cannot_specify_chunksizes_for_a); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__39);
+  __Pyx_GIVEREF(__pyx_tuple__39);
 
-  /* "netCDF4.pyx":2624
+  /* "netCDF4/_netCDF4.pyx":2740
  *                         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__59 = PyTuple_Pack(1, __pyx_kp_s_chunksizes_must_be_a_sequence_wi); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__59);
-  __Pyx_GIVEREF(__pyx_tuple__59);
+  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_chunksizes_must_be_a_sequence_wi); if (unlikely(!__pyx_tuple__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__40);
+  __Pyx_GIVEREF(__pyx_tuple__40);
 
-  /* "netCDF4.pyx":2671
+  /* "netCDF4/_netCDF4.pyx":2787
  *                         _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__60 = PyTuple_Pack(1, __pyx_kp_s_cannot_set__FillValue_attribute); if (unlikely(!__pyx_tuple__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__60);
-  __Pyx_GIVEREF(__pyx_tuple__60);
+  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_cannot_set__FillValue_attribute); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__41);
+  __Pyx_GIVEREF(__pyx_tuple__41);
 
-  /* "netCDF4.pyx":2746
+  /* "netCDF4/_netCDF4.pyx":2862
  *                     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__61 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__61);
-  __Pyx_GIVEREF(__pyx_slice__61);
+  __pyx_slice__42 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__42);
+  __Pyx_GIVEREF(__pyx_slice__42);
 
-  /* "netCDF4.pyx":2747
+  /* "netCDF4/_netCDF4.pyx":2863
  *                 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__62 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__62);
-  __Pyx_GIVEREF(__pyx_slice__62);
+  __pyx_slice__43 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__43);
+  __Pyx_GIVEREF(__pyx_slice__43);
 
-  /* "netCDF4.pyx":2800
+  /* "netCDF4/_netCDF4.pyx":2916
  *             return self._getname()
  *         def __set__(self,value):
  *             raise AttributeError("name cannot be altered")             # <<<<<<<<<<<<<<
  * 
  *     property datatype:
  */
-  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__63);
-  __Pyx_GIVEREF(__pyx_tuple__63);
+  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_name_cannot_be_altered); if (unlikely(!__pyx_tuple__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__44);
+  __Pyx_GIVEREF(__pyx_tuple__44);
 
-  /* "netCDF4.pyx":2822
+  /* "netCDF4/_netCDF4.pyx":2938
  *             return shape
  *         def __set__(self,value):
  *             raise AttributeError("shape cannot be altered")             # <<<<<<<<<<<<<<
  * 
  *     property size:
  */
-  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_shape_cannot_be_altered); if (unlikely(!__pyx_tuple__64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__64);
-  __Pyx_GIVEREF(__pyx_tuple__64);
+  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_shape_cannot_be_altered); if (unlikely(!__pyx_tuple__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__45);
+  __Pyx_GIVEREF(__pyx_tuple__45);
 
-  /* "netCDF4.pyx":2834
+  /* "netCDF4/_netCDF4.pyx":2950
  *             return self._getdims()
  *         def __set__(self,value):
  *             raise AttributeError("dimensions cannot be altered")             # <<<<<<<<<<<<<<
  * 
  * 
  */
-  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_dimensions_cannot_be_altered); if (unlikely(!__pyx_tuple__65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__65);
-  __Pyx_GIVEREF(__pyx_tuple__65);
+  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_dimensions_cannot_be_altered); if (unlikely(!__pyx_tuple__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__46);
+  __Pyx_GIVEREF(__pyx_tuple__46);
 
-  /* "netCDF4.pyx":3044
+  /* "netCDF4/_netCDF4.pyx":3160
  *                 value = numpy.array(value, self.dtype)
  *             self.setncattr(name, value)
  *         elif not name.endswith('__'):             # <<<<<<<<<<<<<<
  *             if hasattr(self,name):
  *                 raise AttributeError(
  */
-  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_s__45); if (unlikely(!__pyx_tuple__66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__66);
-  __Pyx_GIVEREF(__pyx_tuple__66);
+  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_n_s__26); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__47);
+  __Pyx_GIVEREF(__pyx_tuple__47);
 
-  /* "netCDF4.pyx":3054
+  /* "netCDF4/_netCDF4.pyx":3170
  *         # 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__67 = PyTuple_Pack(1, __pyx_n_s__45); if (unlikely(!__pyx_tuple__67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__67);
-  __Pyx_GIVEREF(__pyx_tuple__67);
-  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_n_s__45); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__68);
-  __Pyx_GIVEREF(__pyx_tuple__68);
+  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_n_s__26); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__48);
+  __Pyx_GIVEREF(__pyx_tuple__48);
+  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_n_s__26); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__49);
+  __Pyx_GIVEREF(__pyx_tuple__49);
 
-  /* "netCDF4.pyx":3102
+  /* "netCDF4/_netCDF4.pyx":3218
  *         # 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__69 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__69);
-  __Pyx_GIVEREF(__pyx_slice__69);
+  __pyx_slice__50 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__50);
+  __Pyx_GIVEREF(__pyx_slice__50);
 
-  /* "netCDF4.pyx":3103
+  /* "netCDF4/_netCDF4.pyx":3219
  *         # 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__70 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__70);
-  __Pyx_GIVEREF(__pyx_slice__70);
+  __pyx_slice__51 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__51);
+  __Pyx_GIVEREF(__pyx_slice__51);
 
-  /* "netCDF4.pyx":3172
+  /* "netCDF4/_netCDF4.pyx":3288
  *             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__71 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__71);
-  __Pyx_GIVEREF(__pyx_tuple__71);
+  __pyx_tuple__52 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__52);
+  __Pyx_GIVEREF(__pyx_tuple__52);
 
-  /* "netCDF4.pyx":3200
+  /* "netCDF4/_netCDF4.pyx":3316
  *             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__72 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__72);
-  __Pyx_GIVEREF(__pyx_tuple__72);
+  __pyx_tuple__53 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__53);
+  __Pyx_GIVEREF(__pyx_tuple__53);
 
-  /* "netCDF4.pyx":3235
+  /* "netCDF4/_netCDF4.pyx":3351
  *             # 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__73 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__73);
-  __Pyx_GIVEREF(__pyx_slice__73);
+  __pyx_slice__54 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__54);
+  __Pyx_GIVEREF(__pyx_slice__54);
 
-  /* "netCDF4.pyx":3236
+  /* "netCDF4/_netCDF4.pyx":3352
  *             # 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__74 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__74);
-  __Pyx_GIVEREF(__pyx_slice__74);
+  __pyx_slice__55 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__55);
+  __Pyx_GIVEREF(__pyx_slice__55);
 
-  /* "netCDF4.pyx":3241
+  /* "netCDF4/_netCDF4.pyx":3357
  *                 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__75 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__75);
-  __Pyx_GIVEREF(__pyx_tuple__75);
+  __pyx_tuple__56 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__56);
+  __Pyx_GIVEREF(__pyx_tuple__56);
 
-  /* "netCDF4.pyx":3267
+  /* "netCDF4/_netCDF4.pyx":3383
  *         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__76 = PyTuple_Pack(1, __pyx_kp_s_assign_vlen_method_only_for_use); if (unlikely(!__pyx_tuple__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__76);
-  __Pyx_GIVEREF(__pyx_tuple__76);
+  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_assign_vlen_method_only_for_use); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__57);
+  __Pyx_GIVEREF(__pyx_tuple__57);
 
-  /* "netCDF4.pyx":3279
+  /* "netCDF4/_netCDF4.pyx":3395
  *                     elem = self.shape[0]+elem
  *                 else:
  *                     raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
  *         elif isinstance(elem, tuple):
  *             if len(elem) != ndims:
  */
-  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__77);
-  __Pyx_GIVEREF(__pyx_tuple__77);
+  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__58);
+  __Pyx_GIVEREF(__pyx_tuple__58);
 
-  /* "netCDF4.pyx":3282
+  /* "netCDF4/_netCDF4.pyx":3398
  *         elif isinstance(elem, tuple):
  *             if len(elem) != ndims:
  *                 raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
  *             elemnew = []
  *             for n,e in enumerate(elem):
  */
-  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__78);
-  __Pyx_GIVEREF(__pyx_tuple__78);
+  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__59);
+  __Pyx_GIVEREF(__pyx_tuple__59);
 
-  /* "netCDF4.pyx":3290
+  /* "netCDF4/_netCDF4.pyx":3406
  *                     enew = self.shape[n]+e
  *                     if enew < 0:
  *                         raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
  *                     else:
  *                         elemnew.append(self.shape[n]+e)
  */
-  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__79);
-  __Pyx_GIVEREF(__pyx_tuple__79);
+  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__60);
+  __Pyx_GIVEREF(__pyx_tuple__60);
 
-  /* "netCDF4.pyx":3438
+  /* "netCDF4/_netCDF4.pyx":3554
  *                         fillval = self._FillValue
  *                     else:
  *                         fillval = default_fillvals[self.dtype.str[1:]]             # <<<<<<<<<<<<<<
  *                     data = data.filled(fill_value=fillval)
  * 
  */
-  __pyx_slice__80 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__80);
-  __Pyx_GIVEREF(__pyx_slice__80);
+  __pyx_slice__61 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__61);
+  __Pyx_GIVEREF(__pyx_slice__61);
 
-  /* "netCDF4.pyx":3465
+  /* "netCDF4/_netCDF4.pyx":3581
  * 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__81 = PyTuple_Pack(1, __pyx_kp_s_to_assign_values_to_a_non_scalar); if (unlikely(!__pyx_tuple__81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__81);
-  __Pyx_GIVEREF(__pyx_tuple__81);
+  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_to_assign_values_to_a_non_scalar); if (unlikely(!__pyx_tuple__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__62);
+  __Pyx_GIVEREF(__pyx_tuple__62);
 
-  /* "netCDF4.pyx":3466
+  /* "netCDF4/_netCDF4.pyx":3582
  *         if len(self.dimensions):
  *             raise IndexError('to assign values to a non-scalar variable, use a slice')
  *         self[:]=val             # <<<<<<<<<<<<<<
  * 
  *     def getValue(self):
  */
-  __pyx_slice__82 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__82);
-  __Pyx_GIVEREF(__pyx_slice__82);
+  __pyx_slice__63 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__63);
+  __Pyx_GIVEREF(__pyx_slice__63);
 
-  /* "netCDF4.pyx":3475
+  /* "netCDF4/_netCDF4.pyx":3591
  * 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__83 = PyTuple_Pack(1, __pyx_kp_s_to_retrieve_values_from_a_non_sc); if (unlikely(!__pyx_tuple__83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__83);
-  __Pyx_GIVEREF(__pyx_tuple__83);
+  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_to_retrieve_values_from_a_non_sc); if (unlikely(!__pyx_tuple__64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__64);
+  __Pyx_GIVEREF(__pyx_tuple__64);
 
-  /* "netCDF4.pyx":3476
+  /* "netCDF4/_netCDF4.pyx":3592
  *         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__84 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__84);
-  __Pyx_GIVEREF(__pyx_slice__84);
+  __pyx_slice__65 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__65);
+  __Pyx_GIVEREF(__pyx_slice__65);
 
-  /* "netCDF4.pyx":3614
+  /* "netCDF4/_netCDF4.pyx":3730
  *                 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__85 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__85);
-  __Pyx_GIVEREF(__pyx_slice__85);
+  __pyx_slice__66 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__66);
+  __Pyx_GIVEREF(__pyx_slice__66);
 
-  /* "netCDF4.pyx":3618
+  /* "netCDF4/_netCDF4.pyx":3734
  *                 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__86 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__86);
-  __Pyx_GIVEREF(__pyx_slice__86);
+  __pyx_slice__67 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__67);
+  __Pyx_GIVEREF(__pyx_slice__67);
 
-  /* "netCDF4.pyx":3624
+  /* "netCDF4/_netCDF4.pyx":3740
  *         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__87 = PyTuple_Pack(1, __pyx_kp_s_size_of_data_array_does_not_conf); if (unlikely(!__pyx_tuple__87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__87);
-  __Pyx_GIVEREF(__pyx_tuple__87);
+  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_size_of_data_array_does_not_conf); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__68);
+  __Pyx_GIVEREF(__pyx_tuple__68);
 
-  /* "netCDF4.pyx":3638
+  /* "netCDF4/_netCDF4.pyx":3754
  *             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__88 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__88);
-  __Pyx_GIVEREF(__pyx_tuple__88);
+  __pyx_tuple__69 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__69);
+  __Pyx_GIVEREF(__pyx_tuple__69);
 
-  /* "netCDF4.pyx":3640
+  /* "netCDF4/_netCDF4.pyx":3756
  *                     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__89 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__89);
-  __Pyx_GIVEREF(__pyx_tuple__89);
+  __pyx_tuple__70 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__70);
+  __Pyx_GIVEREF(__pyx_tuple__70);
 
-  /* "netCDF4.pyx":3643
+  /* "netCDF4/_netCDF4.pyx":3759
  *             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__90 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__90);
-  __Pyx_GIVEREF(__pyx_tuple__90);
+  __pyx_tuple__71 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__71);
+  __Pyx_GIVEREF(__pyx_tuple__71);
 
-  /* "netCDF4.pyx":3645
+  /* "netCDF4/_netCDF4.pyx":3761
  *                     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__91 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__91);
-  __Pyx_GIVEREF(__pyx_tuple__91);
+  __pyx_tuple__72 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__72);
+  __Pyx_GIVEREF(__pyx_tuple__72);
 
-  /* "netCDF4.pyx":3648
+  /* "netCDF4/_netCDF4.pyx":3764
  *             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__92 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__92);
-  __Pyx_GIVEREF(__pyx_tuple__92);
+  __pyx_tuple__73 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__73);
+  __Pyx_GIVEREF(__pyx_tuple__73);
 
-  /* "netCDF4.pyx":3650
+  /* "netCDF4/_netCDF4.pyx":3766
  *                     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__93 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__93);
-  __Pyx_GIVEREF(__pyx_tuple__93);
+  __pyx_tuple__74 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__74);
+  __Pyx_GIVEREF(__pyx_tuple__74);
 
-  /* "netCDF4.pyx":3662
+  /* "netCDF4/_netCDF4.pyx":3778
  *         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__94 = PyTuple_Pack(1, __pyx_kp_s_data_to_put_in_string_variable_m); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__94);
-  __Pyx_GIVEREF(__pyx_tuple__94);
+  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_data_to_put_in_string_variable_m); if (unlikely(!__pyx_tuple__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__75);
+  __Pyx_GIVEREF(__pyx_tuple__75);
 
-  /* "netCDF4.pyx":3681
+  /* "netCDF4/_netCDF4.pyx":3797
  *                                        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__95 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__95);
-  __Pyx_GIVEREF(__pyx_tuple__95);
+  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__76);
+  __Pyx_GIVEREF(__pyx_tuple__76);
 
-  /* "netCDF4.pyx":3697
+  /* "netCDF4/_netCDF4.pyx":3813
  *                     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__96 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__96);
-  __Pyx_GIVEREF(__pyx_slice__96);
+  __pyx_slice__77 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__77);
+  __Pyx_GIVEREF(__pyx_slice__77);
 
-  /* "netCDF4.pyx":3709
+  /* "netCDF4/_netCDF4.pyx":3825
  *                                        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__97 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__97);
-  __Pyx_GIVEREF(__pyx_tuple__97);
+  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__78);
+  __Pyx_GIVEREF(__pyx_tuple__78);
 
-  /* "netCDF4.pyx":3734
+  /* "netCDF4/_netCDF4.pyx":3850
  *         for lendim in count:
  *             if lendim == -1:
  *                 shapeout = shapeout + (1,)             # <<<<<<<<<<<<<<
  *                 squeeze_out = True
  *             else:
  */
-  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__98);
-  __Pyx_GIVEREF(__pyx_tuple__98);
+  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__79);
+  __Pyx_GIVEREF(__pyx_tuple__79);
 
-  /* "netCDF4.pyx":3752
+  /* "netCDF4/_netCDF4.pyx":3868
  *                 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__99 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__99);
-  __Pyx_GIVEREF(__pyx_slice__99);
+  __pyx_slice__80 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__80);
+  __Pyx_GIVEREF(__pyx_slice__80);
 
-  /* "netCDF4.pyx":3756
+  /* "netCDF4/_netCDF4.pyx":3872
  *                 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__100 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__100);
-  __Pyx_GIVEREF(__pyx_slice__100);
+  __pyx_slice__81 = PySlice_New(Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_slice__81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__81);
+  __Pyx_GIVEREF(__pyx_slice__81);
 
-  /* "netCDF4.pyx":3789
+  /* "netCDF4/_netCDF4.pyx":3905
  *                 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__101 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__101);
-  __Pyx_GIVEREF(__pyx_tuple__101);
+  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__82);
+  __Pyx_GIVEREF(__pyx_tuple__82);
 
-  /* "netCDF4.pyx":3813
+  /* "netCDF4/_netCDF4.pyx":3929
  *                                            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__102 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__102);
-  __Pyx_GIVEREF(__pyx_tuple__102);
+  __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__83);
+  __Pyx_GIVEREF(__pyx_tuple__83);
 
-  /* "netCDF4.pyx":3932
+  /* "netCDF4/_netCDF4.pyx":4048
  *         if format.kind != 'V': # scalar primitive type
  *             try:
  *                 xtype_tmp = _nptonctype[format.str[1:]]             # <<<<<<<<<<<<<<
  *             except KeyError:
  *                 raise ValueError('Unsupported compound type element')
  */
-  __pyx_slice__103 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__103);
-  __Pyx_GIVEREF(__pyx_slice__103);
+  __pyx_slice__84 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__84);
+  __Pyx_GIVEREF(__pyx_slice__84);
 
-  /* "netCDF4.pyx":3934
+  /* "netCDF4/_netCDF4.pyx":4050
  *                 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__104 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__104);
-  __Pyx_GIVEREF(__pyx_tuple__104);
+  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__85);
+  __Pyx_GIVEREF(__pyx_tuple__85);
 
-  /* "netCDF4.pyx":3956
+  /* "netCDF4/_netCDF4.pyx":4072
  *                 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__105 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__105);
-  __Pyx_GIVEREF(__pyx_slice__105);
+  __pyx_slice__86 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__86);
+  __Pyx_GIVEREF(__pyx_slice__86);
 
-  /* "netCDF4.pyx":3958
+  /* "netCDF4/_netCDF4.pyx":4074
  *                         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__106 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__106);
-  __Pyx_GIVEREF(__pyx_tuple__106);
+  __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__87);
+  __Pyx_GIVEREF(__pyx_tuple__87);
 
-  /* "netCDF4.pyx":3995
+  /* "netCDF4/_netCDF4.pyx":4111
  *             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__107 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__107);
-  __Pyx_GIVEREF(__pyx_tuple__107);
+  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__88);
+  __Pyx_GIVEREF(__pyx_tuple__88);
 
-  /* "netCDF4.pyx":3997
+  /* "netCDF4/_netCDF4.pyx":4113
  *             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__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 = 3997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__108);
-  __Pyx_GIVEREF(__pyx_tuple__108);
+  __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__89);
+  __Pyx_GIVEREF(__pyx_tuple__89);
 
-  /* "netCDF4.pyx":4058
+  /* "netCDF4/_netCDF4.pyx":4174
  *                 field_type = _read_compound(group, field_typeid, endian=endian)
  *             else:
  *                 raise KeyError('compound field of an unsupported data type')             # <<<<<<<<<<<<<<
  *         if field_shape != ():
  *             formats.append((field_type,field_shape))
  */
-  __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_s_compound_field_of_an_unsupported); if (unlikely(!__pyx_tuple__109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__109);
-  __Pyx_GIVEREF(__pyx_tuple__109);
+  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_s_compound_field_of_an_unsupported); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__90);
+  __Pyx_GIVEREF(__pyx_tuple__90);
 
-  /* "netCDF4.pyx":4149
+  /* "netCDF4/_netCDF4.pyx":4265
  *         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__110 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__110);
-  __Pyx_GIVEREF(__pyx_slice__110);
+  __pyx_slice__91 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__91);
+  __Pyx_GIVEREF(__pyx_slice__91);
 
-  /* "netCDF4.pyx":4152
+  /* "netCDF4/_netCDF4.pyx":4268
  *             # 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__111 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_slice__111);
-  __Pyx_GIVEREF(__pyx_slice__111);
+  __pyx_slice__92 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__92);
+  __Pyx_GIVEREF(__pyx_slice__92);
 
-  /* "netCDF4.pyx":4157
- *                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+  /* "netCDF4/_netCDF4.pyx":4273
+ *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
  *         else:
  *             raise KeyError("unsupported datatype specified for VLEN")             # <<<<<<<<<<<<<<
  *     return xtype, dt
  * 
  */
-  __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_s_unsupported_datatype_specified_f); if (unlikely(!__pyx_tuple__112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__112);
-  __Pyx_GIVEREF(__pyx_tuple__112);
+  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_s_unsupported_datatype_specified_f); if (unlikely(!__pyx_tuple__93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__93);
+  __Pyx_GIVEREF(__pyx_tuple__93);
 
-  /* "netCDF4.pyx":4184
+  /* "netCDF4/_netCDF4.pyx":4300
  *             dt = numpy.dtype(datatype) # 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__113 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__113);
-  __Pyx_GIVEREF(__pyx_tuple__113);
+  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__94);
+  __Pyx_GIVEREF(__pyx_tuple__94);
+
+  /* "netCDF4/_netCDF4.pyx":4331
+ *     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__95 = PyTuple_Pack(1, __pyx_kp_s_no_since_in_unit_string); if (unlikely(!__pyx_tuple__95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__95);
+  __Pyx_GIVEREF(__pyx_tuple__95);
+
+  /* "netCDF4/_netCDF4.pyx":4333
+ *         raise ValueError("no 'since' in unit_string")
+ *     # parse the date string.
+ *     n = timestr.find('since')+6             # <<<<<<<<<<<<<<
+ *     isostring = timestr[n:]
+ *     year, month, day, hour, minute, second, utc_offset =\
+ */
+  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_n_s_since); if (unlikely(!__pyx_tuple__96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__96);
+  __Pyx_GIVEREF(__pyx_tuple__96);
+
+  /* "netCDF4/_netCDF4.pyx":4360
+ * (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__97 = PyTuple_Pack(1, __pyx_kp_s_dtype_must_string_or_unicode_S_o); if (unlikely(!__pyx_tuple__97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__97);
+  __Pyx_GIVEREF(__pyx_tuple__97);
+
+  /* "netCDF4/_netCDF4.pyx":4379
+ *     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__98 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__98);
+  __Pyx_GIVEREF(__pyx_tuple__98);
+
+  /* "netCDF4/_netCDF4.pyx":4398
+ *     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__99 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__99);
+  __Pyx_GIVEREF(__pyx_tuple__99);
+
+  /* "netCDF4/_netCDF4.pyx":4402
+ *     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__100 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__100);
+  __Pyx_GIVEREF(__pyx_slice__100);
+
+  /* "netCDF4/_netCDF4.pyx":4475
+ *                     times.append(totaltime/1.e6/3600./24.)
+ *                 else:
+ *                     raise ValueError('unsupported time units')             # <<<<<<<<<<<<<<
+ *         if isscalar:
+ *             return times[0]
+ */
+  __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__101);
+  __Pyx_GIVEREF(__pyx_tuple__101);
+
+  /* "netCDF4/_netCDF4.pyx":4561
+ *                     tsecs = time*86400.
+ *                 else:
+ *                     raise ValueError('unsupported time units')             # <<<<<<<<<<<<<<
+ *                 # compute time delta.
+ *                 days = tsecs // 86400.
+ */
+  __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_s_unsupported_time_units); if (unlikely(!__pyx_tuple__102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__102);
+  __Pyx_GIVEREF(__pyx_tuple__102);
+
+  /* "netCDF4/_netCDF4.pyx":4691
+ *         # 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__103 = PyTuple_Pack(1, __pyx_n_s_http); if (unlikely(!__pyx_tuple__103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__103);
+  __Pyx_GIVEREF(__pyx_tuple__103);
+
+  /* "netCDF4/_netCDF4.pyx":4753
+ *         # 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__104 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__104);
+  __Pyx_GIVEREF(__pyx_slice__104);
+
+  /* "netCDF4/_netCDF4.pyx":4764
+ *                     #if not vInst.dimensions[0] != aggDimName:
+ * 
+ *                     masterDims, masterShape, masterType = masterRecVar[v][:3]             # <<<<<<<<<<<<<<
+ *                     extDims = varInfo[v].dimensions
+ *                     extShape = varInfo[v].shape
+ */
+  __pyx_slice__105 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__105);
+  __Pyx_GIVEREF(__pyx_slice__105);
+
+  /* "netCDF4/_netCDF4.pyx":4781
+ *                                        "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__106 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__106);
+  __Pyx_GIVEREF(__pyx_slice__106);
+  __pyx_slice__107 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__107);
+  __Pyx_GIVEREF(__pyx_slice__107);
+
+  /* "netCDF4/_netCDF4.pyx":4824
+ *         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__108 = PyTuple_Pack(1, __pyx_kp_s_MFNetCDF4_only_works_with_NETCDF); if (unlikely(!__pyx_tuple__108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__108);
+  __Pyx_GIVEREF(__pyx_tuple__108);
+
+  /* "netCDF4/_netCDF4.pyx":4932
+ *     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__109 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__109);
+  __Pyx_GIVEREF(__pyx_slice__109);
+
+  /* "netCDF4/_netCDF4.pyx":4953
+ *         # 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__110 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__110);
+  __Pyx_GIVEREF(__pyx_slice__110);
+
+  /* "netCDF4/_netCDF4.pyx":4954
+ *         # 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__111 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__111);
+  __Pyx_GIVEREF(__pyx_slice__111);
+
+  /* "netCDF4/_netCDF4.pyx":4971
+ *             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__112 = PyTuple_Pack(1, __pyx_kp_s_negative_strides_not_allowed_whe); if (unlikely(!__pyx_tuple__112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__112);
+  __Pyx_GIVEREF(__pyx_tuple__112);
+
+  /* "netCDF4/_netCDF4.pyx":4995
+ * 
+ *             # 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__113 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_slice__113);
+  __Pyx_GIVEREF(__pyx_slice__113);
+
+  /* "netCDF4/_netCDF4.pyx":5096
+ *         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__114 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_time_va); if (unlikely(!__pyx_tuple__114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__114);
+  __Pyx_GIVEREF(__pyx_tuple__114);
+
+  /* "netCDF4/_netCDF4.pyx":5100
+ *         # 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__115 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_same_ti); if (unlikely(!__pyx_tuple__115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__115);
+  __Pyx_GIVEREF(__pyx_tuple__115);
+
+  /* "netCDF4/_netCDF4.pyx":5106
+ * 
+ *         # 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__116 = PyTuple_Pack(3, __pyx_int_1900, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__116);
+  __Pyx_GIVEREF(__pyx_tuple__116);
 
-  /* "netCDF4.pyx":781
+  /* "netCDF4/_netCDF4.pyx":820
  *         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__114 = PyTuple_Pack(1, __pyx_kp_s_please_install_ordereddict_https); if (unlikely(!__pyx_tuple__114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__114);
-  __Pyx_GIVEREF(__pyx_tuple__114);
+  __pyx_tuple__117 = PyTuple_Pack(1, __pyx_kp_s_please_install_ordereddict_https); if (unlikely(!__pyx_tuple__117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__117);
+  __Pyx_GIVEREF(__pyx_tuple__117);
 
-  /* "netCDF4.pyx":800
+  /* "netCDF4/_netCDF4.pyx":839
  * 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__116 = PyTuple_Pack(1, __pyx_kp_s__115); if (unlikely(!__pyx_tuple__116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__116);
-  __Pyx_GIVEREF(__pyx_tuple__116);
+  __pyx_tuple__119 = PyTuple_Pack(1, __pyx_kp_s__118); if (unlikely(!__pyx_tuple__119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__119);
+  __Pyx_GIVEREF(__pyx_tuple__119);
+
+  /* "netCDF4/_netCDF4.pyx":840
+ * 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__120 = PyTuple_Pack(1, __pyx_kp_s_requires_numpy_version_1_0rc1_or); if (unlikely(!__pyx_tuple__120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__120);
+  __Pyx_GIVEREF(__pyx_tuple__120);
+
+  /* "netCDF4/_netCDF4.pyx":847
+ * # check for required version of netcdf-4 and hdf5.
+ * 
+ * def _gethdf5libversion():             # <<<<<<<<<<<<<<
+ *     majorvers = H5_VERS_MAJOR
+ *     minorvers = H5_VERS_MINOR
+ */
+  __pyx_tuple__121 = PyTuple_Pack(4, __pyx_n_s_majorvers, __pyx_n_s_minorvers, __pyx_n_s_releasevers, __pyx_n_s_patchstring); if (unlikely(!__pyx_tuple__121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__121);
+  __Pyx_GIVEREF(__pyx_tuple__121);
+  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_gethdf5libversion, 847, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4/_netCDF4.pyx":857
+ *         return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
+ * 
+ * def getlibversion():             # <<<<<<<<<<<<<<
+ *     """
+ * getlibversion()
+ */
+  __pyx_codeobj__123 = (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, 857, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4/_netCDF4.pyx":902
+ *                      'f8':NC_FILL_DOUBLE}
+ * 
+ * is_native_little = numpy.dtype('<f4').byteorder == '='             # <<<<<<<<<<<<<<
+ * is_native_big = numpy.dtype('>f4').byteorder == '='
+ * 
+ */
+  __pyx_tuple__124 = PyTuple_Pack(1, __pyx_kp_s_f4_2); if (unlikely(!__pyx_tuple__124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__124);
+  __Pyx_GIVEREF(__pyx_tuple__124);
 
-  /* "netCDF4.pyx":801
- * 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"
+  /* "netCDF4/_netCDF4.pyx":903
+ * 
+ * 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__117 = PyTuple_Pack(1, __pyx_kp_s_requires_numpy_version_1_0rc1_or); if (unlikely(!__pyx_tuple__117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__117);
-  __Pyx_GIVEREF(__pyx_tuple__117);
+  __pyx_tuple__125 = PyTuple_Pack(1, __pyx_kp_s_f4_3); if (unlikely(!__pyx_tuple__125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__125);
+  __Pyx_GIVEREF(__pyx_tuple__125);
 
-  /* "utils.pyx":5
+  /* "netCDF4/_netCDF4.pyx":1011
+ *             return value_arr
+ * 
+ * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
+ *     # Private function to set the netCDF file format
+ *     if format == 'NETCDF4':
+ */
+  __pyx_tuple__126 = PyTuple_Pack(1, __pyx_n_s_format); if (unlikely(!__pyx_tuple__126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __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, 1, 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_set_default_format, 1011, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+
+  /* "netCDF4/_netCDF4.pyx":4321
  * 
  * # start of the gregorian calendar
  * gregorian = datetime(1582,10,15)             # <<<<<<<<<<<<<<
  * 
  * def _dateparse(timestr):
  */
-  __pyx_tuple__118 = PyTuple_Pack(3, __pyx_int_1582, __pyx_int_10, __pyx_int_15); if (unlikely(!__pyx_tuple__118)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__118);
-  __Pyx_GIVEREF(__pyx_tuple__118);
+  __pyx_tuple__128 = PyTuple_Pack(3, __pyx_int_1582, __pyx_int_10, __pyx_int_15); if (unlikely(!__pyx_tuple__128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__128);
+  __Pyx_GIVEREF(__pyx_tuple__128);
 
-  /* "utils.pyx":7
+  /* "netCDF4/_netCDF4.pyx":4323
  * 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__119 = PyTuple_Pack(13, __pyx_n_s_timestr, __pyx_n_s_timestr_split, __pyx_n_s_units, __pyx_n_s_n, __pyx_n_s_isostring, __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_utc_offset, __pyx_n_s_basedate); if (unlikely(!__pyx_tuple__119)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__119);
-  __Pyx_GIVEREF(__pyx_tuple__119);
-  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(1, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_dateparse, 7, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__129 = PyTuple_Pack(13, __pyx_n_s_timestr, __pyx_n_s_timestr_split, __pyx_n_s_units, __pyx_n_s_n, __pyx_n_s_isostring, __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_utc_offset, __pyx_n_s_basedate); if (unlikely(!__pyx_tuple__129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__129);
+  __Pyx_GIVEREF(__pyx_tuple__129);
+  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(1, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_dateparse, 4323, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":28
- * # utility functions (visible from python).
+  /* "netCDF4/_netCDF4.pyx":4342
+ *     return basedate
  * 
  * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
  *     """
  * stringtoarr(a, NUMCHARS,dtype='S')
  */
-  __pyx_tuple__121 = PyTuple_Pack(4, __pyx_n_s_string, __pyx_n_s_NUMCHARS, __pyx_n_s_dtype, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__121)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__121);
-  __Pyx_GIVEREF(__pyx_tuple__121);
-  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __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__122)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__131 = PyTuple_Pack(4, __pyx_n_s_string, __pyx_n_s_NUMCHARS, __pyx_n_s_dtype, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__131);
+  __Pyx_GIVEREF(__pyx_tuple__131);
+  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_stringtoarr, 4342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":51
+  /* "netCDF4/_netCDF4.pyx":4365
  *     return arr
  * 
  * def stringtochar(a):             # <<<<<<<<<<<<<<
  *     """
  * stringtochar(a)
  */
-  __pyx_tuple__123 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_n_s_dtype, __pyx_n_s_b); if (unlikely(!__pyx_tuple__123)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__123);
-  __Pyx_GIVEREF(__pyx_tuple__123);
-  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __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__124)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__133 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_n_s_dtype, __pyx_n_s_b); if (unlikely(!__pyx_tuple__133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__133);
+  __Pyx_GIVEREF(__pyx_tuple__133);
+  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_stringtochar, 4365, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":70
+  /* "netCDF4/_netCDF4.pyx":4384
  *     return b
  * 
  * def chartostring(b):             # <<<<<<<<<<<<<<
  *     """
  * chartostring(b)
  */
-  __pyx_tuple__125 = 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__125)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__125);
-  __Pyx_GIVEREF(__pyx_tuple__125);
-  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __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__126)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__135 = 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__135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__135);
+  __Pyx_GIVEREF(__pyx_tuple__135);
+  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 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_chartostring, 4384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":91
+  /* "netCDF4/_netCDF4.pyx":4405
  *     return a
  * 
  * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
  *     """
  * date2num(dates,units,calendar='standard')
  */
-  __pyx_tuple__127 = PyTuple_Pack(14, __pyx_n_s_dates, __pyx_n_s_units, __pyx_n_s_calendar, __pyx_n_s_basedate, __pyx_n_s_unit, __pyx_n_s_isscalar, __pyx_n_s_shape, __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__127)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__127);
-  __Pyx_GIVEREF(__pyx_tuple__127);
-  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(3, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __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__128)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__137 = PyTuple_Pack(14, __pyx_n_s_dates, __pyx_n_s_units, __pyx_n_s_calendar, __pyx_n_s_basedate, __pyx_n_s_unit, __pyx_n_s_isscalar, __pyx_n_s_shape, __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__137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4405; __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, 14, 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_date2num, 4405, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":168
+  /* "netCDF4/_netCDF4.pyx":4484
  *         return cdftime.date2num(dates)
  * 
  * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
  *     """
  * num2date(times,units,calendar='standard')
  */
-  __pyx_tuple__129 = PyTuple_Pack(19, __pyx_n_s_times, __pyx_n_s_units, __pyx_n_s_calendar, __pyx_n_s_basedate, __pyx_n_s_unit, __pyx_n_s_isscalar, __pyx_n_s_shape, __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__129)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__129);
-  __Pyx_GIVEREF(__pyx_tuple__129);
-  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(3, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __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__130)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__139 = PyTuple_Pack(19, __pyx_n_s_times, __pyx_n_s_units, __pyx_n_s_calendar, __pyx_n_s_basedate, __pyx_n_s_unit, __pyx_n_s_isscalar, __pyx_n_s_shape, __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__139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__139);
+  __Pyx_GIVEREF(__pyx_tuple__139);
+  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(3, 0, 19, 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_num2date, 4484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":261
+  /* "netCDF4/_netCDF4.pyx":4579
  *         return cdftime.num2date(times)
  * 
  * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
  *     """
  * date2index(dates, nctime, calendar=None, select='exact')
  */
-  __pyx_tuple__131 = PyTuple_Pack(6, __pyx_n_s_dates, __pyx_n_s_nctime, __pyx_n_s_calendar, __pyx_n_s_select, __pyx_n_s_basedate, __pyx_n_s_times); if (unlikely(!__pyx_tuple__131)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__131);
-  __Pyx_GIVEREF(__pyx_tuple__131);
-  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_date2index, 261, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "utils.pyx":303
- *         return netcdftime.date2index(dates, nctime, calendar, select)
- * 
- * def getlibversion():             # <<<<<<<<<<<<<<
- *     """
- * getlibversion()
- */
-  __pyx_codeobj__133 = (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, 303, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__141 = PyTuple_Pack(6, __pyx_n_s_dates, __pyx_n_s_nctime, __pyx_n_s_calendar, __pyx_n_s_select, __pyx_n_s_basedate, __pyx_n_s_times); if (unlikely(!__pyx_tuple__141)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__141);
+  __Pyx_GIVEREF(__pyx_tuple__141);
+  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 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_date2index, 4579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":344
+  /* "netCDF4/_netCDF4.pyx":4653
  *     """
  * 
  *     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__134 = 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__134);
-  __Pyx_GIVEREF(__pyx_tuple__134);
-  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(5, 0, 36, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_init, 344, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__143 = 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__143);
+  __Pyx_GIVEREF(__pyx_tuple__143);
+  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(5, 0, 36, 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_init, 4653, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":522
+  /* "netCDF4/_netCDF4.pyx":4830
  *         self._path = '/'
  * 
  *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
  *         """override base class attribute creation"""
  *         self.__dict__[name] = value
  */
-  __pyx_tuple__136 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__136)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__136);
-  __Pyx_GIVEREF(__pyx_tuple__136);
-  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_setattr, 522, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__145 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__145)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__145);
+  __Pyx_GIVEREF(__pyx_tuple__145);
+  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_setattr, 4830, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":526
+  /* "netCDF4/_netCDF4.pyx":4834
  *         self.__dict__[name] = value
  * 
  *     def __getattribute__(self, name):             # <<<<<<<<<<<<<<
  *         if name in ['variables','dimensions','file_format','groups',\
  *                     'data_model','disk_format','path']:
  */
-  __pyx_tuple__138 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__138)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__138);
-  __Pyx_GIVEREF(__pyx_tuple__138);
-  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getattribute, 526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__147 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__147)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__147);
+  __Pyx_GIVEREF(__pyx_tuple__147);
+  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_getattribute, 4834, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":539
+  /* "netCDF4/_netCDF4.pyx":4847
  *             return Dataset.__getattribute__(self, name)
  * 
  *     def ncattrs(self):             # <<<<<<<<<<<<<<
  *         return self._cdf[0].__dict__.keys()
  * 
  */
-  __pyx_tuple__140 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__140)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__140);
-  __Pyx_GIVEREF(__pyx_tuple__140);
-  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_ncattrs, 539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__149 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__149)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4847; __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_ncattrs, 4847, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":542
+  /* "netCDF4/_netCDF4.pyx":4850
  *         return self._cdf[0].__dict__.keys()
  * 
  *     def close(self):             # <<<<<<<<<<<<<<
  *         for dset in self._cdf:
  *             dset.close()
  */
-  __pyx_tuple__142 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__142)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__142);
-  __Pyx_GIVEREF(__pyx_tuple__142);
-  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_close, 542, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__151 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4850; __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, 2, 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_close, 4850, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":546
+  /* "netCDF4/_netCDF4.pyx":4854
  *             dset.close()
  * 
  *     def __repr__(self):             # <<<<<<<<<<<<<<
  *         ncdump = ['%r\n' % type(self)]
  *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
  */
-  __pyx_tuple__144 = 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__144)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__144);
-  __Pyx_GIVEREF(__pyx_tuple__144);
-  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_repr, 546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__153 = 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__153)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4854; __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, 9, 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, 4854, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":565
+  /* "netCDF4/_netCDF4.pyx":4873
  * 
  * class _Dimension(object):
  *     def __init__(self, dimname, dim, dimlens, dimtotlen):             # <<<<<<<<<<<<<<
  *         self.dimlens = dimlens
  *         self.dimtotlen = dimtotlen
  */
-  __pyx_tuple__146 = 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__146)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__146);
-  __Pyx_GIVEREF(__pyx_tuple__146);
-  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_init, 565, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__155 = 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__155)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4873; __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, 5, 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, 4873, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":569
+  /* "netCDF4/_netCDF4.pyx":4877
  *         self.dimtotlen = dimtotlen
  *         self._name = dimname
  *     def __len__(self):             # <<<<<<<<<<<<<<
  *         return self.dimtotlen
  *     def isunlimited(self):
  */
-  __pyx_tuple__148 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__148)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__148);
-  __Pyx_GIVEREF(__pyx_tuple__148);
-  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_len, 569, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__157 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__157)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4877; __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_len, 4877, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":571
+  /* "netCDF4/_netCDF4.pyx":4879
  *     def __len__(self):
  *         return self.dimtotlen
  *     def isunlimited(self):             # <<<<<<<<<<<<<<
  *         return True
  *     def __repr__(self):
  */
-  __pyx_tuple__150 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__150)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__150);
-  __Pyx_GIVEREF(__pyx_tuple__150);
-  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_isunlimited, 571, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__159 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__159)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4879; __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_isunlimited, 4879, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":573
+  /* "netCDF4/_netCDF4.pyx":4881
  *     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__152 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__152)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__152);
-  __Pyx_GIVEREF(__pyx_tuple__152);
-  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_repr, 573, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__161 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__161)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__161);
+  __Pyx_GIVEREF(__pyx_tuple__161);
+  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_repr, 4881, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":580
+  /* "netCDF4/_netCDF4.pyx":4888
  * 
  * class _Variable(object):
  *     def __init__(self, dset, varname, var, recdimname):             # <<<<<<<<<<<<<<
  *         self.dimensions = var.dimensions
  *         self._dset = dset
  */
-  __pyx_tuple__154 = 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__154)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__154);
-  __Pyx_GIVEREF(__pyx_tuple__154);
-  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_init, 580, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__163 = 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__163)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__163);
+  __Pyx_GIVEREF(__pyx_tuple__163);
+  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 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_init, 4888, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":593
+  /* "netCDF4/_netCDF4.pyx":4901
  *         for name, value in var.__dict__.items():
  *             self.__dict__[name] = value
  *     def typecode(self):             # <<<<<<<<<<<<<<
  *         return self.dtype
  *     def ncattrs(self):
  */
-  __pyx_tuple__156 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__156)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__156);
-  __Pyx_GIVEREF(__pyx_tuple__156);
-  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_typecode, 593, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__165 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__165)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4901; __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_typecode, 4901, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":595
+  /* "netCDF4/_netCDF4.pyx":4903
  *     def typecode(self):
  *         return self.dtype
  *     def ncattrs(self):             # <<<<<<<<<<<<<<
  *         return self._mastervar.__dict__.keys()
  *     def __getattr__(self,name):
  */
-  __pyx_tuple__158 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__158)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__158);
-  __Pyx_GIVEREF(__pyx_tuple__158);
-  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_ncattrs, 595, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__167 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__167)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4903; __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, 1, 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_ncattrs, 4903, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":597
+  /* "netCDF4/_netCDF4.pyx":4905
  *     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__160 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__160)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__160);
-  __Pyx_GIVEREF(__pyx_tuple__160);
-  __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getattr, 597, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__169 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__169)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4905; __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, 2, 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_getattr, 4905, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":604
+  /* "netCDF4/_netCDF4.pyx":4912
  *         except:
  *             raise AttributeError(name)
  *     def __repr__(self):             # <<<<<<<<<<<<<<
  *         ncdump_var = ['%r\n' % type(self)]
  *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
  */
-  __pyx_tuple__162 = 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__162)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__162);
-  __Pyx_GIVEREF(__pyx_tuple__162);
-  __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_repr, 604, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__171 = 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__171)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__171);
+  __Pyx_GIVEREF(__pyx_tuple__171);
+  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 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_repr, 4912, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":620
+  /* "netCDF4/_netCDF4.pyx":4928
  *         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__164 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__164)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__164);
-  __Pyx_GIVEREF(__pyx_tuple__164);
-  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_len, 620, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__173 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__173)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__173);
+  __Pyx_GIVEREF(__pyx_tuple__173);
+  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_len, 4928, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":622
+  /* "netCDF4/_netCDF4.pyx":4930
  *     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__166 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_recdimlen); if (unlikely(!__pyx_tuple__166)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__166);
-  __Pyx_GIVEREF(__pyx_tuple__166);
-  __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_shape_2, 622, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__175 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_recdimlen); if (unlikely(!__pyx_tuple__175)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__175);
+  __Pyx_GIVEREF(__pyx_tuple__175);
+  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_shape_2, 4930, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":625
+  /* "netCDF4/_netCDF4.pyx":4933
  *         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__168 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_val, __pyx_n_s_v); if (unlikely(!__pyx_tuple__168)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__168);
-  __Pyx_GIVEREF(__pyx_tuple__168);
-  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_set_auto_maskandscale, 625, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__177 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_val, __pyx_n_s_v); if (unlikely(!__pyx_tuple__177)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__177);
+  __Pyx_GIVEREF(__pyx_tuple__177);
+  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_set_auto_maskandscale, 4933, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":628
+  /* "netCDF4/_netCDF4.pyx":4936
  *         for v in self._recVar:
  *             v.set_auto_maskandscale(val)
  *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
  *         """Get records from a concatenated set of variables."""
  * 
  */
-  __pyx_tuple__170 = 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__170);
-  __Pyx_GIVEREF(__pyx_tuple__170);
-  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(2, 0, 30, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getitem, 628, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__179 = 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__179);
+  __Pyx_GIVEREF(__pyx_tuple__179);
+  __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(2, 0, 30, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getitem, 4936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "utils.pyx":768
+  /* "netCDF4/_netCDF4.pyx":5076
  *     """
  * 
  *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
  *         """
  * Create a time Variable with units consistent across a multifile
  */
-  __pyx_tuple__172 = 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__172)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__172);
-  __Pyx_GIVEREF(__pyx_tuple__172);
-  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_init, 768, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_tuple__174 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__174)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__174);
-  __Pyx_GIVEREF(__pyx_tuple__174);
+  __pyx_tuple__181 = 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__181)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__181);
+  __Pyx_GIVEREF(__pyx_tuple__181);
+  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_init, 5076, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__183 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__183)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__183);
+  __Pyx_GIVEREF(__pyx_tuple__183);
 
-  /* "utils.pyx":814
+  /* "netCDF4/_netCDF4.pyx":5122
  * 
  * 
  *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
  *         return self.__time[elem] + self.__delta[elem]
  */
-  __pyx_tuple__175 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__175)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__175);
-  __Pyx_GIVEREF(__pyx_tuple__175);
-  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getitem, 814, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "netCDF4.pyx":812
- * # check for required version of netcdf-4 and hdf5.
- * 
- * def _gethdf5libversion():             # <<<<<<<<<<<<<<
- *     majorvers = H5_VERS_MAJOR
- *     minorvers = H5_VERS_MINOR
- */
-  __pyx_tuple__177 = PyTuple_Pack(4, __pyx_n_s_majorvers, __pyx_n_s_minorvers, __pyx_n_s_releasevers, __pyx_n_s_patchstring); if (unlikely(!__pyx_tuple__177)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__177);
-  __Pyx_GIVEREF(__pyx_tuple__177);
-  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python_2, __pyx_n_s_gethdf5libversion, 812, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "netCDF4.pyx":858
- *                      'f8':NC_FILL_DOUBLE}
- * 
- * is_native_little = numpy.dtype('<f4').byteorder == '='             # <<<<<<<<<<<<<<
- * is_native_big = numpy.dtype('>f4').byteorder == '='
- * 
- */
-  __pyx_tuple__179 = PyTuple_Pack(1, __pyx_kp_s_f4_2); if (unlikely(!__pyx_tuple__179)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__179);
-  __Pyx_GIVEREF(__pyx_tuple__179);
-
-  /* "netCDF4.pyx":859
- * 
- * 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__180 = PyTuple_Pack(1, __pyx_kp_s_f4_3); if (unlikely(!__pyx_tuple__180)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__180);
-  __Pyx_GIVEREF(__pyx_tuple__180);
-
-  /* "netCDF4.pyx":967
- *             return value_arr
- * 
- * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
- *     # Private function to set the netCDF file format
- *     if format == 'NETCDF4':
- */
-  __pyx_tuple__181 = PyTuple_Pack(1, __pyx_n_s_format); if (unlikely(!__pyx_tuple__181)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_tuple__181);
-  __Pyx_GIVEREF(__pyx_tuple__181);
-  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python_2, __pyx_n_s_set_default_format, 967, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_tuple__184 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__184)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_tuple__184);
+  __Pyx_GIVEREF(__pyx_tuple__184);
+  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_jsw_python_netcdf4_python, __pyx_n_s_getitem, 5122, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_RefNannyFinishContext();
   return 0;
   __pyx_L1_error:;
@@ -63157,11 +64287,11 @@ static int __Pyx_InitGlobals(void) {
 }
 
 #if PY_MAJOR_VERSION < 3
-PyMODINIT_FUNC initnetCDF4(void); /*proto*/
-PyMODINIT_FUNC initnetCDF4(void)
+PyMODINIT_FUNC init_netCDF4(void); /*proto*/
+PyMODINIT_FUNC init_netCDF4(void)
 #else
-PyMODINIT_FUNC PyInit_netCDF4(void); /*proto*/
-PyMODINIT_FUNC PyInit_netCDF4(void)
+PyMODINIT_FUNC PyInit__netCDF4(void); /*proto*/
+PyMODINIT_FUNC PyInit__netCDF4(void)
 #endif
 {
   PyObject *__pyx_t_1 = NULL;
@@ -63195,7 +64325,7 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
           Py_FatalError("failed to import 'refnanny' module");
   }
   #endif
-  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_netCDF4(void)", 0);
+  __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;}
@@ -63217,7 +64347,7 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
   #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);
+  __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
@@ -63234,14 +64364,14 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
   #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 (__pyx_module_is_main_netCDF4___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;}
+    if (!PyDict_GetItemString(modules, "netCDF4._netCDF4")) {
+      if (unlikely(PyDict_SetItemString(modules, "netCDF4._netCDF4", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     }
   }
   #endif
@@ -63253,65 +64383,65 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
   /*--- 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 = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyType_Ready(&__pyx_type_7netCDF4_Dataset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __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 = 1303; __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 = 2090; __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 = 2090; __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 = 2178; __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 = 2178; __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 = 2322; __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 = 2322; __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 = 3843; __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 = 3843; __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 = 4073; __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 = 4073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_ptype_7netCDF4_VLType = &__pyx_type_7netCDF4_VLType;
+  __pyx_ptype_7netCDF4_8_netCDF4_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_7netCDF4_8_netCDF4_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Dataset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_7netCDF4_8_netCDF4_Dataset.tp_print = 0;
+  if (PyObject_SetAttrString(__pyx_m, "Dataset", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dataset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_type_7netCDF4_8_netCDF4_Dataset.tp_weaklistoffset == 0) __pyx_type_7netCDF4_8_netCDF4_Dataset.tp_weaklistoffset = offsetof(struct __pyx_obj_7netCDF4_8_netCDF4_Dataset, __weakref__);
+  __pyx_ptype_7netCDF4_8_netCDF4_Dataset = &__pyx_type_7netCDF4_8_netCDF4_Dataset;
+  __pyx_type_7netCDF4_8_netCDF4_Group.tp_base = __pyx_ptype_7netCDF4_8_netCDF4_Dataset;
+  if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Group) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_7netCDF4_8_netCDF4_Group.tp_print = 0;
+  if (PyObject_SetAttrString(__pyx_m, "Group", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Group) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__pyx_type_7netCDF4_8_netCDF4_Group.tp_weaklistoffset == 0) __pyx_type_7netCDF4_8_netCDF4_Group.tp_weaklistoffset = offsetof(struct __pyx_obj_7netCDF4_8_netCDF4_Group, __pyx_base.__weakref__);
+  __pyx_ptype_7netCDF4_8_netCDF4_Group = &__pyx_type_7netCDF4_8_netCDF4_Group;
+  if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Dimension) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_7netCDF4_8_netCDF4_Dimension.tp_print = 0;
+  if (PyObject_SetAttrString(__pyx_m, "Dimension", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Dimension) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_7netCDF4_8_netCDF4_Dimension = &__pyx_type_7netCDF4_8_netCDF4_Dimension;
+  if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_Variable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_7netCDF4_8_netCDF4_Variable.tp_print = 0;
+  if (PyObject_SetAttrString(__pyx_m, "Variable", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_Variable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_7netCDF4_8_netCDF4_Variable = &__pyx_type_7netCDF4_8_netCDF4_Variable;
+  if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_CompoundType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_7netCDF4_8_netCDF4_CompoundType.tp_print = 0;
+  if (PyObject_SetAttrString(__pyx_m, "CompoundType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_CompoundType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_7netCDF4_8_netCDF4_CompoundType = &__pyx_type_7netCDF4_8_netCDF4_CompoundType;
+  if (PyType_Ready(&__pyx_type_7netCDF4_8_netCDF4_VLType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_type_7netCDF4_8_netCDF4_VLType.tp_print = 0;
+  if (PyObject_SetAttrString(__pyx_m, "VLType", (PyObject *)&__pyx_type_7netCDF4_8_netCDF4_VLType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_ptype_7netCDF4_8_netCDF4_VLType = &__pyx_type_7netCDF4_8_netCDF4_VLType;
   /*--- Type import code ---*/
   /*--- Variable import code ---*/
   /*--- Function import code ---*/
   /*--- Execution code ---*/
 
-  /* "netCDF4.pyx":766
+  /* "netCDF4/_netCDF4.pyx":805
  * 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 = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "netCDF4.pyx":767
+  /* "netCDF4/_netCDF4.pyx":806
  * 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 = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_test) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "netCDF4.pyx":772
+  /* "netCDF4/_netCDF4.pyx":811
  * 
  * # pure python utilities
- * from netCDF4_utils import _StartCountStride, _quantize, _find_dim, _walk_grps, \             # <<<<<<<<<<<<<<
- *                           _out_array_shape, _sortbylist, _tostr
+ * from .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 = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyList_New(7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __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);
@@ -63334,41 +64464,41 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
   __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 = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_utils, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __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 = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __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 = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_StartCountStride, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __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 = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_quantize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __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 = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_quantize, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __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 = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 811; __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 = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_find_dim, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __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 = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 811; __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 = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_walk_grps, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __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 = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 811; __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 = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_out_array_shape, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __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 = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __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 = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sortbylist, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __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 = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tostr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __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 = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tostr, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __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":775
- *                           _out_array_shape, _sortbylist, _tostr
+  /* "netCDF4/_netCDF4.pyx":814
+ *                     _out_array_shape, _sortbylist, _tostr)
  * # try to use built-in ordered dict in python >= 2.7
  * try:             # <<<<<<<<<<<<<<
  *     from collections import OrderedDict
@@ -63381,24 +64511,24 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
     __Pyx_XGOTREF(__pyx_t_5);
     /*try:*/ {
 
-      /* "netCDF4.pyx":776
+      /* "netCDF4/_netCDF4.pyx":815
  * # 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 = 776; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
+      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __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 = 776; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
+      __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 = 815; __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 = 776; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
+      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __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 = 776; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
+      if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __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;
     }
@@ -63410,7 +64540,7 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-    /* "netCDF4.pyx":777
+    /* "netCDF4/_netCDF4.pyx":816
  * try:
  *     from collections import OrderedDict
  * except ImportError: # or else use drop-in substitute             # <<<<<<<<<<<<<<
@@ -63419,13 +64549,13 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
  */
     __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 = 777; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
+      __Pyx_AddTraceback("netCDF4._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 = 816; __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":778
+      /* "netCDF4/_netCDF4.pyx":817
  *     from collections import OrderedDict
  * except ImportError: # or else use drop-in substitute
  *     try:             # <<<<<<<<<<<<<<
@@ -63439,24 +64569,24 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
         __Pyx_XGOTREF(__pyx_t_10);
         /*try:*/ {
 
-          /* "netCDF4.pyx":779
+          /* "netCDF4/_netCDF4.pyx":818
  * 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 = 779; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
+          __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __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 = 779; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
+          __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 = 818; __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 = 779; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
+          __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_12, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __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 = 779; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
+          if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __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;
         }
@@ -63468,7 +64598,7 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
         __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
         __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
 
-        /* "netCDF4.pyx":780
+        /* "netCDF4/_netCDF4.pyx":819
  *     try:
  *         from ordereddict import OrderedDict
  *     except ImportError:             # <<<<<<<<<<<<<<
@@ -63477,24 +64607,24 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
  */
         __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 = 780; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
+          __Pyx_AddTraceback("netCDF4._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 = 819; __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":781
+          /* "netCDF4/_netCDF4.pyx":820
  *         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__114, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
+          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__117, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __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 = 781; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
+          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
         }
         goto __pyx_L14_except_error;
         __pyx_L14_except_error:;
@@ -63525,7 +64655,7 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
     __pyx_L9_try_end:;
   }
 
-  /* "netCDF4.pyx":782
+  /* "netCDF4/_netCDF4.pyx":821
  *     except ImportError:
  *         raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')
  * try:             # <<<<<<<<<<<<<<
@@ -63539,24 +64669,24 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
     __Pyx_XGOTREF(__pyx_t_3);
     /*try:*/ {
 
-      /* "netCDF4.pyx":783
+      /* "netCDF4/_netCDF4.pyx":822
  *         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 = 783; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __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 = 783; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+      __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 = 822; __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 = 783; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+      __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_izip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __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 = 783; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
+      if (PyDict_SetItem(__pyx_d, __pyx_n_s_zip, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __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;
     }
@@ -63573,7 +64703,7 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-    /* "netCDF4.pyx":784
+    /* "netCDF4/_netCDF4.pyx":823
  * try:
  *     from itertools import izip as zip
  * except ImportError:             # <<<<<<<<<<<<<<
@@ -63600,770 +64730,229 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
     __pyx_L29_try_end:;
   }
 
-  /* "netCDF4.pyx":788
+  /* "netCDF4/_netCDF4.pyx":827
  *     pass
  * 
- * __version__ = "1.1.7"             # <<<<<<<<<<<<<<
+ * __version__ = "1.1.8"             # <<<<<<<<<<<<<<
  * 
  * # Initialize numpy
  */
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_1_1_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_1_1_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "netCDF4.pyx":791
+  /* "netCDF4/_netCDF4.pyx":830
  * 
  * # 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 = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_posixpath, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __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 = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_posixpath, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":792
+  /* "netCDF4/_netCDF4.pyx":831
  * # 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 = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_netcdftime, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __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 = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_netcdftime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":793
+  /* "netCDF4/_netCDF4.pyx":832
  * 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 = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __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 = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":794
+  /* "netCDF4/_netCDF4.pyx":833
  * 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 = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_weakref, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __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 = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_weakref, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":795
+  /* "netCDF4/_netCDF4.pyx":834
  * 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 = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __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 = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":796
+  /* "netCDF4/_netCDF4.pyx":835
  * 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 = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __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 = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "netCDF4.pyx":797
+  /* "netCDF4/_netCDF4.pyx":836
  * 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 = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __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 = 797; __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 = 797; __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 = 797; __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":798
- * 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 = 798; __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 = 798; __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 = 798; __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 = 798; __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":799
- * 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 = 799; __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 = 799; __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 = 799; __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 = 799; __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":800
- * 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 = 800; __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 = 800; __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__116, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __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 = 800; __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 = 800; __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 = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  if (__pyx_t_15) {
-
-    /* "netCDF4.pyx":801
- * 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__117, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __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 = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-
-  /* "netCDF4.pyx":802
- * 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, MINYEAR             # <<<<<<<<<<<<<<
- * from netcdftime import _parse_date
- * 
- */
-  __pyx_t_7 = PyList_New(3); 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_INCREF(__pyx_n_s_MINYEAR);
-  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_n_s_MINYEAR);
-  __Pyx_GIVEREF(__pyx_n_s_MINYEAR);
-  __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_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MINYEAR); 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_MINYEAR, __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":2
- * from datetime import timedelta, datetime, MINYEAR
- * from netcdftime import _parse_date             # <<<<<<<<<<<<<<
- * 
- * # start of the gregorian calendar
- */
-  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(__pyx_n_s_parse_date);
-  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_parse_date);
-  __Pyx_GIVEREF(__pyx_n_s_parse_date);
-  __pyx_t_7 = __Pyx_Import(__pyx_n_s_netcdftime, __pyx_t_2, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __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_parse_date); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_date, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 2; __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;
-
-  /* "utils.pyx":5
- * 
- * # start of the gregorian calendar
- * gregorian = datetime(1582,10,15)             # <<<<<<<<<<<<<<
- * 
- * def _dateparse(timestr):
- */
-  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); 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);
-  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__118, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gregorian, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "utils.pyx":7
- * 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_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_1_dateparse, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dateparse, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "utils.pyx":28
- * # utility functions (visible from python).
- * 
- * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
- *     """
- * stringtoarr(a, NUMCHARS,dtype='S')
- */
-  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_3stringtoarr, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtoarr, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "utils.pyx":51
- *     return arr
- * 
- * def stringtochar(a):             # <<<<<<<<<<<<<<
- *     """
- * stringtochar(a)
- */
-  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_5stringtochar, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtochar, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "utils.pyx":70
- *     return b
- * 
- * def chartostring(b):             # <<<<<<<<<<<<<<
- *     """
- * chartostring(b)
- */
-  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_7chartostring, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chartostring, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "utils.pyx":91
- *     return a
- * 
- * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
- *     """
- * date2num(dates,units,calendar='standard')
- */
-  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_9date2num, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2num, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "utils.pyx":168
- *         return cdftime.date2num(dates)
- * 
- * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
- *     """
- * num2date(times,units,calendar='standard')
- */
-  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_11num2date, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_num2date, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "utils.pyx":261
- *         return cdftime.num2date(times)
- * 
- * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
- *     """
- * date2index(dates, nctime, calendar=None, select='exact')
- */
-  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_13date2index, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2index, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "utils.pyx":303
- *         return netcdftime.date2index(dates, nctime, calendar, select)
- * 
- * def getlibversion():             # <<<<<<<<<<<<<<
- *     """
- * getlibversion()
- */
-  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_15getlibversion, NULL, __pyx_n_s_netCDF4); 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_d, __pyx_n_s_getlibversion, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-  /* "utils.pyx":312
- *     return (<char *>nc_inq_libvers()).decode('ascii')
- * 
- * class MFDataset(Dataset):             # <<<<<<<<<<<<<<
- *     """
- * MFDataset(self, files, check=False, aggdim=None, exclude=[])
- */
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)));
-  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)));
-  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 312; __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_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 = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-
-  /* "utils.pyx":344
- *     """
- * 
- *     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__135)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 344; __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 = 344; __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 = 344; __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 = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":522
- *         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__137)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 522; __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 = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":526
- *         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__139)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __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 = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":539
- *             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__141)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 539; __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 = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":542
- *         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__143)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __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 = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":546
- *             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__145)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 546; __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 = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":312
- *     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_7, __pyx_n_s_MFDataset, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 312; __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 = 312; __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;
-
-  /* "utils.pyx":564
- *         return ''.join(ncdump)
- * 
- * class _Dimension(object):             # <<<<<<<<<<<<<<
- *     def __init__(self, dimname, dim, dimlens, dimtotlen):
- *         self.dimlens = dimlens
- */
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(__pyx_builtin_object);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
-  __Pyx_GIVEREF(__pyx_builtin_object);
-  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 836; __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_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 = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-
-  /* "utils.pyx":565
- * 
- * 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__147)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 565; __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 = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":569
- *         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__149)); 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 (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len, __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;
-
-  /* "utils.pyx":571
- *     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__151)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 571; __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 = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":573
- *     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__153)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 573; __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 = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":564
- *         return ''.join(ncdump)
- * 
- * class _Dimension(object):             # <<<<<<<<<<<<<<
- *     def __init__(self, dimname, dim, dimlens, dimtotlen):
- *         self.dimlens = dimlens
- */
-  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_Dimension, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 564; __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 = 564; __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;
-
-  /* "utils.pyx":579
- *             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_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_glob); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(__pyx_builtin_object);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
-  __Pyx_GIVEREF(__pyx_builtin_object);
-  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 579; __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_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 = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-
-  /* "utils.pyx":580
- * 
- * 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__155)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 580; __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 = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":593
- *         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__157)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 593; __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 = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":595
- *     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__159)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 595; __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 = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":597
- *     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__161)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __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 = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":604
- *         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__163)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 604; __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 = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":620
- *         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__165)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 620; __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 = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":622
- *     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__167)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 622; __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 = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":625
- *         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__169)); 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_set_auto_maskandscale, __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":628
- *         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__171)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 628; __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 = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
-
-  /* "utils.pyx":579
- *             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
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_glob, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __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/_netCDF4.pyx":837
+ * import warnings
+ * from glob import glob
+ * from numpy import ma             # <<<<<<<<<<<<<<
+ * from numpy import __version__ as _npversion
+ * if _npversion.split('.')[0] < '1':
  */
-  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_Variable, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 579; __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 = 579; __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_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __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 = 837; __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 = 837; __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 = 837; __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":732
- * 
- * 
- * class MFTime(_Variable):             # <<<<<<<<<<<<<<
- *     """
- * MFTime(self, time, units=None)
+  /* "netCDF4/_netCDF4.pyx":838
+ * 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 = __Pyx_GetModuleGlobalName(__pyx_n_s_Variable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyList_New(1); 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);
-  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 838; __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 = 0;
-  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 838; __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_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 = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_npversion, __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;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "utils.pyx":768
- *     """
- * 
- *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
- *         """
- * Create a time Variable with units consistent across a multifile
+  /* "netCDF4/_netCDF4.pyx":839
+ * 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_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__173)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_13);
-  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_13, __pyx_tuple__174);
-  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_npversion); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __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 = 839; __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__119, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __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 = 839; __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 = 839; __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 = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  if (__pyx_t_15) {
 
-  /* "utils.pyx":814
- * 
- * 
- *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
- *         return self.__time[elem] + self.__delta[elem]
+    /* "netCDF4/_netCDF4.pyx":840
+ * 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_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__176)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 814; __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 = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__120, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __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 = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
 
-  /* "utils.pyx":732
- * 
- * 
- * class MFTime(_Variable):             # <<<<<<<<<<<<<<
- *     """
- * MFTime(self, time, units=None)
+  /* "netCDF4/_netCDF4.pyx":841
+ * if _npversion.split('.')[0] < '1':
+ *     raise ImportError('requires numpy version 1.0rc1 or later')
+ * import_array()             # <<<<<<<<<<<<<<
+ * include "netCDF4.pxi"
+ * include "constants.pyx"
  */
-  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_MFTime, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __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 = 732; __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;
+  import_array();
 
-  /* "netCDF4.pyx":812
+  /* "netCDF4/_netCDF4.pyx":847
  * # check for required version of netcdf-4 and hdf5.
  * 
  * def _gethdf5libversion():             # <<<<<<<<<<<<<<
  *     majorvers = H5_VERS_MAJOR
  *     minorvers = H5_VERS_MINOR
  */
-  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_17_gethdf5libversion, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_1_gethdf5libversion, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gethdf5libversion, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":857
+ *         return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
+ * 
+ * def getlibversion():             # <<<<<<<<<<<<<<
+ *     """
+ * getlibversion()
+ */
+  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_3getlibversion, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gethdf5libversion, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getlibversion, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":822
- *        return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
+  /* "netCDF4/_netCDF4.pyx":866
+ *     return (<char *>nc_inq_libvers()).decode('ascii')
  * 
  * __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 = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_getlibversion); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __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))) {
@@ -64376,14 +64965,14 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
     }
   }
   if (__pyx_t_13) {
-    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   } else {
-    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); 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);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __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;
@@ -64397,27 +64986,27 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
     }
   }
   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 = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __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 = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __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_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_netcdf4libversion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_netcdf4libversion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":823
+  /* "netCDF4/_netCDF4.pyx":867
  * 
  * __netcdf4libversion__ = getlibversion().split()[0]
  * __hdf5libversion__ = _gethdf5libversion()             # <<<<<<<<<<<<<<
  * __has_rename_grp__ = HAS_RENAME_GRP
  * __has_nc_inq_path__ = HAS_NC_INQ_PATH
  */
-  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_gethdf5libversion); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_gethdf5libversion); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
   __pyx_t_2 = NULL;
   if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
@@ -64430,440 +65019,440 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
     }
   }
   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 = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __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 = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_hdf5libversion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_hdf5libversion, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":824
+  /* "netCDF4/_netCDF4.pyx":868
  * __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 = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_rename_grp, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "netCDF4.pyx":825
+  /* "netCDF4/_netCDF4.pyx":869
  * __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 = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_nc_inq_path, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "netCDF4.pyx":826
+  /* "netCDF4/_netCDF4.pyx":870
  * __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 = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_has_nc_inq_format_extended, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "netCDF4.pyx":831
+  /* "netCDF4/_netCDF4.pyx":875
  * # 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 = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_CHAR); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_CHAR); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_U1, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_U1, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":832
+  /* "netCDF4/_netCDF4.pyx":876
  * 
  * _nptonctype  = {'U1' : NC_CHAR,
  *                 'S1' : NC_CHAR,             # <<<<<<<<<<<<<<
  *                 'i1' : NC_BYTE,
  *                 'u1' : NC_UBYTE,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_CHAR); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_CHAR); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_S1, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_S1, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":833
+  /* "netCDF4/_netCDF4.pyx":877
  * _nptonctype  = {'U1' : NC_CHAR,
  *                 'S1' : NC_CHAR,
  *                 'i1' : NC_BYTE,             # <<<<<<<<<<<<<<
  *                 'u1' : NC_UBYTE,
  *                 'i2' : NC_SHORT,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_BYTE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_BYTE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i1, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i1, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":834
+  /* "netCDF4/_netCDF4.pyx":878
  *                 'S1' : NC_CHAR,
  *                 'i1' : NC_BYTE,
  *                 'u1' : NC_UBYTE,             # <<<<<<<<<<<<<<
  *                 'i2' : NC_SHORT,
  *                 'u2' : NC_USHORT,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_UBYTE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_UBYTE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u1, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u1, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":835
+  /* "netCDF4/_netCDF4.pyx":879
  *                 'i1' : NC_BYTE,
  *                 'u1' : NC_UBYTE,
  *                 'i2' : NC_SHORT,             # <<<<<<<<<<<<<<
  *                 'u2' : NC_USHORT,
  *                 'i4' : NC_INT,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_SHORT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_SHORT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":836
+  /* "netCDF4/_netCDF4.pyx":880
  *                 'u1' : NC_UBYTE,
  *                 'i2' : NC_SHORT,
  *                 'u2' : NC_USHORT,             # <<<<<<<<<<<<<<
  *                 'i4' : NC_INT,
  *                 'u4' : NC_UINT,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_USHORT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_USHORT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":837
+  /* "netCDF4/_netCDF4.pyx":881
  *                 'i2' : NC_SHORT,
  *                 'u2' : NC_USHORT,
  *                 'i4' : NC_INT,             # <<<<<<<<<<<<<<
  *                 'u4' : NC_UINT,
  *                 'i8' : NC_INT64,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_INT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_INT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i4, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i4, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":838
+  /* "netCDF4/_netCDF4.pyx":882
  *                 'u2' : NC_USHORT,
  *                 'i4' : NC_INT,
  *                 'u4' : NC_UINT,             # <<<<<<<<<<<<<<
  *                 'i8' : NC_INT64,
  *                 'u8' : NC_UINT64,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_UINT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_UINT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u4, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u4, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":839
+  /* "netCDF4/_netCDF4.pyx":883
  *                 'i4' : NC_INT,
  *                 'u4' : NC_UINT,
  *                 'i8' : NC_INT64,             # <<<<<<<<<<<<<<
  *                 'u8' : NC_UINT64,
  *                 'f4' : NC_FLOAT,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_INT64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_INT64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i8, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i8, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":840
+  /* "netCDF4/_netCDF4.pyx":884
  *                 'u4' : NC_UINT,
  *                 'i8' : NC_INT64,
  *                 'u8' : NC_UINT64,             # <<<<<<<<<<<<<<
  *                 'f4' : NC_FLOAT,
  *                 'f8' : NC_DOUBLE}
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_UINT64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_UINT64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u8, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u8, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":841
+  /* "netCDF4/_netCDF4.pyx":885
  *                 'i8' : NC_INT64,
  *                 'u8' : NC_UINT64,
  *                 'f4' : NC_FLOAT,             # <<<<<<<<<<<<<<
  *                 'f8' : NC_DOUBLE}
  * 
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_FLOAT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_FLOAT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f4, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f4, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":842
+  /* "netCDF4/_netCDF4.pyx":886
  *                 'u8' : NC_UINT64,
  *                 'f4' : NC_FLOAT,
  *                 'f8' : NC_DOUBLE}             # <<<<<<<<<<<<<<
  * 
  * default_fillvals = {#'S1':NC_FILL_CHAR,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_DOUBLE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_DOUBLE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f8, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f8, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nptonctype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nptonctype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":844
+  /* "netCDF4/_netCDF4.pyx":888
  *                 '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 = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __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__24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_S1, __pyx_kp_s__24) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_U1, __pyx_kp_s_) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_S1, __pyx_kp_s_) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "netCDF4.pyx":847
+  /* "netCDF4/_netCDF4.pyx":891
  *                      'U1':'\0',
  *                      'S1':'\0',
  *                      'i1':NC_FILL_BYTE,             # <<<<<<<<<<<<<<
  *                      'u1':NC_FILL_UBYTE,
  *                      'i2':NC_FILL_SHORT,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_FILL_BYTE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_FILL_BYTE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i1, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i1, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":848
+  /* "netCDF4/_netCDF4.pyx":892
  *                      'S1':'\0',
  *                      'i1':NC_FILL_BYTE,
  *                      'u1':NC_FILL_UBYTE,             # <<<<<<<<<<<<<<
  *                      'i2':NC_FILL_SHORT,
  *                      'u2':NC_FILL_USHORT,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_FILL_UBYTE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_FILL_UBYTE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u1, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u1, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":849
+  /* "netCDF4/_netCDF4.pyx":893
  *                      'i1':NC_FILL_BYTE,
  *                      'u1':NC_FILL_UBYTE,
  *                      'i2':NC_FILL_SHORT,             # <<<<<<<<<<<<<<
  *                      'u2':NC_FILL_USHORT,
  *                      'i4':NC_FILL_INT,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_FILL_SHORT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_FILL_SHORT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":850
+  /* "netCDF4/_netCDF4.pyx":894
  *                      'u1':NC_FILL_UBYTE,
  *                      'i2':NC_FILL_SHORT,
  *                      'u2':NC_FILL_USHORT,             # <<<<<<<<<<<<<<
  *                      'i4':NC_FILL_INT,
  *                      'u4':NC_FILL_UINT,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_int(NC_FILL_USHORT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_int(NC_FILL_USHORT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u2, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":851
+  /* "netCDF4/_netCDF4.pyx":895
  *                      'i2':NC_FILL_SHORT,
  *                      'u2':NC_FILL_USHORT,
  *                      'i4':NC_FILL_INT,             # <<<<<<<<<<<<<<
  *                      'u4':NC_FILL_UINT,
  *                      'i8':NC_FILL_INT64,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_long(NC_FILL_INT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_long(NC_FILL_INT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i4, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i4, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":852
+  /* "netCDF4/_netCDF4.pyx":896
  *                      'u2':NC_FILL_USHORT,
  *                      'i4':NC_FILL_INT,
  *                      'u4':NC_FILL_UINT,             # <<<<<<<<<<<<<<
  *                      'i8':NC_FILL_INT64,
  *                      'u8':NC_FILL_UINT64,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(NC_FILL_UINT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(NC_FILL_UINT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u4, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u4, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":853
+  /* "netCDF4/_netCDF4.pyx":897
  *                      'i4':NC_FILL_INT,
  *                      'u4':NC_FILL_UINT,
  *                      'i8':NC_FILL_INT64,             # <<<<<<<<<<<<<<
  *                      'u8':NC_FILL_UINT64,
  *                      'f4':NC_FILL_FLOAT,
  */
-  __pyx_t_7 = __Pyx_PyInt_From_PY_LONG_LONG(NC_FILL_INT64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_PY_LONG_LONG(NC_FILL_INT64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i8, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_i8, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":854
+  /* "netCDF4/_netCDF4.pyx":898
  *                      'u4':NC_FILL_UINT,
  *                      'i8':NC_FILL_INT64,
  *                      'u8':NC_FILL_UINT64,             # <<<<<<<<<<<<<<
  *                      'f4':NC_FILL_FLOAT,
  *                      'f8':NC_FILL_DOUBLE}
  */
-  __pyx_t_7 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(NC_FILL_UINT64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(NC_FILL_UINT64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u8, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_u8, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":855
+  /* "netCDF4/_netCDF4.pyx":899
  *                      'i8':NC_FILL_INT64,
  *                      'u8':NC_FILL_UINT64,
  *                      'f4':NC_FILL_FLOAT,             # <<<<<<<<<<<<<<
  *                      'f8':NC_FILL_DOUBLE}
  * 
  */
-  __pyx_t_7 = PyFloat_FromDouble(NC_FILL_FLOAT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = PyFloat_FromDouble(NC_FILL_FLOAT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f4, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f4, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":856
+  /* "netCDF4/_netCDF4.pyx":900
  *                      'u8':NC_FILL_UINT64,
  *                      'f4':NC_FILL_FLOAT,
  *                      'f8':NC_FILL_DOUBLE}             # <<<<<<<<<<<<<<
  * 
  * is_native_little = numpy.dtype('<f4').byteorder == '='
  */
-  __pyx_t_7 = PyFloat_FromDouble(NC_FILL_DOUBLE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = PyFloat_FromDouble(NC_FILL_DOUBLE); 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);
-  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f8, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f8, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_fillvals, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_fillvals, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":858
+  /* "netCDF4/_netCDF4.pyx":902
  *                      '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 = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 902; __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_Call(__pyx_t_7, __pyx_tuple__179, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__124, NULL); 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_7); __pyx_t_7 = 0;
-  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_byteorder); 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;
-  __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_kp_s__52, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_kp_s__33, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_native_little, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_native_little, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":859
+  /* "netCDF4/_netCDF4.pyx":903
  * 
  * 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 = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __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 = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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 = 903; __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_Call(__pyx_t_7, __pyx_tuple__180, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__125, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_kp_s__52, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_kp_s__33, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_native_big, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_native_big, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":863
+  /* "netCDF4/_netCDF4.pyx":907
  * # 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 = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NC_DISKLESS, __pyx_int_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "netCDF4.pyx":867
+  /* "netCDF4/_netCDF4.pyx":911
  * # 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 = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_encoding, __pyx_kp_s_utf_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "netCDF4.pyx":870
+  /* "netCDF4/_netCDF4.pyx":914
  * # 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 = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_unicode_error, __pyx_n_s_replace) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
-  /* "netCDF4.pyx":871
+  /* "netCDF4/_netCDF4.pyx":915
  * # 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 = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __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_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __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_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_python3, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":873
+  /* "netCDF4/_netCDF4.pyx":917
  * python3 = sys.version_info[0] > 2
  * 
  * _nctonptype = {}             # <<<<<<<<<<<<<<
  * for _key,_value in _nptonctype.items():
  *     _nctonptype[_value] = _key
  */
-  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_7);
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nctonptype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nctonptype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
-  /* "netCDF4.pyx":874
+  /* "netCDF4/_netCDF4.pyx":918
  * 
  * _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 = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __pyx_t_1 = NULL;
@@ -64877,10 +65466,10 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
     }
   }
   if (__pyx_t_1) {
-    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   } else {
-    __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __Pyx_GOTREF(__pyx_t_7);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -64888,9 +65477,9 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
     __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_16 = 0;
     __pyx_t_17 = NULL;
   } else {
-    __pyx_t_16 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_16 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_17 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_17 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   for (;;) {
@@ -64898,16 +65487,16 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
       if (likely(PyList_CheckExact(__pyx_t_2))) {
         if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_2)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_16); __Pyx_INCREF(__pyx_t_7); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_16); __Pyx_INCREF(__pyx_t_7); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       } else {
         if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
         #if CYTHON_COMPILING_IN_CPYTHON
-        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_16); __Pyx_INCREF(__pyx_t_7); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_16); __Pyx_INCREF(__pyx_t_7); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #else
-        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         #endif
       }
     } else {
@@ -64916,7 +65505,7 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
         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 = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
@@ -64932,7 +65521,7 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
       if (unlikely(size != 2)) {
         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
       #if CYTHON_COMPILING_IN_CPYTHON
       if (likely(PyTuple_CheckExact(sequence))) {
@@ -64945,15 +65534,15 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
       __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 = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __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 = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_13 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_13);
       #endif
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
     } else {
       Py_ssize_t index = -1;
-      __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_11);
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       __pyx_t_18 = Py_TYPE(__pyx_t_11)->tp_iternext;
@@ -64961,7 +65550,7 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
       __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 = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __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;
@@ -64969,193 +65558,774 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
       __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 = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __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 = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (PyDict_SetItem(__pyx_d, __pyx_n_s_key, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __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 = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (PyDict_SetItem(__pyx_d, __pyx_n_s_value_2, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+    /* "netCDF4/_netCDF4.pyx":919
+ * _nctonptype = {}
+ * for _key,_value in _nptonctype.items():
+ *     _nctonptype[_value] = _key             # <<<<<<<<<<<<<<
+ * _supportedtypes = _nptonctype.keys()
+ * # make sure NC_CHAR points to S1
+ */
+    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_key); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_7);
+    __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __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 = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    if (unlikely(PyObject_SetItem(__pyx_t_13, __pyx_t_1, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __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;
+
+    /* "netCDF4/_netCDF4.pyx":918
+ * 
+ * _nctonptype = {}
+ * for _key,_value in _nptonctype.items():             # <<<<<<<<<<<<<<
+ *     _nctonptype[_value] = _key
+ * _supportedtypes = _nptonctype.keys()
+ */
+  }
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":920
+ * 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_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __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 && 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);
+    }
+  }
+  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 = 920; __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 = 920; __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_supportedtypes, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":922
+ * _supportedtypes = _nptonctype.keys()
+ * # make sure NC_CHAR points to S1
+ * _nctonptype[NC_CHAR]='S1'             # <<<<<<<<<<<<<<
+ * 
+ * # internal C functions.
+ */
+  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (unlikely(__Pyx_SetItemInt(__pyx_t_2, NC_CHAR, __pyx_n_s_S1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":1011
+ *             return value_arr
+ * 
+ * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
+ *     # Private function to set the netCDF file format
+ *     if format == 'NETCDF4':
+ */
+  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_5_set_default_format, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_format, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":1348
+ * 
+ * _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','__orthogoral_indexing__']
+ */
+  __pyx_t_2 = PyList_New(26); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_n_s_grpid);
+  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_grpid);
+  __Pyx_GIVEREF(__pyx_n_s_grpid);
+  __Pyx_INCREF(__pyx_n_s_grp_2);
+  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_grp_2);
+  __Pyx_GIVEREF(__pyx_n_s_grp_2);
+  __Pyx_INCREF(__pyx_n_s_varid);
+  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_varid);
+  __Pyx_GIVEREF(__pyx_n_s_varid);
+  __Pyx_INCREF(__pyx_n_s_groups);
+  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_groups);
+  __Pyx_GIVEREF(__pyx_n_s_groups);
+  __Pyx_INCREF(__pyx_n_s_dimensions);
+  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_dimensions);
+  __Pyx_GIVEREF(__pyx_n_s_dimensions);
+  __Pyx_INCREF(__pyx_n_s_variables);
+  PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_variables);
+  __Pyx_GIVEREF(__pyx_n_s_variables);
+  __Pyx_INCREF(__pyx_n_s_dtype);
+  PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_dtype);
+  __Pyx_GIVEREF(__pyx_n_s_dtype);
+  __Pyx_INCREF(__pyx_n_s_data_model);
+  PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_s_data_model);
+  __Pyx_GIVEREF(__pyx_n_s_data_model);
+  __Pyx_INCREF(__pyx_n_s_disk_format_2);
+  PyList_SET_ITEM(__pyx_t_2, 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_2, 9, __pyx_n_s_nunlimdim);
+  __Pyx_GIVEREF(__pyx_n_s_nunlimdim);
+  __Pyx_INCREF(__pyx_n_s_path);
+  PyList_SET_ITEM(__pyx_t_2, 10, __pyx_n_s_path);
+  __Pyx_GIVEREF(__pyx_n_s_path);
+  __Pyx_INCREF(__pyx_n_s_parent);
+  PyList_SET_ITEM(__pyx_t_2, 11, __pyx_n_s_parent);
+  __Pyx_GIVEREF(__pyx_n_s_parent);
+  __Pyx_INCREF(__pyx_n_s_ndim);
+  PyList_SET_ITEM(__pyx_t_2, 12, __pyx_n_s_ndim);
+  __Pyx_GIVEREF(__pyx_n_s_ndim);
+  __Pyx_INCREF(__pyx_n_s_mask);
+  PyList_SET_ITEM(__pyx_t_2, 13, __pyx_n_s_mask);
+  __Pyx_GIVEREF(__pyx_n_s_mask);
+  __Pyx_INCREF(__pyx_n_s_scale);
+  PyList_SET_ITEM(__pyx_t_2, 14, __pyx_n_s_scale);
+  __Pyx_GIVEREF(__pyx_n_s_scale);
+  __Pyx_INCREF(__pyx_n_s_cmptypes);
+  PyList_SET_ITEM(__pyx_t_2, 15, __pyx_n_s_cmptypes);
+  __Pyx_GIVEREF(__pyx_n_s_cmptypes);
+  __Pyx_INCREF(__pyx_n_s_vltypes);
+  PyList_SET_ITEM(__pyx_t_2, 16, __pyx_n_s_vltypes);
+  __Pyx_GIVEREF(__pyx_n_s_vltypes);
+  __Pyx_INCREF(__pyx_n_s_isprimitive);
+  PyList_SET_ITEM(__pyx_t_2, 17, __pyx_n_s_isprimitive);
+  __Pyx_GIVEREF(__pyx_n_s_isprimitive);
+  __Pyx_INCREF(__pyx_n_s_file_format);
+  PyList_SET_ITEM(__pyx_t_2, 18, __pyx_n_s_file_format);
+  __Pyx_GIVEREF(__pyx_n_s_file_format);
+  __Pyx_INCREF(__pyx_n_s_isvlen);
+  PyList_SET_ITEM(__pyx_t_2, 19, __pyx_n_s_isvlen);
+  __Pyx_GIVEREF(__pyx_n_s_isvlen);
+  __Pyx_INCREF(__pyx_n_s_iscompound);
+  PyList_SET_ITEM(__pyx_t_2, 20, __pyx_n_s_iscompound);
+  __Pyx_GIVEREF(__pyx_n_s_iscompound);
+  __Pyx_INCREF(__pyx_n_s_cmptype);
+  PyList_SET_ITEM(__pyx_t_2, 21, __pyx_n_s_cmptype);
+  __Pyx_GIVEREF(__pyx_n_s_cmptype);
+  __Pyx_INCREF(__pyx_n_s_vltype);
+  PyList_SET_ITEM(__pyx_t_2, 22, __pyx_n_s_vltype);
+  __Pyx_GIVEREF(__pyx_n_s_vltype);
+  __Pyx_INCREF(__pyx_n_s_keepweakref);
+  PyList_SET_ITEM(__pyx_t_2, 23, __pyx_n_s_keepweakref);
+  __Pyx_GIVEREF(__pyx_n_s_keepweakref);
+  __Pyx_INCREF(__pyx_n_s_name);
+  PyList_SET_ITEM(__pyx_t_2, 24, __pyx_n_s_name);
+  __Pyx_GIVEREF(__pyx_n_s_name);
+  __Pyx_INCREF(__pyx_n_s_orthogoral_indexing);
+  PyList_SET_ITEM(__pyx_t_2, 25, __pyx_n_s_orthogoral_indexing);
+  __Pyx_GIVEREF(__pyx_n_s_orthogoral_indexing);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_private_atts, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4316
+ * # extra utilities (formerly in utils.pyx)
+ * #----------------------------------------
+ * from datetime import timedelta, datetime, MINYEAR             # <<<<<<<<<<<<<<
+ * from netcdftime import _parse_date, microsec_units, millisec_units,\
+ *                        sec_units, min_units, hr_units, day_units
+ */
+  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_INCREF(__pyx_n_s_timedelta);
+  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_timedelta);
+  __Pyx_GIVEREF(__pyx_n_s_timedelta);
+  __Pyx_INCREF(__pyx_n_s_datetime);
+  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_datetime);
+  __Pyx_GIVEREF(__pyx_n_s_datetime);
+  __Pyx_INCREF(__pyx_n_s_MINYEAR);
+  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_MINYEAR);
+  __Pyx_GIVEREF(__pyx_n_s_MINYEAR);
+  __pyx_t_1 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4316; __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_ImportFrom(__pyx_t_1, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_timedelta, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_MINYEAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MINYEAR, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4317
+ * #----------------------------------------
+ * from datetime import timedelta, datetime, MINYEAR
+ * from netcdftime import _parse_date, microsec_units, millisec_units,\             # <<<<<<<<<<<<<<
+ *                        sec_units, min_units, hr_units, day_units
+ * 
+ */
+  __pyx_t_1 = PyList_New(7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_n_s_parse_date);
+  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_parse_date);
+  __Pyx_GIVEREF(__pyx_n_s_parse_date);
+  __Pyx_INCREF(__pyx_n_s_microsec_units);
+  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_microsec_units);
+  __Pyx_GIVEREF(__pyx_n_s_microsec_units);
+  __Pyx_INCREF(__pyx_n_s_millisec_units);
+  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_millisec_units);
+  __Pyx_GIVEREF(__pyx_n_s_millisec_units);
+  __Pyx_INCREF(__pyx_n_s_sec_units);
+  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_sec_units);
+  __Pyx_GIVEREF(__pyx_n_s_sec_units);
+  __Pyx_INCREF(__pyx_n_s_min_units);
+  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_min_units);
+  __Pyx_GIVEREF(__pyx_n_s_min_units);
+  __Pyx_INCREF(__pyx_n_s_hr_units);
+  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_hr_units);
+  __Pyx_GIVEREF(__pyx_n_s_hr_units);
+  __Pyx_INCREF(__pyx_n_s_day_units);
+  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_day_units);
+  __Pyx_GIVEREF(__pyx_n_s_day_units);
+  __pyx_t_2 = __Pyx_Import(__pyx_n_s_netcdftime, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4317; __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_parse_date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_date, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4317; __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_microsec_units); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_microsec_units, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4317; __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_millisec_units); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_millisec_units, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4317; __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_sec_units); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sec_units, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4318; __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_min_units); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_min_units, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4318; __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_hr_units); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_hr_units, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4318; __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_day_units); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_day_units, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4318; __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/_netCDF4.pyx":4321
+ * 
+ * # start of the gregorian calendar
+ * 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[0]; __pyx_lineno = 4321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__128, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4321; __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_gregorian, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4323
+ * 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_1 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_7_dateparse, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dateparse, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4342
+ *     return basedate
+ * 
+ * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtoarr(a, NUMCHARS,dtype='S')
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9stringtoarr, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtoarr, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4365
+ *     return arr
+ * 
+ * def stringtochar(a):             # <<<<<<<<<<<<<<
+ *     """
+ * stringtochar(a)
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_11stringtochar, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtochar, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4384
+ *     return b
+ * 
+ * def chartostring(b):             # <<<<<<<<<<<<<<
+ *     """
+ * chartostring(b)
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_13chartostring, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chartostring, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4405
+ *     return a
+ * 
+ * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
+ *     """
+ * date2num(dates,units,calendar='standard')
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_15date2num, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2num, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4484
+ *         return cdftime.date2num(dates)
+ * 
+ * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
+ *     """
+ * num2date(times,units,calendar='standard')
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_17num2date, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_num2date, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4579
+ *         return cdftime.num2date(times)
+ * 
+ * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
+ *     """
+ * date2index(dates, nctime, calendar=None, select='exact')
+ */
+  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_19date2index, NULL, __pyx_n_s_netCDF4__netCDF4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2index, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4621
+ *         return netcdftime.date2index(dates, nctime, calendar, select)
+ * 
+ * class MFDataset(Dataset):             # <<<<<<<<<<<<<<
+ *     """
+ * MFDataset(self, files, check=False, aggdim=None, exclude=[])
+ */
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_Dataset)));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_Dataset)));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_8_netCDF4_Dataset)));
+  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_MFDataset, __pyx_n_s_MFDataset, (PyObject *) NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_kp_s_MFDataset_self_files_check_Fals); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+
+  /* "netCDF4/_netCDF4.pyx":4653
+ *     """
+ * 
+ *     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_8_netCDF4_9MFDataset_1__init__, 0, __pyx_n_s_MFDataset___init, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4653; __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[0]; __pyx_lineno = 4653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4653; __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_8_netCDF4_9MFDataset_12__defaults__);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_init, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4830
+ *         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_8_netCDF4_9MFDataset_3__setattr__, 0, __pyx_n_s_MFDataset___setattr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_setattr, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4834
+ *         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_8_netCDF4_9MFDataset_5__getattribute__, 0, __pyx_n_s_MFDataset___getattribute, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_getattribute, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4847
+ *             return Dataset.__getattribute__(self, name)
+ * 
+ *     def ncattrs(self):             # <<<<<<<<<<<<<<
+ *         return self._cdf[0].__dict__.keys()
+ * 
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9MFDataset_7ncattrs, 0, __pyx_n_s_MFDataset_ncattrs, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_ncattrs, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4850
+ *         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_8_netCDF4_9MFDataset_9close, 0, __pyx_n_s_MFDataset_close, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_close, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4854
+ *             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_8_netCDF4_9MFDataset_11__repr__, 0, __pyx_n_s_MFDataset___repr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_repr, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4621
+ *         return netcdftime.date2index(dates, nctime, calendar, select)
+ * 
+ * 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_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4621; __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[0]; __pyx_lineno = 4621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4872
+ *         return ''.join(ncdump)
+ * 
+ * class _Dimension(object):             # <<<<<<<<<<<<<<
+ *     def __init__(self, dimname, dim, dimlens, dimtotlen):
+ *         self.dimlens = dimlens
+ */
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_builtin_object);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
+  __Pyx_GIVEREF(__pyx_builtin_object);
+  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_Dimension, __pyx_n_s_Dimension, (PyObject *) NULL, __pyx_n_s_netCDF4__netCDF4, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+
+  /* "netCDF4/_netCDF4.pyx":4873
+ * 
+ * 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_8_netCDF4_10_Dimension_1__init__, 0, __pyx_n_s_Dimension___init, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_init, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4877
+ *         self.dimtotlen = dimtotlen
+ *         self._name = dimname
+ *     def __len__(self):             # <<<<<<<<<<<<<<
+ *         return self.dimtotlen
+ *     def isunlimited(self):
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_3__len__, 0, __pyx_n_s_Dimension___len, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_len, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4879
+ *     def __len__(self):
+ *         return self.dimtotlen
+ *     def isunlimited(self):             # <<<<<<<<<<<<<<
+ *         return True
+ *     def __repr__(self):
+ */
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_10_Dimension_5isunlimited, 0, __pyx_n_s_Dimension_isunlimited, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_isunlimited, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4881
+ *     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_8_netCDF4_10_Dimension_7__repr__, 0, __pyx_n_s_Dimension___repr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_repr, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4872
+ *         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_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4872; __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[0]; __pyx_lineno = 4872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4887
+ *             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_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_builtin_object);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
+  __Pyx_GIVEREF(__pyx_builtin_object);
+  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_Variable, __pyx_n_s_Variable, (PyObject *) NULL, __pyx_n_s_netCDF4__netCDF4, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
+
+  /* "netCDF4/_netCDF4.pyx":4888
+ * 
+ * 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_8_netCDF4_9_Variable_1__init__, 0, __pyx_n_s_Variable___init, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_init, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
 
-    /* "netCDF4.pyx":875
- * _nctonptype = {}
- * for _key,_value in _nptonctype.items():
- *     _nctonptype[_value] = _key             # <<<<<<<<<<<<<<
- * _supportedtypes = _nptonctype.keys()
- * # make sure NC_CHAR points to S1
+  /* "netCDF4/_netCDF4.pyx":4901
+ *         for name, value in var.__dict__.items():
+ *             self.__dict__[name] = value
+ *     def typecode(self):             # <<<<<<<<<<<<<<
+ *         return self.dtype
+ *     def ncattrs(self):
  */
-    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_key); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_7);
-    __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __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 = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    if (unlikely(PyObject_SetItem(__pyx_t_13, __pyx_t_1, __pyx_t_7) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __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_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_3typecode, 0, __pyx_n_s_Variable_typecode, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_typecode, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4903
+ *     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_8_netCDF4_9_Variable_5ncattrs, 0, __pyx_n_s_Variable_ncattrs, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_ncattrs, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4905
+ *     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_8_netCDF4_9_Variable_7__getattr__, 0, __pyx_n_s_Variable___getattr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_getattr, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4912
+ *         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_8_netCDF4_9_Variable_9__repr__, 0, __pyx_n_s_Variable___repr, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_repr, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4928
+ *         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_8_netCDF4_9_Variable_11__len__, 0, __pyx_n_s_Variable___len, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_len, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4930
+ *     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_8_netCDF4_9_Variable_13_shape, 0, __pyx_n_s_Variable__shape, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_shape_2, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+  /* "netCDF4/_netCDF4.pyx":4933
+ *         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_8_netCDF4_9_Variable_15set_auto_maskandscale, 0, __pyx_n_s_Variable_set_auto_maskandscale, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_set_auto_maskandscale, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
 
-    /* "netCDF4.pyx":874
+  /* "netCDF4/_netCDF4.pyx":4936
+ *         for v in self._recVar:
+ *             v.set_auto_maskandscale(val)
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         """Get records from a concatenated set of variables."""
  * 
- * _nctonptype = {}
- * for _key,_value in _nptonctype.items():             # <<<<<<<<<<<<<<
- *     _nctonptype[_value] = _key
- * _supportedtypes = _nptonctype.keys()
  */
-  }
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_9_Variable_17__getitem__, 0, __pyx_n_s_Variable___getitem, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_getitem, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
 
-  /* "netCDF4.pyx":876
- * for _key,_value in _nptonctype.items():
- *     _nctonptype[_value] = _key
- * _supportedtypes = _nptonctype.keys()             # <<<<<<<<<<<<<<
- * # make sure NC_CHAR points to S1
- * _nctonptype[NC_CHAR]='S1'
+  /* "netCDF4/_netCDF4.pyx":4887
+ *             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 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_7);
-  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Variable, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4887; __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[0]; __pyx_lineno = 4887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-  __pyx_t_7 = NULL;
-  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);
-    }
-  }
-  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 = 876; __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 = 876; __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_supportedtypes, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "netCDF4.pyx":878
- * _supportedtypes = _nptonctype.keys()
- * # make sure NC_CHAR points to S1
- * _nctonptype[NC_CHAR]='S1'             # <<<<<<<<<<<<<<
+  /* "netCDF4/_netCDF4.pyx":5040
  * 
- * # internal C functions.
+ * 
+ * class MFTime(_Variable):             # <<<<<<<<<<<<<<
+ *     """
+ * MFTime(self, time, units=None)
  */
-  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Variable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
-  if (unlikely(__Pyx_SetItemInt(__pyx_t_2, NC_CHAR, __pyx_n_s_S1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+  __Pyx_GIVEREF(__pyx_t_1);
+  __pyx_t_1 = 0;
+  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_MFTime, __pyx_n_s_MFTime, (PyObject *) NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_kp_s_MFTime_self_time_units_None_Cla); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_7);
 
-  /* "netCDF4.pyx":967
- *             return value_arr
+  /* "netCDF4/_netCDF4.pyx":5076
+ *     """
  * 
- * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
- *     # Private function to set the netCDF file format
- *     if format == 'NETCDF4':
+ *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
+ *         """
+ * Create a time Variable with units consistent across a multifile
  */
-  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_19_set_default_format, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_format, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_6MFTime_1__init__, 0, __pyx_n_s_MFTime___init, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_13, __pyx_tuple__183);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_init, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
 
-  /* "netCDF4.pyx":1298
+  /* "netCDF4/_netCDF4.pyx":5122
  * 
- * _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']
+ * 
+ *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
+ *         return self.__time[elem] + self.__delta[elem]
  */
-  __pyx_t_2 = PyList_New(25); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_INCREF(__pyx_n_s_grpid);
-  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_grpid);
-  __Pyx_GIVEREF(__pyx_n_s_grpid);
-  __Pyx_INCREF(__pyx_n_s_grp);
-  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_grp);
-  __Pyx_GIVEREF(__pyx_n_s_grp);
-  __Pyx_INCREF(__pyx_n_s_varid);
-  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_varid);
-  __Pyx_GIVEREF(__pyx_n_s_varid);
-  __Pyx_INCREF(__pyx_n_s_groups);
-  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_groups);
-  __Pyx_GIVEREF(__pyx_n_s_groups);
-  __Pyx_INCREF(__pyx_n_s_dimensions);
-  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_dimensions);
-  __Pyx_GIVEREF(__pyx_n_s_dimensions);
-  __Pyx_INCREF(__pyx_n_s_variables);
-  PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_variables);
-  __Pyx_GIVEREF(__pyx_n_s_variables);
-  __Pyx_INCREF(__pyx_n_s_dtype);
-  PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_dtype);
-  __Pyx_GIVEREF(__pyx_n_s_dtype);
-  __Pyx_INCREF(__pyx_n_s_data_model_2);
-  PyList_SET_ITEM(__pyx_t_2, 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_2, 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_2, 9, __pyx_n_s_nunlimdim);
-  __Pyx_GIVEREF(__pyx_n_s_nunlimdim);
-  __Pyx_INCREF(__pyx_n_s_path_2);
-  PyList_SET_ITEM(__pyx_t_2, 10, __pyx_n_s_path_2);
-  __Pyx_GIVEREF(__pyx_n_s_path_2);
-  __Pyx_INCREF(__pyx_n_s_parent);
-  PyList_SET_ITEM(__pyx_t_2, 11, __pyx_n_s_parent);
-  __Pyx_GIVEREF(__pyx_n_s_parent);
-  __Pyx_INCREF(__pyx_n_s_ndim);
-  PyList_SET_ITEM(__pyx_t_2, 12, __pyx_n_s_ndim);
-  __Pyx_GIVEREF(__pyx_n_s_ndim);
-  __Pyx_INCREF(__pyx_n_s_mask);
-  PyList_SET_ITEM(__pyx_t_2, 13, __pyx_n_s_mask);
-  __Pyx_GIVEREF(__pyx_n_s_mask);
-  __Pyx_INCREF(__pyx_n_s_scale);
-  PyList_SET_ITEM(__pyx_t_2, 14, __pyx_n_s_scale);
-  __Pyx_GIVEREF(__pyx_n_s_scale);
-  __Pyx_INCREF(__pyx_n_s_cmptypes);
-  PyList_SET_ITEM(__pyx_t_2, 15, __pyx_n_s_cmptypes);
-  __Pyx_GIVEREF(__pyx_n_s_cmptypes);
-  __Pyx_INCREF(__pyx_n_s_vltypes);
-  PyList_SET_ITEM(__pyx_t_2, 16, __pyx_n_s_vltypes);
-  __Pyx_GIVEREF(__pyx_n_s_vltypes);
-  __Pyx_INCREF(__pyx_n_s_isprimitive);
-  PyList_SET_ITEM(__pyx_t_2, 17, __pyx_n_s_isprimitive);
-  __Pyx_GIVEREF(__pyx_n_s_isprimitive);
-  __Pyx_INCREF(__pyx_n_s_file_format_2);
-  PyList_SET_ITEM(__pyx_t_2, 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_2, 19, __pyx_n_s_isvlen);
-  __Pyx_GIVEREF(__pyx_n_s_isvlen);
-  __Pyx_INCREF(__pyx_n_s_iscompound);
-  PyList_SET_ITEM(__pyx_t_2, 20, __pyx_n_s_iscompound);
-  __Pyx_GIVEREF(__pyx_n_s_iscompound);
-  __Pyx_INCREF(__pyx_n_s_cmptype);
-  PyList_SET_ITEM(__pyx_t_2, 21, __pyx_n_s_cmptype);
-  __Pyx_GIVEREF(__pyx_n_s_cmptype);
-  __Pyx_INCREF(__pyx_n_s_vltype);
-  PyList_SET_ITEM(__pyx_t_2, 22, __pyx_n_s_vltype);
-  __Pyx_GIVEREF(__pyx_n_s_vltype);
-  __Pyx_INCREF(__pyx_n_s_keepweakref);
-  PyList_SET_ITEM(__pyx_t_2, 23, __pyx_n_s_keepweakref);
-  __Pyx_GIVEREF(__pyx_n_s_keepweakref);
-  __Pyx_INCREF(__pyx_n_s_name);
-  PyList_SET_ITEM(__pyx_t_2, 24, __pyx_n_s_name);
-  __Pyx_GIVEREF(__pyx_n_s_name);
-  if (PyDict_SetItem(__pyx_d, __pyx_n_s_private_atts, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_8_netCDF4_6MFTime_3__getitem__, 0, __pyx_n_s_MFTime___getitem, NULL, __pyx_n_s_netCDF4__netCDF4, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_13);
+  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_getitem, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
 
-  /* "netCDF4.pyx":4187
- *     return VLType(group, dt, name, typeid=xtype)
+  /* "netCDF4/_netCDF4.pyx":5040
  * 
- * cdef _strencode(pystr,encoding=None):             # <<<<<<<<<<<<<<
- *     # encode a string into bytes.  If already bytes, do nothing.
- *     # uses default_encoding module variable for default encoding.
+ * 
+ * class MFTime(_Variable):             # <<<<<<<<<<<<<<
+ *     """
+ * MFTime(self, time, units=None)
  */
+  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MFTime, __pyx_t_2, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5040; __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[0]; __pyx_lineno = 5040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+  __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;
 
   /*--- Wrapped vars code ---*/
 
@@ -65170,11 +66340,11 @@ PyMODINIT_FUNC PyInit_netCDF4(void)
   __Pyx_XDECREF(__pyx_t_14);
   if (__pyx_m) {
     if (__pyx_d) {
-      __Pyx_AddTraceback("init netCDF4", __pyx_clineno, __pyx_lineno, __pyx_filename);
+      __Pyx_AddTraceback("init netCDF4._netCDF4", __pyx_clineno, __pyx_lineno, __pyx_filename);
     }
     Py_DECREF(__pyx_m); __pyx_m = 0;
   } else if (!PyErr_Occurred()) {
-    PyErr_SetString(PyExc_ImportError, "init netCDF4");
+    PyErr_SetString(PyExc_ImportError, "init netCDF4._netCDF4");
   }
   __pyx_L0:;
   __Pyx_RefNannyFinishContext();
@@ -65215,286 +66385,50 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *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 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);
+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;
     }
-#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);
+    length = stop - start;
+    if (unlikely(length <= 0))
+        return PyUnicode_FromUnicode(NULL, 0);
+    cstring += start;
+    if (decode_func) {
+        return decode_func(cstring, length, errors);
     } 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 PyUnicode_Decode(cstring, length, encoding, errors);
     }
-#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;
+
+#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_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
+    return result;
 }
+#endif
 
 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
 #if CYTHON_COMPILING_IN_CPYTHON
@@ -65684,103 +66618,6 @@ bad:
 }
 #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 CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
     PyObject *result;
 #if CYTHON_COMPILING_IN_CPYTHON
@@ -65798,85 +66635,366 @@ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
     return result;
 }
 
-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_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 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;
+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 {
-            return -1;
+            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;
     }
-    return 0;
+#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 (unlikely(PyErr_Occurred())) {
-        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
-            PyErr_Clear();
-            return 0;
-        } 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 0;
+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 int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
-    if (unlikely(retval)) {
-        Py_DECREF(retval);
-        __Pyx_RaiseTooManyValuesError(expected);
-        return -1;
-    } else {
-        return __Pyx_IterFinish();
+#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 0;
+    return result;
 }
+#endif
 
-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";
+#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 {
-        num_expected = num_max;
-        more_or_less = "at most";
+        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);
+        }
     }
-    if (exact) {
-        more_or_less = "exactly";
+#else
+    if (is_list || PySequence_Check(o)) {
+        return PySequence_GetItem(o, i);
     }
-    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);
+#endif
+    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
+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 void __Pyx_RaiseDoubleKeywordsError(
@@ -65993,15 +67111,40 @@ bad:
     return -1;
 }
 
-static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
-        PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
+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 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_ass_slice)) {
+    if (likely(ms && ms->sq_slice)) {
         if (!has_cstart) {
             if (_py_start && (*_py_start != Py_None)) {
                 cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
@@ -66034,14 +67177,14 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
                     goto bad;
             }
         }
-        return ms->sq_ass_slice(obj, cstart, cstop, value);
+        return ms->sq_slice(obj, cstart, cstop);
     }
 #endif
     mp = Py_TYPE(obj)->tp_as_mapping;
-    if (likely(mp && mp->mp_ass_subscript))
+    if (likely(mp && mp->mp_subscript))
 #endif
     {
-        int result;
+        PyObject* result;
         PyObject *py_slice, *py_start, *py_stop;
         if (_py_slice) {
             py_slice = *_py_slice;
@@ -66075,9 +67218,9 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
             if (unlikely(!py_slice)) goto bad;
         }
 #if CYTHON_COMPILING_IN_CPYTHON
-        result = mp->mp_ass_subscript(obj, py_slice, value);
+        result = mp->mp_subscript(obj, py_slice);
 #else
-        result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
+        result = PyObject_GetItem(obj, py_slice);
 #endif
         if (!_py_slice) {
             Py_DECREF(py_slice);
@@ -66085,102 +67228,71 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
         return result;
     }
     PyErr_Format(PyExc_TypeError,
-        "'%.200s' object does not support slice %.10s",
-        Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
+        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
 bad:
-    return -1;
+    return NULL;
 }
 
-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
+#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);
 }
-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 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 int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
-    PyObject *local_type, *local_value, *local_tb;
+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
-    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;
+    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;
+        }
     }
-    #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);
+    return 0;
 #else
-    PyErr_SetExcInfo(local_type, local_value, local_tb);
-#endif
+    if (unlikely(PyErr_Occurred())) {
+        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
+            PyErr_Clear();
+            return 0;
+        } else {
+            return -1;
+        }
+    }
     return 0;
-bad:
-    *type = 0;
-    *value = 0;
-    *tb = 0;
-    Py_XDECREF(local_type);
-    Py_XDECREF(local_value);
-    Py_XDECREF(local_tb);
-    return -1;
+#endif
 }
 
-static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
-    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
+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 CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
@@ -66209,88 +67321,173 @@ 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;
+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;
         }
-        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 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 {
-        return PyUnicode_Decode(cstring, length, encoding, errors);
+        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 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;
+static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
+    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
+}
+
+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
-    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;
+    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
-    result = __Pyx_PyObject_CallOneArg(method, arg);
+    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:
-    Py_XDECREF(method);
-    return result;
+    return -1;
 }
 
-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 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_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);
+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;
 }
 
-#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;
@@ -66339,83 +67536,56 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObje
     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;
+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;
         }
-    } 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;
-    }
+    result = __Pyx_PyObject_CallOneArg(method, arg);
 bad:
-    return (double)-1;
+    Py_XDECREF(method);
+    return result;
 }
 
-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;
+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);
     }
-    __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
     return 0;
 }
 
+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 PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
     PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
     if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
diff --git a/netCDF4.pyx b/netCDF4/_netCDF4.pyx
similarity index 76%
rename from netCDF4.pyx
rename to netCDF4/_netCDF4.pyx
index 90b30b4..5f92d16 100644
--- a/netCDF4.pyx
+++ b/netCDF4/_netCDF4.pyx
@@ -2,25 +2,25 @@
 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 
+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, 
+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 
+data types (compound types containing vlens, and vlens containing compound
 types) are not supported.
 
-Download 
+Download
 ========
 
  - Latest bleeding-edge code from the U{github repository
@@ -28,13 +28,12 @@ Download
  - Latest U{releases <https://pypi.python.org/pypi/netCDF4>}
    (source code and windows installers).
 
-Requires 
-======== 
+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>}, version 0.19 or later, is optional - if it is installed setup.py will 
+ - numpy array module U{http://numpy.scipy.org}, version 1.7.0 or later.
+ - U{Cython <http://cython.org>}, version 0.19 or later, 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)
@@ -66,8 +65,8 @@ Install
  - By default, the utility C{nc-config}, installed with netcdf 4.1.2 or higher,
  will be run used to determine where all the dependencies live.
  - If C{nc-config} is not in your default C{PATH}, rename the
- file C{setup.cfg.template} to C{setup.cfg}, then edit 
- in a text editor (follow the instructions in the comments).  
+ file C{setup.cfg.template} to C{setup.cfg}, then edit
+ in a text editor (follow the instructions in the comments).
  In addition to specifying the path to C{nc-config},
  you can manually set the paths to all the libraries and their include files
  (in case C{nc-config} does not do the right thing).
@@ -111,11 +110,11 @@ 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 
+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
 --------------------------
@@ -147,15 +146,22 @@ 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. 
+that group.  To simplify the creation of nested groups, you can
+use a unix-like path as an argument to L{createGroup<Dataset.createGroup>}.
+
+>>> fcstgrp1 = rootgrp.createGroup('/forecasts/model1')
+>>> fcstgrp2 = rootgrp.createGroup('/forecasts/model2')
+
+If any of the intermediate elements of the path do not exist, they are created,
+just as with the unix command C{'mkdir -p'}. If you try to create a group
+that already exists, no error will be raised, and the existing group will be 
+returned.
 
 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
@@ -168,8 +174,8 @@ object yields summary information about it's contents.
 >>>          print child
 <type 'netCDF4.Dataset'>
 root group (NETCDF4 file format):
-    dimensions: 
-    variables: 
+    dimensions:
+    variables:
         groups: forecasts, analyses
 <type 'netCDF4.Group'>
 group /forecasts:
@@ -213,7 +219,7 @@ one, and it must be the first (leftmost) dimension of the variable.
 >>> 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.
 
@@ -253,7 +259,7 @@ and whether it is unlimited.
 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
 -----------------------------
 
@@ -268,7 +274,7 @@ 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. 
+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
@@ -295,20 +301,9 @@ used later to access and set variable data and attributes.
 >>> # 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']
+>>> print temp
 <type 'netCDF4.Variable'>
 float32 temp(time, level, lat, lon)
     least_significant_digit: 3
@@ -317,15 +312,52 @@ unlimited dimensions: time, level
 current shape = (0, 0, 73, 144)
 >>>
 
+You can use a path to create a Variable inside a hierarchy of groups.
+
+>>> ftemp = rootgrp.createVariable('/forecasts/model1/temp','f4',('time','level','lat','lon',))
+
+If the intermediate groups do not yet exist, they will be created.
+
+You can also query a L{Dataset} or L{Group} instance directly to obtain L{Group} or 
+L{Variable} instances using paths.
+
+>>> print rootgrp['/forecasts/model1'] # a Group instance
+<type 'netCDF4._netCDF4.Group'>
+group /forecasts/model1:
+    dimensions(sizes):
+    variables(dimensions): float32 temp(time,level,lat,lon)
+    groups:
+>>>
+
+>>> print rootgrp['/forecasts/model1/temp'] # a Variable instance
+<type 'netCDF4._netCDF4.Variable'>
+float32 temp(time, level, lat, lon)
+path = /forecasts/model1
+unlimited dimensions: time, level
+current shape = (0, 0, 73, 144)
+filling on, default _FillValue of 9.96920996839e+36 used
+>>>
+
+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>)])
+>>>
+
 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. 
+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
@@ -357,13 +389,13 @@ 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 
+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'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
@@ -376,7 +408,7 @@ removes the attribute C{foo} the the group C{grp}).
 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 
+>>> import numpy
 >>> lats =  numpy.arange(-90,91,2.5)
 >>> lons =  numpy.arange(-180,180,2.5)
 >>> latitudes[:] = lats
@@ -392,8 +424,8 @@ latitudes =
   90. ]
 >>>
 
-Unlike NumPy's array objects, netCDF L{Variable} 
-objects with unlimited dimensions will grow along those dimensions if you 
+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.
@@ -419,9 +451,9 @@ 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 
+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
@@ -431,7 +463,7 @@ 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,).  
+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
@@ -441,7 +473,7 @@ While this behaviour may cause some confusion for those used to NumPy's 'fancy i
 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, 
+For example,
 
 >>> tempdat = temp[::2, [1,3,6], lats>0, lons>0]
 
@@ -453,6 +485,13 @@ Hemisphere longitudes, resulting in a numpy array of shape  (3, 3, 36, 71).
 shape of fancy temp slice =  (3, 3, 36, 71)
 >>>
 
+B{Special note for scalar variables}: To extract data from a scalar variable
+C{v} with no associated dimensions, use an Ellipsis slice (C{v[...]}). The result
+will be a numpy scalar object.
+
+7) Dealing with time coordinates
+--------------------------------
+
 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
@@ -468,7 +507,7 @@ can be used:
 >>> 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): 
+time values (in units hours since January 1, 0001):
 [ 17533056.  17533068.  17533080.  17533092.  17533104.]
 >>>
 >>> dates = num2date(times[:],units=times.units,calendar=times.calendar)
@@ -480,26 +519,26 @@ dates corresponding to time values:
 
 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 
+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.
+8) 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 
+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 
+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 
+must in be in C{NETCDF3_64BIT}, C{NETCDF3_CLASSIC} or
 C{NETCDF4_CLASSIC format} (C{NETCDF4} formatted multi-file
 datasets are not supported).
 
@@ -522,9 +561,9 @@ Now read all the files back in at once with L{MFDataset}
 >>>
 
 Note that MFDataset can only be used to read, not write, multi-file
-datasets. 
+datasets.
 
-8) Efficient compression of netCDF variables
+9) Efficient compression of netCDF variables
 --------------------------------------------
 
 Data stored in netCDF 4 L{Variable} objects can be compressed and
@@ -577,19 +616,19 @@ and then
 
 and see how much smaller the resulting files are.
 
-9) Beyond homogenous arrays of a fixed type - compound data types
------------------------------------------------------------------
+10) 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 
+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 
+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:
@@ -645,19 +684,19 @@ OrderedDict([('complex128', <netCDF4.CompoundType object at 0x1029eb7e8>)])
 <type 'netCDF4.CompoundType'>: name = 'complex128', numpy dtype = [(u'real','<f8'), (u'imag', '<f8')]
 >>>
 
-10) Variable-length (vlen) data types.
---------------------------------------
+11) 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 
+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 
+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.
@@ -667,7 +706,7 @@ A new variable can then be created using this datatype.
 >>> 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 
+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.
@@ -704,16 +743,16 @@ current shape = (4, 3)
 >>>
 
 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. 
+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.  
+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 
+random lengths between 2 and 12 characters, and the data in the object
 array is assigned to the vlen string variable.
 
 >>> chars = '1234567890aabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -769,8 +808,8 @@ 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
+from .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
@@ -785,7 +824,7 @@ except ImportError:
     # python3: zip is already python2's itertools.izip
     pass
 
-__version__ = "1.1.7"
+__version__ = "1.1.8"
 
 # Initialize numpy
 import posixpath
@@ -801,10 +840,6 @@ 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.
@@ -815,9 +850,18 @@ def _gethdf5libversion():
     releasevers = H5_VERS_RELEASE
     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
     if not patchstring:
-       return '%d.%d.%d' % (majorvers,minorvers,releasevers)
+        return '%d.%d.%d' % (majorvers,minorvers,releasevers)
     else:
-       return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
+        return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
+
+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')
 
 __netcdf4libversion__ = getlibversion().split()[0]
 __hdf5libversion__ = _gethdf5libversion()
@@ -841,7 +885,7 @@ _nptonctype  = {'U1' : NC_CHAR,
                 'f4' : NC_FLOAT,
                 'f8' : NC_DOUBLE}
 
-default_fillvals = {#'S1':NC_FILL_CHAR, 
+default_fillvals = {#'S1':NC_FILL_CHAR,
                      'U1':'\0',
                      'S1':'\0',
                      'i1':NC_FILL_BYTE,
@@ -1023,7 +1067,7 @@ cdef _set_att(grp, int varid, name, value):
     cdef int i, ierr, lenarr, n
     cdef char *attname
     cdef char *datstring
-    cdef ndarray value_arr 
+    cdef ndarray value_arr
     bytestr = _strencode(name)
     attname = bytestr
     # put attribute value into a numpy array.
@@ -1035,7 +1079,9 @@ cdef _set_att(grp, int varid, name, value):
     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 array contains ascii strings, write a text attribute (stored as bytes).
+    # if array contains unicode strings, and data model is NETCDF4, 
+    # write as a string.  string arrays are concatenated into a single string.
     if value_arr.dtype.char in ['S','U']:
         if not value_arr.shape:
             dats = _strencode(value_arr.item())
@@ -1047,7 +1093,11 @@ cdef _set_att(grp, int varid, name, value):
         if lenarr == 0:
             # write null byte
             lenarr=1; datstring = '\x00'
-        ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
+        if value_arr.dtype.char == 'U' and not is_netcdf3:
+            # a unicode string, use put_att_string (if NETCDF4 file).
+            ierr = nc_put_att_string(grp._grpid, varid, attname, 1, &datstring)
+        else:
+            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)
@@ -1201,111 +1251,111 @@ cdef _get_vars(group):
         else:
             for n from 0 <= n < numvars:
                 varids[n] = n
-        # loop over variables. 
+        # loop over variables.
         for n from 0 <= n < numvars:
-             varid = varids[n]
-             # get variable name.
-             with nogil:
-                 ierr = nc_inq_varname(_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.
-             with nogil:
-                 ierr = nc_inq_vartype(_grpid, varid, &xtype)
-             if ierr != NC_NOERR:
-                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
-             # get endian-ness of variable.
-             endianness = None
-             with nogil:
-                 ierr = nc_inq_var_endian(_grpid, varid, &iendian)
-             if ierr == NC_NOERR:
-                 if iendian == NC_ENDIAN_LITTLE:
-                     endianness = '<'
-                 elif iendian == NC_ENDIAN_BIG:
-                     endianness = '>'
-             # check to see if it is a supported user-defined type.
-             try:
-                 datatype = _nctonptype[xtype]
-                 if endianness is not None:
-                     datatype = endianness + datatype
-             except KeyError:
-                 if xtype == NC_STRING:
-                     datatype = str
-                 else:
-                     with nogil:
-                         ierr = nc_inq_user_type(_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, endian=endianness)
-                         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, endian=endianness)
-                         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.
-             with nogil:
-                 ierr = nc_inq_varndims(_grpid, varid, &numdims)
-             if ierr != NC_NOERR:
-                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
-             # get dimension ids.
-             with nogil:
-                 ierr = nc_inq_vardimid(_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.
-             if endianness == '>':
-                 variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big')
-             elif endianness == '<':
-                 variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little')
-             else:
-                 variables[name] = Variable(group, name, datatype, dimensions, id=varid)
+            varid = varids[n]
+            # get variable name.
+            with nogil:
+                ierr = nc_inq_varname(_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.
+            with nogil:
+                ierr = nc_inq_vartype(_grpid, varid, &xtype)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            # get endian-ness of variable.
+            endianness = None
+            with nogil:
+                ierr = nc_inq_var_endian(_grpid, varid, &iendian)
+            if ierr == NC_NOERR:
+                if iendian == NC_ENDIAN_LITTLE:
+                    endianness = '<'
+                elif iendian == NC_ENDIAN_BIG:
+                    endianness = '>'
+            # check to see if it is a supported user-defined type.
+            try:
+                datatype = _nctonptype[xtype]
+                if endianness is not None:
+                    datatype = endianness + datatype
+            except KeyError:
+                if xtype == NC_STRING:
+                    datatype = str
+                else:
+                    with nogil:
+                        ierr = nc_inq_user_type(_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, endian=endianness)
+                        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, endian=endianness)
+                        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.
+            with nogil:
+                ierr = nc_inq_varndims(_grpid, varid, &numdims)
+            if ierr != NC_NOERR:
+                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
+            # get dimension ids.
+            with nogil:
+                ierr = nc_inq_vardimid(_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.
+            if endianness == '>':
+                variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='big')
+            elif endianness == '<':
+                variables[name] = Variable(group, name, datatype, dimensions, id=varid, endian='little')
+            else:
+                variables[name] = Variable(group, name, datatype, dimensions, id=varid)
         free(varids) # free pointer holding variable ids.
     return variables
 
-# these are class attributes that 
+# 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']
+ 'file_format','_isvlen','_iscompound','_cmptype','_vltype','keepweakref','name','__orthogoral_indexing__']
 
 
 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 
+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:}
@@ -1320,7 +1370,7 @@ 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 
+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.
@@ -1329,21 +1379,21 @@ 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 
+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 
+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).
@@ -1355,7 +1405,7 @@ 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 
+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
@@ -1366,41 +1416,41 @@ 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 
+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 
+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 
+ 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} 
+ 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 
+ 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 
+ 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 
+ 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.
 
 @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}. 
+C{NETCDF4_CLASSIC} or C{NETCDF3_64BIT}.
 
 @ivar file_format: same as C{data_model}, retained for backwards
 compatibility.
@@ -1421,13 +1471,16 @@ L{Group} instance. C{None} for a the root group or L{Dataset} instance"""
     cdef public int _grpid
     cdef public int _isopen
     cdef public groups, dimensions, variables, disk_format, path, parent,\
-    file_format, data_model, cmptypes, vltypes, keepweakref
+    file_format, data_model, cmptypes, vltypes, keepweakref, \
+    __orthogonal_indexing__
 
     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]
+        # flag to indicate that Variables in this Dataset support orthogonal indexing.
+        self.__orthogonal_indexing__ = True
         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__)
@@ -1525,6 +1578,25 @@ L{Group} instance. C{None} for a the root group or L{Dataset} instance"""
     def __exit__(self,atype,value,traceback):
         self.close()
 
+    def __getitem__(self, elem):
+        # return variable or group defined in relative path.
+        # split out group names in unix path.
+        elem = posixpath.normpath(elem)
+        # last name in path, could be a variable or group
+        dirname, lastname = posixpath.split(elem)
+        nestedgroups = dirname.split('/')
+        group = self
+        # iterate over groups in path.
+        for g in nestedgroups:
+            if g: group = group.groups[g]
+        # return last one, either a group or a variable.
+        if lastname in group.groups:
+            return group.groups[lastname]
+        elif lastname in group.variables:
+            return group.variables[lastname]
+        else:
+            raise IndexError('%s not found in %s' % (lastname,group.path))
+
     def filepath(self):
         """
 filepath(self)
@@ -1540,15 +1612,15 @@ open/create the Dataset. Requires netcdf >= 4.1.2"""
             return path.decode('ascii')
         ELSE:
             msg = """
-filepath method not enabled.  To enable, install Cython, make sure you have 
+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__()
+            return self.__unicode__()
         else:
-           return unicode(self).encode(default_encoding)
+            return unicode(self).encode(default_encoding)
 
     def __unicode__(self):
         ncdump = ['%r\n' % type(self)]
@@ -1580,7 +1652,7 @@ version 4.1.2 or higher of the netcdf C lib, and rebuild netcdf4-python."""
 close(self)
 
 Close the Dataset."""
-        cdef int ierr 
+        cdef int ierr
         ierr = nc_close(self._grpid)
         if ierr != NC_NOERR:
             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
@@ -1616,12 +1688,12 @@ 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 
+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)
@@ -1632,10 +1704,10 @@ to."""
         """
 set_fill_off(self)
 
-Sets the fill mode for a L{Dataset} open for writing to C{off}. 
+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 
+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)
@@ -1646,14 +1718,14 @@ sure the data is actually written before being read."""
         """
 createDimension(self, dimname, size=None)
 
-Creates a new dimension with the given C{dimname} and C{size}. 
+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 
+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 
+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]
@@ -1719,51 +1791,57 @@ datatype."""
         """
 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 
+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), 
+If C{varname} is specified as a path, using forward slashes as in unix to
+separate components, then intermediate groups will be created as necessary 
+For example, C{createVariable('/GroupA/GroupB/VarC'),('x','y'),float)} will create groups C{GroupA}
+and C{GroupA/GroupB}, plus the variable C{GroupA/GroupB/VarC}, if the preceding
+groups don't already exist.
+
+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 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. 
+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 
+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 
+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 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 
+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 
+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 
+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>}. 
+<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}.
@@ -1779,8 +1857,8 @@ 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 
+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.
 
@@ -1796,9 +1874,9 @@ U{http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml}:
 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, 
+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 
+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
@@ -1806,10 +1884,10 @@ 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 
+The return value is the L{Variable} class instance describing the new
 variable.
 
-A list of names corresponding to netCDF variable attributes can be 
+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.
@@ -1830,12 +1908,21 @@ 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,
+        # if varname specified as a path, split out group names.
+        varname = posixpath.normpath(varname)
+        dirname, varname = posixpath.split(varname) # varname is last.
+        # create parent groups (like mkdir -p).
+        if not dirname:
+            group = self
+        else:
+            group = self.createGroup(dirname)
+        # create variable.
+        group.variables[varname] = Variable(group, 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]
+        return group.variables[varname]
 
     def renameVariable(self, oldname, newname):
         """
@@ -1865,10 +1952,30 @@ 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]
-     
+If C{groupname} is specified as a path, using forward slashes as in unix to
+separate components, then intermediate groups will be created as necessary 
+(analagous to C{mkdir -p} in unix).  For example,
+C{createGroup('/GroupA/GroupB/GroupC')} will create C{GroupA},
+C{GroupA/GroupB}, and C{GroupA/GroupB/GroupC}, if they don't already exist.
+If the specified path describes a group that already exists, no error is
+raised.
+
+The return value is a L{Group} class instance."""
+        # if group specified as a path, split out group names
+        groupname = posixpath.normpath(groupname)
+        nestedgroups = groupname.split('/')
+        group = self
+        # loop over group names, create parent groups if they do not already
+        # exist.
+        for g in nestedgroups:
+            if not g: continue
+            if g not in group.groups:
+                group.groups[g] = Group(group, g)
+            group = group.groups[g]
+        # if group already exists, just return the group
+        # (prior to 1.1.8, this would have raised an error)
+        return group
+
     def ncattrs(self):
         """
 ncattrs(self)
@@ -1891,8 +1998,8 @@ attributes."""
         """
 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 
+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()
@@ -1951,7 +2058,7 @@ attributes."""
         # 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__': 
+            if name == '__dict__':
                 names = self.ncattrs()
                 values = []
                 for name in names:
@@ -2003,7 +2110,7 @@ rename a L{Group} named C{oldname} to C{newname} (requires netcdf >= 4.3.1)."""
             self.groups[newname] = grp
         ELSE:
             msg = """
-renameGroup method not enabled.  To enable, install Cython, make sure you have 
+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)
 
@@ -2089,11 +2196,11 @@ after calling this function will follow the default behaviour.
 
 cdef class Group(Dataset):
     """
-Group(self, parent, name) 
+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, 
+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
@@ -2112,12 +2219,14 @@ 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} 
+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
+        # flag to indicate that Variables in this Group support orthogonal indexing.
+        self.__orthogonal_indexing__ = True
         # set data_model and file_format attributes.
         self.data_model = parent.data_model
         self.file_format = parent.file_format
@@ -2153,7 +2262,7 @@ method)."""
         """
 close(self)
 
-overrides L{Dataset} close method which does not apply to L{Group} 
+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)')
 
@@ -2197,7 +2306,7 @@ B{C{size}}  - Size of the dimension. C{None} or 0 means unlimited. (Default C{No
 
 B{Returns:}
 
-a L{Dimension} instance.  All further operations on the netCDF Dimension 
+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
@@ -2255,9 +2364,9 @@ determine if the dimension is unlimited"""
 
     def __repr__(self):
         if python3:
-           return self.__unicode__()
+            return self.__unicode__()
         else:
-           return unicode(self).encode(default_encoding)
+            return unicode(self).encode(default_encoding)
 
     def __unicode__(self):
         if not dir(self._grp):
@@ -2266,7 +2375,7 @@ determine if the dimension is unlimited"""
             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
@@ -2306,7 +2415,7 @@ returns C{True} if the L{Dimension} instance is unlimited, C{False} otherwise.""
                 unlimdim_ids = []
                 for n from 0 <= n < numunlimdims:
                     unlimdim_ids.append(unlimdimids[n])
-                if dimid in unlimdim_ids: 
+                if dimid in unlimdim_ids:
                     return True
                 else:
                     return False
@@ -2323,7 +2432,7 @@ 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 
+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
@@ -2336,42 +2445,42 @@ 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 
+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 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 
+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}  
+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, 
+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}. 
+Ignored if C{zlib=False}.
 
-B{C{shuffle}} - if C{True}, the HDF5 shuffle filter is applied 
+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 
+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
@@ -2381,7 +2490,7 @@ 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>}. 
+<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}.
@@ -2406,15 +2515,15 @@ 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) 
+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 
+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
@@ -2425,17 +2534,17 @@ 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 
+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 
+ at ivar dimensions: A tuple containing the names of the dimensions
 associated with this variable.
 
 @ivar dtype: A numpy dtype object describing the variable's data type.
 
 @ivar ndim: The number of variable dimensions.
 
- at ivar shape: a tuple describing the current size of all the variable's 
+ at ivar shape: a tuple describing the current size of all the variable's
 dimensions.
 
 @ivar scale:  if True, C{scale_factor} and C{add_offset} are automatically
@@ -2447,12 +2556,17 @@ 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.
 
 @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. """
+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. 
+
+ at ivar __orthogonal_indexing__: Always C{True}.  Indicates to client code
+that the object supports "orthogonal indexing", which means that slices
+that are 1d arrays or lists slice along each dimension independently.  This
+behavior is similar to Fortran or Matlab, but different than numpy."""
     cdef public int _varid, _grpid, _nunlimdim
     cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\
-    _isvlen, _grp,_cmptype,_vltype
+    _isvlen, _grp, _cmptype, _vltype, __orthogonal_indexing__
 
     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,
             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
@@ -2465,6 +2579,8 @@ instance. If C{None}, the data is not truncated. """
         cdef size_t sizep, nelemsp
         cdef size_t *chunksizesp
         cdef float preemptionp
+        # flag to indicate that orthogonal indexing is supported
+        self.__orthogonal_indexing__ = True
         # if complevel is set to zero, set zlib to False.
         if not complevel:
             zlib = False
@@ -2486,13 +2602,13 @@ instance. If C{None}, the data is not truncated. """
             datatype != str and \
             type(datatype) != numpy.dtype:
             datatype = numpy.dtype(datatype)
-        # convert numpy string dtype with length > 1 
+        # 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.
+        # 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'
@@ -2514,11 +2630,11 @@ instance. If C{None}, the data is not truncated. """
         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
                       or datatype == str:
             if isinstance(datatype, CompoundType):
-               self._iscompound = True
-               self._cmptype = datatype
+                self._iscompound = True
+                self._cmptype = datatype
             if isinstance(datatype, VLType) or datatype==str:
-               self._isvlen = True
-               self._vltype = datatype
+                self._isvlen = True
+                self._vltype = datatype
             if datatype==str:
                 if grp.data_model != 'NETCDF4':
                     raise ValueError(
@@ -2533,7 +2649,7 @@ instance. If C{None}, the data is not truncated. """
             self.dtype = datatype.dtype
         elif datatype.str[1:] in _supportedtypes:
             self._isprimitive = True
-            # find netCDF primitive data type corresponding to 
+            # find netCDF primitive data type corresponding to
             # specified numpy data type.
             xtype = _nptonctype[datatype.str[1:]]
             # dtype variable attribute is a numpy datatype object.
@@ -2567,7 +2683,7 @@ instance. If C{None}, the data is not truncated. """
             else: # a scalar variable.
                 ierr = nc_def_var(self._grpid, varname, xtype, ndims,
                                   NULL, &self._varid)
-            # set chunk cache size if desired    
+            # 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.
@@ -2648,7 +2764,7 @@ instance. If C{None}, the data is not truncated. """
                     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 
+            # 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):
@@ -2693,15 +2809,15 @@ instance. If C{None}, the data is not truncated. """
 
     def __array__(self):
         # numpy special method that returns a numpy array.
-	# allows numpy ufuncs to work faster on Variable objects 
-	# (issue 216).
+        # allows numpy ufuncs to work faster on Variable objects
+        # (issue 216).
         return self[...]
 
     def __repr__(self):
         if python3:
-           return self.__unicode__()
+            return self.__unicode__()
         else:
-           return unicode(self).encode(default_encoding)
+            return unicode(self).encode(default_encoding)
 
     def __unicode__(self):
         cdef int ierr, no_fill
@@ -2863,8 +2979,8 @@ attributes."""
         """
 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 
+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()
@@ -2928,7 +3044,7 @@ 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']: 
+        if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
             return 'native'
         with nogil:
             ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
@@ -2945,7 +3061,7 @@ return endian-ness (little,big,native) of variable (as stored in HDF5 file)."""
         """
 chunking(self)
 
-return variable chunking information.  If the dataset is 
+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."""
@@ -3053,7 +3169,7 @@ details."""
         # 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__': 
+            if name == '__dict__':
                 names = self.ncattrs()
                 values = []
                 for name in names:
@@ -3095,22 +3211,22 @@ rename a L{Variable} attribute named C{oldname} to C{newname}."""
         else:
             data = numpy.empty(datashape, dtype=self.dtype)
 
-        # Determine which dimensions need to be 
+        # Determine which dimensions need to be
         # squeezed (those for which elem is an integer scalar).
-        # The convention used is that for those cases, 
+        # 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. 
+        # 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. 
+        # 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:
@@ -3119,13 +3235,13 @@ rename a L{Variable} attribute named C{oldname} to C{newname}."""
                 shape = getattr(data[tuple(i)], 'shape', ())
                 data[tuple(i)] = datout.reshape(shape)
 
-        # Remove extra singleton dimensions. 
+        # 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
+            # Make sure a numpy scalar array is returned instead of a 1-d array of
             # length 1.
-            if data.ndim != 0: data = data[0]
+            if data.ndim != 0: data = numpy.asarray(data[0])
 
         # if auto_scale mode set to True, (through
         # a call to set_auto_scale or set_auto_maskandscale),
@@ -3156,7 +3272,7 @@ rename a L{Variable} attribute named C{oldname} to C{newname}."""
                 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
+                data = data + self.add_offset
         return data
 
     def _toma(self,data):
@@ -3171,7 +3287,7 @@ rename a L{Variable} attribute named C{oldname} to C{newname}."""
                (self.endian() == 'little' and is_native_big):
                 mval.byteswap(True)
             if mval.shape == (): # mval a scalar.
-                hasmval = data==mval 
+                hasmval = data==mval
                 # is scalar missing value a NaN?
                 try:
                     mvalisnan = numpy.isnan(mval)
@@ -3201,7 +3317,7 @@ rename a L{Variable} attribute named C{oldname} to C{newname}."""
             # is _FillValue a NaN?
             try:
                 fvalisnan = numpy.isnan(fval)
-            except TypeError: # isnan fails on some dtypes (issue 202)
+            except: # isnan fails on some dtypes (issue 202)
                 fvalisnan = False
             if fvalisnan:
                 mask = numpy.isnan(data)
@@ -3214,7 +3330,7 @@ rename a L{Variable} attribute named C{oldname} to C{newname}."""
                     fill_value = fval
                 totalmask += mask
         # issue 209: don't return masked array if variable filling
-	# is disabled.
+        # is disabled.
         else:
             with nogil:
                 ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
@@ -3272,7 +3388,7 @@ rename a L{Variable} attribute named C{oldname} to C{newname}."""
         if isinstance(elem, int):
             if ndims > 1:
                 raise IndexError(msg)
-            if elem < 0: 
+            if elem < 0:
                 if self.shape[0]+elem >= 0:
                     elem = self.shape[0]+elem
                 else:
@@ -3302,8 +3418,8 @@ rename a L{Variable} attribute named C{oldname} to C{newname}."""
             start = [elem]
         count = [1]*ndims
         for n from 0 <= n < ndims:
-            startp[n] = start[n] 
-            countp[n] = count[n] 
+            startp[n] = start[n]
+            countp[n] = count[n]
         if self.dtype == str: # VLEN string
             strdata = <char **>malloc(sizeof(char *))
             bytestr = _strencode(data)
@@ -3357,8 +3473,8 @@ rename a L{Variable} attribute named C{oldname} to C{newname}."""
 
         # 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 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)
@@ -3379,8 +3495,8 @@ rename a L{Variable} attribute named C{oldname} to C{newname}."""
             # 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. 
+
+        # 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))
@@ -3438,12 +3554,12 @@ rename a L{Variable} attribute named C{oldname} to C{newname}."""
                         fillval = default_fillvals[self.dtype.str[1:]]
                     data = data.filled(fill_value=fillval)
 
-        # Fill output array with data chunks. 
+        # 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 dataput.shape == ():
                 if self._isvlen:
                     dataput=numpy.array(dataput,'O')
                 else:
@@ -3459,7 +3575,7 @@ rename a L{Variable} attribute named C{oldname} to C{newname}."""
         """
 assignValue(self, val)
 
-assign a value to a scalar variable.  Provided for compatibility with 
+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')
@@ -3469,7 +3585,7 @@ Scientific.IO.NetCDF, can also be done by assigning to a slice ([:])."""
         """
 getValue(self)
 
-get the value of a scalar variable.  Provided for compatibility with 
+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')
@@ -3485,7 +3601,7 @@ 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 
+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
@@ -3498,7 +3614,7 @@ 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
@@ -3506,7 +3622,7 @@ When data is written to a variable it is packed using::
 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 
+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>}.
@@ -3604,9 +3720,9 @@ The default value of C{mask} is C{True}
         sl = []
         for n from 0 <= n < ndims:
             count[n] = abs(count[n]) # make -1 into +1
-            countp[n] = count[n] 
+            countp[n] = count[n]
             # for neg strides, reverse order (then flip that axis after data read in)
-            if stride[n] < 0: 
+            if stride[n] < 0:
                 negstride = 1
                 stridep[n] = -stride[n]
                 startp[n] = start[n]+stride[n]*(count[n]-1)
@@ -3618,7 +3734,7 @@ The default value of C{mask} is C{True}
                 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. 
+        # for slice given.
         dataelem = PyArray_SIZE(data)
         if totelem != dataelem:
             raise IndexError('size of data array does not conform to slice')
@@ -3627,7 +3743,7 @@ The default value of C{mask} is C{True}
             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, 
+            # 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.
@@ -3657,7 +3773,7 @@ The default value of C{mask} is C{True}
                                    startp, countp, stridep, data.data)
             if ierr != NC_NOERR:
                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
-        elif self._isvlen: 
+        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.
@@ -3674,10 +3790,10 @@ The default value of C{mask} is C{True}
                 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: 
+                if sum(stride) == ndims or ndims == 0:
                     ierr = nc_put_vara(self._grpid, self._varid,
                                        startp, countp, strdata)
-                else: 
+                else:
                     raise IndexError('strides must all be 1 for string variables')
                     #ierr = nc_put_vars(self._grpid, self._varid,
                     #                   startp, countp, stridep, strdata)
@@ -3702,10 +3818,10 @@ The default value of C{mask} is C{True}
                     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: 
+                if sum(stride) == ndims or ndims == 0:
                     ierr = nc_put_vara(self._grpid, self._varid,
                                        startp, countp, vldata)
-                else:  
+                else:
                     raise IndexError('strides must all be 1 for vlen variables')
                     #ierr = nc_put_vars(self._grpid, self._varid,
                     #                   startp, countp, stridep, vldata)
@@ -3742,9 +3858,9 @@ The default value of C{mask} is C{True}
         sl = []
         for n from 0 <= n < ndims:
             count[n] = abs(count[n]) # make -1 into +1
-            countp[n] = count[n] 
+            countp[n] = count[n]
             # for neg strides, reverse order (then flip that axis after data read in)
-            if stride[n] < 0: 
+            if stride[n] < 0:
                 negstride = 1
                 stridep[n] = -stride[n]
                 startp[n] = start[n]+stride[n]*(count[n]-1)
@@ -3757,7 +3873,7 @@ The default value of C{mask} is C{True}
         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: 
+            if sum(stride) == ndims or ndims == 0:
                 with nogil:
                     ierr = nc_get_vara(self._grpid, self._varid,
                                        startp, countp, data.data)
@@ -3766,7 +3882,7 @@ The default value of C{mask} is C{True}
                     ierr = nc_get_vars(self._grpid, self._varid,
                                        startp, countp, stridep, data.data)
             if ierr == NC_EINVALCOORDS:
-                raise IndexError 
+                raise IndexError
             elif ierr != NC_NOERR:
                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
         elif self._isvlen:
@@ -3780,7 +3896,7 @@ The default value of C{mask} is C{True}
                 # 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: 
+                if sum(stride) == ndims or ndims == 0:
                     with nogil:
                         ierr = nc_get_vara(self._grpid, self._varid,
                                            startp, countp, strdata)
@@ -3790,7 +3906,7 @@ The default value of C{mask} is C{True}
                     #ierr = nc_get_vars(self._grpid, self._varid,
                     #                   startp, countp, stridep, strdata)
                 if ierr == NC_EINVALCOORDS:
-                    raise IndexError 
+                    raise IndexError
                 elif ierr != NC_NOERR:
                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
                 # loop over elements of object array, fill array with
@@ -3805,7 +3921,7 @@ The default value of C{mask} is C{True}
                 # 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: 
+                if sum(stride) == ndims or ndims == 0:
                     with nogil:
                         ierr = nc_get_vara(self._grpid, self._varid,
                                            startp, countp, vldata)
@@ -3814,7 +3930,7 @@ The default value of C{mask} is C{True}
                     #ierr = nc_get_vars(self._grpid, self._varid,
                     #                   startp, countp, stridep, vldata)
                 if ierr == NC_EINVALCOORDS:
-                    raise IndexError 
+                    raise IndexError
                 elif ierr != NC_NOERR:
                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
                 # loop over elements of object array, fill array with
@@ -3831,8 +3947,8 @@ The default value of C{mask} is C{True}
         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 not self.dimensions:
+            return data[0] # a scalar
         elif squeeze_out:
             return numpy.squeeze(data)
         else:
@@ -3860,15 +3976,15 @@ 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. 
+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 
+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} 
+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
@@ -3893,9 +4009,9 @@ the user.
 
     def __repr__(self):
         if python3:
-           return self.__unicode__()
+            return self.__unicode__()
         else:
-           return unicode(self).encode(default_encoding)
+            return unicode(self).encode(default_encoding)
 
     def __unicode__(self):
         return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
@@ -3939,7 +4055,7 @@ cdef _def_compound(grp, object dt, object dtype_name):
         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) 
+                xtype_tmp = _find_cmptype(grp, format)
                 bytestr = _strencode(name)
                 nested_namstring = bytestr
                 ierr = nc_insert_compound(grp._grpid, xtype,\
@@ -3962,7 +4078,7 @@ cdef _def_compound(grp, object dt, object dtype_name):
                         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]) 
+                    xtype_tmp = _find_cmptype(grp, format.subdtype[0])
                     bytestr = _strencode(name)
                     nested_namstring = bytestr
                     ierr = nc_insert_array_compound(grp._grpid,xtype,\
@@ -3988,7 +4104,7 @@ cdef _find_cmptype(grp, dtype):
         if names1==names2 and formats1==formats2:
             match = True
             break
-    if not match: 
+    if not match:
         try:
             parent_grp = grp.parent
         except AttributeError:
@@ -4001,7 +4117,7 @@ cdef _find_cmptype(grp, dtype):
 
 cdef _read_compound(group, nc_type xtype, endian=None):
     # read a compound data type id from an existing file,
-    # construct a corresponding numpy dtype instance, 
+    # 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.
@@ -4043,7 +4159,7 @@ cdef _read_compound(group, nc_type xtype, endian=None):
             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: 
+        try:
             field_type =  _nctonptype[field_typeid]
             if endian is not None:
                 format = endian + format
@@ -4076,7 +4192,7 @@ 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{VLType} instances should be created using the
 L{createVLType<Dataset.createVLType>}
 method of a Dataset or L{Group} instance, not using this class directly.
 
@@ -4085,14 +4201,14 @@ 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.  
+variable length array.
 
-B{C{datatype_name}} - a Python string containing a description of the 
+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} 
+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
@@ -4119,9 +4235,9 @@ the user.
 
     def __repr__(self):
         if python3:
-           return self.__unicode__()
+            return self.__unicode__()
         else:
-           return unicode(self).encode(default_encoding)
+            return unicode(self).encode(default_encoding)
 
     def __unicode__(self):
         if self.dtype == str:
@@ -4147,19 +4263,19 @@ cdef _def_vlen(grp, object dt, object 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 
+            # 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'))
+                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, endian=None):
     # read a VLEN data type id from an existing file,
-    # construct a corresponding numpy dtype instance, 
+    # construct a corresponding numpy dtype instance,
     # then use that to create a VLType instance.
     # called by _get_types, _get_vars.
     cdef int ierr, _grpid
@@ -4178,7 +4294,7 @@ cdef _read_vlen(group, nc_type xtype, endian=None):
         name = vl_namstring.decode(default_encoding,unicode_error)
         try:
             datatype = _nctonptype[base_xtype]
-            if endian is not None: datatype = endian + datatype 
+            if endian is not None: datatype = endian + datatype
             dt = numpy.dtype(datatype) # see if it is a primitive type
         except KeyError:
             raise KeyError("unsupported component type for VLEN")
@@ -4193,3 +4309,815 @@ cdef _strencode(pystr,encoding=None):
         return pystr.encode(encoding)
     except (AttributeError, UnicodeDecodeError):
         return pystr # already bytes or unicode?
+
+#----------------------------------------
+# extra utilities (formerly in utils.pyx)
+#----------------------------------------
+from datetime import timedelta, datetime, MINYEAR
+from netcdftime import _parse_date, microsec_units, millisec_units,\
+                       sec_units, min_units, hr_units, day_units
+
+# start of the gregorian calendar
+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"""
+    # same as version in netcdftime, but returns a timezone naive
+    # python datetime instance with the utc_offset included.
+    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:]
+    year, month, day, hour, minute, second, utc_offset =\
+        _parse_date( isostring.strip() )
+    basedate = datetime(year, month, day, hour, minute, second)
+    # add utc_offset to basedate time instance (which is timezone naive)
+    basedate += timedelta(days=utc_offset/1440.)
+    return basedate
+
+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.  Accuracy is somewhere between a millisecond and a microsecond,
+depending on the time interval and the calendar used.
+
+ 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.
+    """
+    basedate = _dateparse(units)
+    unit = units.split()[0].lower()
+
+    if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
+       (calendar in ['gregorian','standard'] and basedate > gregorian):
+        # use python datetime module,
+        isscalar = False
+        try:
+            dates[0]
+        except:
+            isscalar = True
+        if isscalar:
+            dates = numpy.array([dates])
+        else:
+            dates = numpy.array(dates)
+            shape = dates.shape
+        ismasked = False
+        if hasattr(dates,'mask'):
+            mask = dates.mask
+            ismasked = True
+        times = []
+        for date in dates.flat:
+            if ismasked and not date:
+                times.append(None)
+            else:
+                td = date - basedate
+                # total time in microseconds.
+                totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
+                if unit in microsec_units:
+                    times.append(totaltime)
+                elif unit in millisec_units:
+                    times.append(totaltime/1.e3)
+                elif unit in sec_units:
+                    times.append(totaltime/1.e6)
+                elif unit in min_units:
+                    times.append(totaltime/1.e6/60)
+                elif unit in hr_units:
+                    times.append(totaltime/1.e6/3600)
+                elif unit in day_units:
+                    times.append(totaltime/1.e6/3600./24.)
+                else:
+                    raise ValueError('unsupported time units')
+        if isscalar:
+            return times[0]
+        else:
+            return numpy.reshape(numpy.array(times), shape)
+    else: # use netcdftime module for 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.  Accuracy is somewhere between a millisecond and a microsecond,
+depending on the time interval and the calendar used.
+
+ 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 C{calendar='proleptic_gregorian'}, or
+C{calendar = 'standard'} or C{'gregorian'}
+and the date is after the breakpoint between the Julian and
+Gregorian calendars (1582-10-15). Otherwise, they are 'phony' datetime
+objects which support some but not all the methods of 'real' python
+datetime objects. The datetime instances
+do not contain a time-zone offset, even if the specified C{units}
+contains one.
+    """
+    calendar = calendar.lower()
+    basedate = _dateparse(units)
+    unit = units.split()[0].lower()
+
+    if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
+       (calendar in ['gregorian','standard'] and basedate > gregorian):
+        # use python datetime module,
+        isscalar = False
+        try:
+            times[0]
+        except:
+            isscalar = True
+        if isscalar:
+            times = numpy.array([times],dtype='d')
+        else:
+            times = numpy.array(times, dtype='d')
+            shape = times.shape
+        ismasked = False
+        if hasattr(times,'mask'):
+            mask = times.mask
+            ismasked = True
+        dates = []
+        for time in times.flat:
+            if ismasked and not time:
+                dates.append(None)
+            else:
+                # convert to total seconds
+                if unit in microsec_units:
+                    tsecs = time/1.e6
+                elif unit in millisec_units:
+                    tsecs = time/1.e3
+                elif unit in sec_units:
+                    tsecs = time
+                elif unit in min_units:
+                    tsecs = time*60.
+                elif unit in hr_units:
+                    tsecs = time*3600.
+                elif unit in day_units:
+                    tsecs = time*86400.
+                else:
+                    raise ValueError('unsupported time units')
+                # compute time delta.
+                days = tsecs // 86400.
+                msecsd = tsecs*1.e6 - days*86400.*1.e6
+                secs = msecsd // 1.e6
+                msecs = numpy.round(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 numpy.reshape(numpy.array(dates), shape)
+    else: # use netcdftime for 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).
+    """
+    if calendar == None:
+        calendar = getattr(nctime, 'calendar', 'standard')
+    calendar = calendar.lower()
+    basedate = _dateparse(nctime.units)
+
+    if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
+       (calendar in ['gregorian','standard'] and basedate > gregorian):
+        # use python datetime
+        times = date2num(dates,nctime.units,calendar=calendar)
+        return netcdftime.time2index(times, nctime, calendar, select)
+    else: # use netcdftime module for other cases
+        return netcdftime.date2index(dates, nctime, calendar, select)
+
+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 = 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/netCDF4/utils.py b/netCDF4/utils.py
new file mode 100644
index 0000000..ca49917
--- /dev/null
+++ b/netCDF4/utils.py
@@ -0,0 +1,911 @@
+from __future__ import print_function
+
+import sys
+import numpy as np
+from numpy import ma
+import warnings
+import getopt
+import os
+
+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 slicing expression into a form that is
+    compatible with the nc_get_vars function. Specifically, it needs
+    to interpret integers, slices, Ellipses, and 1-d sequences of integers
+    and booleans.
+
+    Numpy uses "broadcasting indexing" to handle array-valued indices.
+    "Broadcasting indexing" (a.k.a "fancy indexing") treats all multi-valued
+    indices together to allow arbitrary points to be extracted. The index
+    arrays can be multidimensional, and more than one can be specified in a
+    slice, as long as they can be "broadcast" against each other.
+    This style of indexing can be very powerful, but it is very hard
+    to understand, explain, and implement (and can lead to hard to find bugs).
+    Most other python packages and array processing
+    languages (such as netcdf4-python, xray, biggus, matlab and fortran)
+    use "orthogonal indexing" which only allows for 1-d index arrays and
+    treats these arrays of indices independently along each dimension.
+
+    The implementation of "orthogonal indexing" used here requires that
+    index arrays be 1-d boolean or integer. If integer arrays are used,
+    the index values must be sorted and contain no duplicates.
+
+    In summary, slicing netcdf4-python variable objects with 1-d integer or
+    boolean arrays is allowed, but may give a different result than slicing a
+    numpy array.
+
+    Numpy also supports slicing an array with a boolean array of the same
+    shape. For example x[x>0] returns a 1-d array with all the positive values of x.
+    This is also not supported in netcdf4-python, if x.ndim > 1.
+
+    Orthogonal indexing can be used in to select netcdf variable slices
+    using the dimension variables. For example, you can use v[lat>60,lon<180]
+    to fetch the elements of v obeying conditions on latitude and longitude.
+    Allow for this sort of simple variable subsetting is the reason we decided to
+    deviate from numpy's slicing rules.
+
+    This function is used both by the __setitem__ and __getitem__ method of
+    the Variable class.
+
+    Parameters
+    ----------
+    elem : tuple of integer, slice, ellipsis or 1-d boolean or integer
+    sequences used to slice the netCDF Variable (Variable[elem]).
+    shape : tuple containing 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 by __setitime__
+    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):
+            try:
+                dimname = dimensions[i]
+                # is this dimension unlimited?
+                # look in current group, and parents for dim.
+                dim = _find_dim(grp, dimname)
+                unlim = dim.isunlimited()
+            except IndexError: # more slices than dimensions (issue 371)
+                unlim = False
+        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
+
+
+def _getgrp(g,p):
+    import posixpath
+    grps = p.split("/")
+    for gname in grps:
+        if gname == "": continue
+        g = g.groups[gname]
+    return g
+
+def ncinfo():
+
+    from netCDF4 import Dataset
+
+
+    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()
+
+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()
+
+def nc4tonc3():
+    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)
+
+
+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."""
+
+    from netCDF4 import Dataset
+    
+    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 = numpy.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 = numpy.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 = numpy.where(idata == ncvar.missing_value, mval, tmpdata)
+            else:
+                tmpdata = idata
+            var[:] = tmpdata
+        ncfile4.sync() # flush data to disk
+    # close files.
+    ncfile3.close()
+    ncfile4.close()
+
+
+def nc3tonc4():
+    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/netCDF4_utils.py b/netCDF4_utils.py
deleted file mode 100644
index f19ebef..0000000
--- a/netCDF4_utils.py
+++ /dev/null
@@ -1,404 +0,0 @@
-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):
-            try:
-                dimname = dimensions[i]
-                # is this dimension unlimited?
-                # look in current group, and parents for dim.
-                dim = _find_dim(grp, dimname)
-                unlim = dim.isunlimited()
-            except IndexError: # more slices than dimensions (issue 371)
-                unlim = False
-        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
index d38514c..a7d1f4a 100644
--- a/netcdftime/__init__.py
+++ b/netcdftime/__init__.py
@@ -1,2 +1,4 @@
 from .netcdftime import utime, JulianDayFromDate, DateFromJulianDay
 from .netcdftime import datetime, _parse_date, date2index, time2index
+from .netcdftime import microsec_units, millisec_units, \
+                        sec_units, hr_units, day_units, min_units
diff --git a/netcdftime/_datetime.c b/netcdftime/_datetime.c
index 8d9eddd..ae575c2 100644
--- a/netcdftime/_datetime.c
+++ b/netcdftime/_datetime.c
@@ -1,5 +1,13 @@
 /* Generated by Cython 0.22 */
 
+/* BEGIN: Cython Metadata
+{
+    "distutils": {
+        "depends": []
+    }
+}
+END: Cython Metadata */
+
 #define PY_SSIZE_T_CLEAN
 #ifndef CYTHON_USE_PYLONG_INTERNALS
 #ifdef PYLONG_BITS_IN_DIGIT
@@ -721,13 +729,12 @@ 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_jsw_python_netcdf4_python[] = "/Users/jsw/python/netcdf4-python.git/netcdftime/_datetime.pyx";
+static char __pyx_k_home_mb312_dev_trees_netcdf4_py[] = "/home/mb312/dev_trees/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_jsw_python_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;
@@ -741,6 +748,7 @@ 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_kp_s_home_mb312_dev_trees_netcdf4_py;
 static PyObject *__pyx_n_s_hour;
 static PyObject *__pyx_n_s_i;
 static PyObject *__pyx_n_s_illegal_s;
@@ -3452,7 +3460,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__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_jsw_python_netcdf4_python, __pyx_k_Users_jsw_python_netcdf4_python, sizeof(__pyx_k_Users_jsw_python_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},
@@ -3466,6 +3473,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__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_kp_s_home_mb312_dev_trees_netcdf4_py, __pyx_k_home_mb312_dev_trees_netcdf4_py, sizeof(__pyx_k_home_mb312_dev_trees_netcdf4_py), 0, 0, 1, 0},
   {&__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},
@@ -3591,7 +3599,7 @@ static int __Pyx_InitCachedConstants(void) {
   __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 = 80; __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_jsw_python_netcdf4_python, __pyx_n_s_findall, 80, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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_home_mb312_dev_trees_netcdf4_py, __pyx_n_s_findall, 80, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
   /* "netcdftime/_datetime.pyx":97
  * 
@@ -3603,7 +3611,7 @@ static int __Pyx_InitCachedConstants(void) {
   __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 = 97; __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_jsw_python_netcdf4_python, __pyx_n_s_strftime, 97, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __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_home_mb312_dev_trees_netcdf4_py, __pyx_n_s_strftime, 97, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_RefNannyFinishContext();
   return 0;
   __pyx_L1_error:;
diff --git a/netcdftime/netcdftime.py b/netcdftime/netcdftime.py
index b0fb173..69a8359 100644
--- a/netcdftime/netcdftime.py
+++ b/netcdftime/netcdftime.py
@@ -13,9 +13,13 @@ except ImportError:  # python 3.x
 
 from ._datetime import datetime
 
-_units = ['days', 'hours', 'minutes', 'seconds',
-          'day', 'hour', 'minute', 'second',
-          'milliseconds','millisecond','microseconds','microsecond']
+microsec_units = ['microseconds','microsecond', 'microsec', 'microsecs']
+millisec_units = ['milliseconds', 'millisecond', 'millisec', 'millisecs']
+sec_units =      ['second', 'seconds', 'sec', 'secs', 's']
+min_units =      ['minute', 'minutes', 'min', 'mins']
+hr_units =       ['hour', 'hours', 'hr', 'hrs', 'h']
+day_units =      ['day', 'days', 'd']
+_units = microsec_units+millisec_units+sec_units+min_units+hr_units+day_units
 _calendars = ['standard', 'gregorian', 'proleptic_gregorian',
               'noleap', 'julian', 'all_leap', '365_day', '366_day', '360_day']
 
@@ -299,7 +303,7 @@ def DateFromJulianDay(JD, calendar='standard'):
     year[year <= 0] = year[year <= 0] - 1
 
     # a leap year?
-    leap = np.zeros(len(year))
+    leap = np.zeros(len(year),dtype=dayofyr.dtype)
     leap[year % 4 == 0] = 1
     if calendar == 'proleptic_gregorian':
         leap[(year % 100 == 0) & (year % 400 != 0)] = 0
@@ -736,18 +740,20 @@ units to datetime objects.
         if not isscalar:
             jdelta = numpy.array(jdelta)
         # convert to desired units, subtract time zone offset.
-        if self.units in ['microseconds','microsecond']:
+        if self.units in microsec_units:
             jdelta = jdelta * 86400. * 1.e6  - self.tzoffset * 60. * 1.e6
-        elif self.units in ['milliseconds', 'millisecond']:
+        elif self.units in millisec_units:
             jdelta = jdelta * 86400. * 1.e3  - self.tzoffset * 60. * 1.e3
-        elif self.units in ['second', 'seconds']:
+        elif self.units in sec_units:
             jdelta = jdelta * 86400. - self.tzoffset * 60.
-        elif self.units in ['minute', 'minutes']:
+        elif self.units in min_units:
             jdelta = jdelta * 1440. - self.tzoffset
-        elif self.units in ['hour', 'hours']:
+        elif self.units in hr_units:
             jdelta = jdelta * 24. - self.tzoffset / 60.
-        elif self.units in ['day', 'days']:
+        elif self.units in day_units:
             jdelta = jdelta - self.tzoffset / 1440.
+        else:
+            raise ValueError('unsupported time units')
         if isscalar:
             return jdelta
         else:
@@ -788,18 +794,20 @@ units to datetime objects.
             time_value = numpy.array(time_value, dtype='d')
             shape = time_value.shape
         # convert to desired units, add time zone offset.
-        if self.units in ['microseconds','microsecond']:
+        if self.units in microsec_units:
             jdelta = time_value / 86400000000. + self.tzoffset / 1440.
-        elif self.units in ['milliseconds', 'millisecond']:
+        elif self.units in millisec_units:
             jdelta = time_value / 86400000. + self.tzoffset / 1440.
-        elif self.units in ['second', 'seconds']:
+        elif self.units in sec_units:
             jdelta = time_value / 86400. + self.tzoffset / 1440.
-        elif self.units in ['minute', 'minutes']:
+        elif self.units in min_units:
             jdelta = time_value / 1440. + self.tzoffset / 1440.
-        elif self.units in ['hour', 'hours']:
+        elif self.units in hr_units:
             jdelta = time_value / 24. + self.tzoffset / 1440.
-        elif self.units in ['day', 'days']:
+        elif self.units in day_units:
             jdelta = time_value + self.tzoffset / 1440.
+        else:
+            raise ValueError('unsupported time units')
         jd = self._jd0 + jdelta
         if self.calendar in ['julian', 'standard', 'gregorian', 'proleptic_gregorian']:
             if not isscalar:
diff --git a/ports/README b/ports/README
deleted file mode 100644
index f92baef..0000000
--- a/ports/README
+++ /dev/null
@@ -1,14 +0,0 @@
-* 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
deleted file mode 100644
index 54aef5b..0000000
--- a/ports/python/py-netcdf4/Portfile
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- 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
index d4f522a..d95d728 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,6 +5,8 @@
 # will be used to determine the locations of required libraries.
 # Usually, nothing else is needed.
 use_ncconfig=True
+# use cython to compile netCDF4.pyx (if cython is available).
+use_cython=True
 # path to nc-config script (use if not found in unix PATH).
 #ncconfig=/usr/local/bin/nc-config 
 [directories]
diff --git a/setup.cfg.template b/setup.cfg.template
index d4f522a..d95d728 100644
--- a/setup.cfg.template
+++ b/setup.cfg.template
@@ -5,6 +5,8 @@
 # will be used to determine the locations of required libraries.
 # Usually, nothing else is needed.
 use_ncconfig=True
+# use cython to compile netCDF4.pyx (if cython is available).
+use_cython=True
 # path to nc-config script (use if not found in unix PATH).
 #ncconfig=/usr/local/bin/nc-config 
 [directories]
diff --git a/setup.py b/setup.py
index 2568fe4..bc2dd96 100644
--- a/setup.py
+++ b/setup.py
@@ -1,13 +1,27 @@
-import os, sys, subprocess, shutil
+import os, sys, subprocess
+import os.path as osp
+
 try:
     from setuptools import setup, Extension
-    setuptools_extra_kwargs = {"install_requires":["numpy>=1.3"]}
+    setuptools_extra_kwargs = {
+        "install_requires":  ["numpy>=1.7"],
+        "entry_points": {
+            'console_scripts': [
+                'ncinfo = netCDF4.utils:ncinfo',
+                'nc4tonc3 = netCDF4.utils:nc4tonc3',
+                'nc3tonc4 = netCDF4.utils:nc3tonc4',
+            ]
+        },
+    }
 except ImportError:
     from distutils.core  import setup, Extension
-    setuptools_extra_kwargs = {}
+    setuptools_extra_kwargs = {
+        "scripts": ['utils/nc3tonc4','utils/nc4tonc3','utils/ncinfo']
+    }
 from distutils.dist import Distribution
+
 try:
-    from Cython.Distutils import build_ext
+    from Cython.Build import cythonize
     from Cython import __version__ as cython_version
     if cython_version >= '0.19':
         has_cython = True
@@ -140,6 +154,7 @@ setup_cfg = 'setup.cfg'
 # contents of setup.cfg will override env vars.
 ncconfig = None
 use_ncconfig = None
+use_cython = True
 if os.path.exists(setup_cfg):
     sys.stdout.write('reading from setup.cfg...\n')
     config = configparser.SafeConfigParser()
@@ -180,15 +195,21 @@ if os.path.exists(setup_cfg):
     except: pass
     try: curl_incdir = config.get("directories", "curl_incdir")
     except: pass
-    try: use_ncconfig = config.get("options", "use_ncconfig")
+    try: use_ncconfig = config.getboolean("options", "use_ncconfig")
     except: pass
     try: ncconfig = config.get("options", "ncconfig")
     except: pass
+    try: use_cython = config.getboolean("options", "use_cython")
+    except: pass
+
+# turn off cython compilation if desired
+if has_cython and not use_cython:
+    has_cython = False
 
 # make sure USE_NCCONFIG from environment takes
 # precendence over use_ncconfig from setup.cfg (issue #341).
 if USE_NCCONFIG is None and use_ncconfig is not None:
-    USE_NCCONFIG = bool(use_ncconfig)
+    USE_NCCONFIG = use_ncconfig
 elif USE_NCCONFIG is None:
     USE_NCCONFIG = False
 
@@ -235,7 +256,7 @@ HDF5_DIR environment variable not set, checking some standard locations ..\n""")
             raise ValueError('did not find HDF5 headers')
     else:
         if HDF5_incdir is None:
-             HDF5_incdir = os.path.join(HDF5_dir, 'include')
+            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)
@@ -329,19 +350,26 @@ if netcdf_lib_version is None:
 else:
     sys.stdout.write('using netcdf library version %s\n' % netcdf_lib_version)
 
+cmdclass = {}
+netcdf4_src_root = osp.join('netCDF4', '_netCDF4')
+netcdf4_src_c = netcdf4_src_root + '.c'
 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),
+    extensions = [Extension("netCDF4._netCDF4",
+                            [netcdf4_src_root + '.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')
+    if len(sys.argv) >= 2 and os.path.exists(netcdf4_src_c):
+        os.remove(netcdf4_src_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')
+    f = open(osp.join('include', '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')
@@ -361,22 +389,25 @@ if has_cython and 'sdist' not in sys.argv[1:]:
         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}
+    ext_modules = cythonize(extensions, include_path=['include'])
 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),
+    extensions = [Extension("netCDF4._netCDF4",
+                            [netcdf4_src_c],
+                            libraries=libs,
+                            library_dirs=lib_dirs,
+                            include_dirs=inc_dirs,
+                            runtime_library_dirs=lib_dirs),
                   Extension('netcdftime._datetime', ['netcdftime/_datetime.c'])]
-    cmdclass = {}
+    ext_modules = extensions
 
 setup(name = "netCDF4",
   cmdclass = cmdclass,
-  version = "1.1.7",
+  version = "1.1.8",
   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.",
@@ -387,7 +418,6 @@ setup(name = "netCDF4",
                  "Topic :: Software Development :: Libraries :: Python Modules",
                  "Topic :: System :: Archiving :: Compression",
                  "Operating System :: OS Independent"],
-  py_modules = ["netCDF4_utils"],
-  packages = ['netcdftime'],
-  ext_modules = extensions,
+  packages = ['netcdftime', 'netCDF4'],
+  ext_modules = ext_modules,
   **setuptools_extra_kwargs)
diff --git a/test/tst_atts.py b/test/tst_atts.py
index 65005ee..11b1bad 100644
--- a/test/tst_atts.py
+++ b/test/tst_atts.py
@@ -4,7 +4,7 @@ import unittest
 import os
 import tempfile
 import numpy as NP
-from numpy.random.mtrand import uniform 
+from numpy.random.mtrand import uniform
 import netCDF4
 
 try:
diff --git a/test/tst_compoundvar.py b/test/tst_compoundvar.py
index 99164a1..90176d2 100644
--- a/test/tst_compoundvar.py
+++ b/test/tst_compoundvar.py
@@ -19,7 +19,7 @@ TYPE_NAME2 = 'cmp2'
 TYPE_NAME3 = 'cmp3'
 TYPE_NAME4 = 'cmp4'
 TYPE_NAME5 = 'cmp5'
-DIM_SIZE=3 
+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)])
diff --git a/test/tst_compression.py b/test/tst_compression.py
index 7df8225..642a97c 100644
--- a/test/tst_compression.py
+++ b/test/tst_compression.py
@@ -1,5 +1,6 @@
 from numpy.random.mtrand import uniform
-from netCDF4 import Dataset, _quantize
+from netCDF4 import Dataset
+from netCDF4.utils import _quantize
 from numpy.testing import assert_almost_equal
 import os, tempfile, unittest
 
diff --git a/test/tst_dims.py b/test/tst_dims.py
index c1aac2c..fc02d40 100644
--- a/test/tst_dims.py
+++ b/test/tst_dims.py
@@ -3,7 +3,7 @@ import unittest
 import os
 import tempfile
 import numpy as NP
-from numpy.random.mtrand import uniform 
+from numpy.random.mtrand import uniform
 import netCDF4
 
 FILE_NAME = tempfile.mktemp(".nc")
@@ -11,7 +11,7 @@ LAT_NAME="lat"
 LAT_LEN = 25
 LAT_LENG = 50
 LON_NAME="lon"
-LON_LEN = 50  
+LON_LEN = 50
 LON_LENG = 100
 LEVEL_NAME="level"
 LEVEL_LEN = None
diff --git a/test/tst_diskless.py b/test/tst_diskless.py
index e0ae272..b7a55b8 100644
--- a/test/tst_diskless.py
+++ b/test/tst_diskless.py
@@ -1,6 +1,6 @@
 import unittest, os, tempfile
 import numpy as np
-from numpy.random.mtrand import uniform 
+from numpy.random.mtrand import uniform
 from numpy.testing import assert_array_equal, assert_array_almost_equal
 import netCDF4
 
@@ -8,7 +8,7 @@ import netCDF4
 
 # create an n1dim by n2dim by n3dim random array
 n1dim = 10
-n2dim = 73 
+n2dim = 73
 n3dim = 144
 ranarr = 100.*uniform(size=(n1dim,n2dim,n3dim))
 ranarr2 = 100.*uniform(size=(n1dim,n2dim,n3dim))
diff --git a/test/tst_grps2.py b/test/tst_grps2.py
new file mode 100644
index 0000000..13c471c
--- /dev/null
+++ b/test/tst_grps2.py
@@ -0,0 +1,44 @@
+import sys
+import unittest
+import os
+import tempfile
+import numpy as NP
+import netCDF4
+
+# test implicit group creation by using unix-like paths
+# in createVariable and createGroups (added in 1.1.8).
+# also test Dataset.__getitem__, also added in 1.1.8.
+
+FILE_NAME = tempfile.mktemp(".nc")
+
+class Groups2TestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.file = FILE_NAME
+        f = netCDF4.Dataset(self.file,'w')
+        x = f.createDimension('x',10)
+        # create groups in path if they don't already exist
+        v = f.createVariable('/grouped/data/v',float,('x',))
+        g = f.groups['grouped']
+        # create groups underneath 'grouped'
+        v2 = g.createVariable('./data/data2/v2',float,('x',))
+        f.close()
+
+    def tearDown(self):
+        # Remove the temporary files
+        os.remove(self.file)
+
+    def runTest(self):
+        """testing implicit group and creation and Dataset.__getitem__"""
+        f  = netCDF4.Dataset(self.file, 'r')
+        v1 = f['/grouped/data/v']
+        v2 = ((f.groups['grouped']).groups['data']).variables['v']
+        g = f['/grouped/data']
+        v3 = g['data2/v2']
+        assert(v1 == v2)
+        assert(g == f.groups['grouped'].groups['data'])
+        assert(v3.name == 'v2')
+        f.close()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test/tst_masked.py b/test/tst_masked.py
index 654ed20..870c31a 100644
--- a/test/tst_masked.py
+++ b/test/tst_masked.py
@@ -61,6 +61,10 @@ class PrimitiveTypesTestCase(unittest.TestCase):
         doh.scale_factor = 0.1
         doh.add_offset = 0.
         doh[0] = 1.1
+        # added to test fix to issue 381
+        doh2 = file.createVariable('packeddata3','i2','n')
+        doh2.add_offset = 1.
+        doh2[0] = 1.
         file.close()
 
     def tearDown(self):
@@ -75,6 +79,7 @@ class PrimitiveTypesTestCase(unittest.TestCase):
         datamasked3 = file.variables['maskeddata3']
         datapacked = file.variables['packeddata']
         datapacked2 = file.variables['packeddata2']
+        datapacked3 = file.variables['packeddata3']
         # check missing_value, scale_factor and add_offset attributes.
         assert datamasked.missing_value == missing_value
         assert datapacked.scale_factor == scale_factor
@@ -95,6 +100,7 @@ class PrimitiveTypesTestCase(unittest.TestCase):
         assert_array_almost_equal(datamasked[:].filled(),ranarr)
         assert_array_almost_equal(datamasked2[:].filled(),ranarr2)
         assert_array_almost_equal(datapacked[:],packeddata,decimal=4)
+        assert(datapacked3[:].dtype == NP.float)
         # added to test fix to issue 46 (result before r865 was 10)
         assert_array_equal(datapacked2[0],11)
         file.close()
diff --git a/test/tst_masked2.py b/test/tst_masked2.py
index 7892bd0..1dcca92 100755
--- a/test/tst_masked2.py
+++ b/test/tst_masked2.py
@@ -7,7 +7,7 @@ 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 
+seterr(over='ignore') # don't print warning for overflow errors
 
 # test automatic conversion of masked arrays, and
 # packing/unpacking of short ints.
@@ -42,7 +42,7 @@ class PrimitiveTypesTestCase(unittest.TestCase):
         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
@@ -56,7 +56,7 @@ class PrimitiveTypesTestCase(unittest.TestCase):
         b[:] = f.variables['v'][:]
         f.close()
         f2.close()
-        
+
         self.files.append(FILE_NAME3)
         f = Dataset(FILE_NAME3,'w')
         x = f.createDimension('x',None)
@@ -75,7 +75,7 @@ class PrimitiveTypesTestCase(unittest.TestCase):
             os.remove(f)
 
     def runTest(self):
-        """testing auto-conversion of masked arrays and packed integers""" 
+        """testing auto-conversion of masked arrays and packed integers"""
 
         f = Dataset(self.files[0])
         data = f.variables['v'][:]
diff --git a/test/tst_slicing.py b/test/tst_slicing.py
index ee6fbc4..61f4268 100644
--- a/test/tst_slicing.py
+++ b/test/tst_slicing.py
@@ -94,6 +94,7 @@ class VariablesTestCase(unittest.TestCase):
         v[...] = 10
         assert_array_equal(v[...], 10)
         assert_equal(v.shape, v[...].shape)
+        assert(type(v[...]) == np.ndarray)
         f.close()
 
     def test_issue259(self):
diff --git a/test/tst_unlimdim.py b/test/tst_unlimdim.py
index 0b42757..85bd89e 100644
--- a/test/tst_unlimdim.py
+++ b/test/tst_unlimdim.py
@@ -3,7 +3,7 @@ import unittest
 import os
 import tempfile
 import numpy as NP
-from numpy.random.mtrand import uniform 
+from numpy.random.mtrand import uniform
 from numpy.testing import assert_array_equal, assert_array_almost_equal
 import netCDF4
 
@@ -28,8 +28,8 @@ class UnlimdimTestCase(unittest.TestCase):
         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[:,0:n2dim,:] = ranarr
+        foo[:] = ranarr
         foo[:,n2dim:,:] = 2.*ranarr
         # bar has 2 unlimited dimensions
         f.createDimension('n4', None)
diff --git a/test/tst_utils.py b/test/tst_utils.py
index dcae845..7ce9d1f 100644
--- a/test/tst_utils.py
+++ b/test/tst_utils.py
@@ -1,5 +1,5 @@
 from numpy.testing import assert_equal
-import netCDF4 as nc
+from netCDF4.utils import _StartCountStride, _out_array_shape
 import unittest
 import numpy as np
 
@@ -8,7 +8,7 @@ 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))
+        start, count, stride, put_ind = _StartCountStride(elem, (50, 4, 10))
         assert_equal(start, 0)
         assert_equal(count[..., 0], 1)
         assert_equal(count[..., 1], 4)
@@ -17,12 +17,12 @@ class TestgetStartCountStride(unittest.TestCase):
         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))
+        assert_equal(_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))
+        start, count, stride, put_ind = _StartCountStride(elem, (50, 4, 10))
         assert_equal(start[..., 0], 5)
         assert_equal(start[..., 1], 0)
         assert_equal(start[..., 2], 5)
@@ -31,12 +31,12 @@ class TestgetStartCountStride(unittest.TestCase):
         assert_equal(count[..., 2], 2)
         assert_equal(stride[..., 2], 2)
 
-        assert_equal(nc._out_array_shape(count), (1, 4,2))
+        assert_equal(_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))
+        start, count, stride, put_ind = _StartCountStride(elem, (50, 4, 10))
         assert_equal(start[..., 0], 0)
         assert_equal(start[..., 1].squeeze(), 1)
         assert_equal(start[..., 2], 8)
@@ -45,30 +45,30 @@ class TestgetStartCountStride(unittest.TestCase):
         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))
+        assert_equal(_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))
+        start, count, stride, put_ind = _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))
+            start, count, stride, put_ind = _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))
+        start, count, stride, put_ind = _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))
+        start, count, stride, put_ind = _StartCountStride(elem, (50, 4, 10))
 
-        assert_equal(nc._out_array_shape(count), (3, 3, 10))
+        assert_equal(_out_array_shape(count), (3, 3, 10))
 
         assert_equal(start[..., 0].squeeze(), [4,6,7])
         assert_equal(start[..., 1].squeeze(), [1,1,1])
@@ -79,29 +79,29 @@ class TestgetStartCountStride(unittest.TestCase):
 
         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))
+        start, count, stride, put_ind = _StartCountStride(elem, (50, 5, 10))
+        assert_equal(_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))
+        start, count, stride, put_ind = _StartCountStride(elem, (3,4,5))
         orig = np.arange(60).reshape((3,4,5))
-        dest = np.empty(nc._out_array_shape(count))
+        dest = np.empty(_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))
+        start, count, stride, put_ind = _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))
+        assert_equal(_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))
+        start, count, stride, put_ind = _StartCountStride(elem, (3,4,5))
+        assert_equal(_out_array_shape(count), (2,3,5))
 
         try:
             elem = (np.array([True, True, False]), np.array([True, True, True, False]), slice(None))
@@ -113,14 +113,14 @@ class TestgetStartCountStride(unittest.TestCase):
     def test_1d(self):
         # Scalar
         elem = (0)
-        start, count, stride, put_ind = nc._StartCountStride(elem, (10,))
+        start, count, stride, put_ind = _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,))
+        start, count, stride, put_ind = _StartCountStride(elem, (10,))
         assert_equal(start, 9)
         assert_equal(count, 1)
         assert_equal(stride, 1)
@@ -128,7 +128,7 @@ class TestgetStartCountStride(unittest.TestCase):
 
         # test conversion of a integer index array to a slice
         elem = (np.array([0]))
-        start, count, stride, put_ind = nc._StartCountStride(elem, (10,))
+        start, count, stride, put_ind = _StartCountStride(elem, (10,))
         assert_equal(start, 0)
         assert_equal(count, 1)
         assert_equal(stride, 1)
@@ -136,7 +136,7 @@ class TestgetStartCountStride(unittest.TestCase):
 
         # Slice
         elem = (slice(2,5,2))
-        start, count, stride, put_ind = nc._StartCountStride(elem, (10,))
+        start, count, stride, put_ind = _StartCountStride(elem, (10,))
         assert_equal(start, 2)
         assert_equal(count, 2)
         assert_equal(stride, 2)
@@ -144,7 +144,7 @@ class TestgetStartCountStride(unittest.TestCase):
 
         # Integer sequence
         elem = ([2,4,7])
-        start, count, stride, put_ind = nc._StartCountStride(elem, (10,))
+        start, count, stride, put_ind = _StartCountStride(elem, (10,))
         assert_equal(start.squeeze(), [2,4,7])
         assert_equal(count, 1)
         assert_equal(stride, 1)
@@ -152,7 +152,7 @@ class TestgetStartCountStride(unittest.TestCase):
 
         # Boolean slicing
         elem = (np.array([True, True, False, True, False]),)
-        start, count, stride, put_ind = nc._StartCountStride(elem, (5,))
+        start, count, stride, put_ind = _StartCountStride(elem, (5,))
         assert_equal(start.squeeze(), [0,1,3])
         assert_equal(count, 1)
         assert_equal(stride, 1)
@@ -160,7 +160,7 @@ class TestgetStartCountStride(unittest.TestCase):
 
         # Integer sequence simplification
         elem = ([2,3,4])
-        start, count, stride, put_ind = nc._StartCountStride(elem, (10,))
+        start, count, stride, put_ind = _StartCountStride(elem, (10,))
         assert_equal(start, 2)
         assert_equal(count, 3)
         assert_equal(stride, 1)
@@ -168,7 +168,7 @@ class TestgetStartCountStride(unittest.TestCase):
 
         # Boolean indices simplification
         elem = (np.array([False, True, True, True, False]))
-        start, count, stride, put_ind = nc._StartCountStride(elem, (5,))
+        start, count, stride, put_ind = _StartCountStride(elem, (5,))
         assert_equal(start, 1)
         assert_equal(count, 3)
         assert_equal(stride, 1)
@@ -176,10 +176,10 @@ class TestgetStartCountStride(unittest.TestCase):
 
         # All False
         elem = (np.array([False, False, False, False]))
-        start, count, stride, put_ind = nc._StartCountStride(elem, (4,))
+        start, count, stride, put_ind = _StartCountStride(elem, (4,))
 
         assert_equal(count, 0)
-        assert_equal(nc._out_array_shape(count), (0,))
+        assert_equal(_out_array_shape(count), (0,))
 
 
 class TestsetStartCountStride(unittest.TestCase):
@@ -189,13 +189,13 @@ class TestsetStartCountStride(unittest.TestCase):
         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))
+        start, count, stride, take_ind = _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),\
+        start, count, stride, take_ind = _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))
@@ -205,7 +205,7 @@ class TestsetStartCountStride(unittest.TestCase):
         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))
+        start, count, stride, take_ind = _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))
@@ -220,7 +220,7 @@ class TestsetStartCountStride(unittest.TestCase):
         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))
+        start, count, stride, take_ind = _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))
@@ -235,7 +235,7 @@ class TestsetStartCountStride(unittest.TestCase):
         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),\
+        start, count, stride, take_ind = _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))
@@ -245,7 +245,7 @@ class TestsetStartCountStride(unittest.TestCase):
 
 
         elem = (slice(None, None, 2), slice(None), slice(None))
-        start, count, stride, take_ind = nc._StartCountStride(elem, (0, 6, 7),\
+        start, count, stride, take_ind = _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))
diff --git a/test/tst_vars.py b/test/tst_vars.py
index 398c5a2..c88ff6a 100644
--- a/test/tst_vars.py
+++ b/test/tst_vars.py
@@ -3,7 +3,7 @@ import unittest
 import os
 import tempfile
 import numpy as NP
-from numpy.random.mtrand import uniform 
+from numpy.random.mtrand import uniform
 from numpy.testing import assert_array_equal, assert_array_almost_equal
 import netCDF4
 
@@ -66,14 +66,14 @@ class VariablesTestCase(unittest.TestCase):
         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 
+        # test iterating over variable (should stop when
         # it gets to the end and raises IndexError, issue 121)
         for v in v1:
             pass
diff --git a/test/tst_vlen.py b/test/tst_vlen.py
index aea1d97..904394c 100644
--- a/test/tst_vlen.py
+++ b/test/tst_vlen.py
@@ -74,7 +74,7 @@ class TestInvalidDataType(unittest.TestCase):
         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.createVariable('foo', str, ('x',))
         f.close()
         os.remove(FILE_NAME)
 
@@ -113,7 +113,7 @@ class TestObjectArrayIndexing(unittest.TestCase):
         f = Dataset(self.file, 'r')
         vs_alt = f.variables[VAR3_NAME]
         unicode_strings = vs_alt[:]
-        fancy_indexed = unicode_strings[0][[1,2,4]] 
+        fancy_indexed = unicode_strings[0][[1,2,4]]
         assert fancy_indexed[0] == 'abc'
         assert fancy_indexed[1] == 'abcd'
         assert fancy_indexed[2] == 'abcdef'
diff --git a/utils.pyx b/utils.pyx
deleted file mode 100644
index 6338265..0000000
--- a/utils.pyx
+++ /dev/null
@@ -1,815 +0,0 @@
-from datetime import timedelta, datetime, MINYEAR
-from netcdftime import _parse_date 
-
-# start of the gregorian calendar
-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"""
-    # same as version in netcdftime, but returns a timezone naive
-    # python datetime instance with the utc_offset included.
-    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:]
-    year, month, day, hour, minute, second, utc_offset =\
-        _parse_date( isostring.strip() )
-    basedate = datetime(year, month, day, hour, minute, second)
-    # add utc_offset to basedate time instance (which is timezone naive)
-    basedate += timedelta(days=utc_offset/1440.)
-    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.  Accuracy is somewhere between a millisecond and a microsecond,
-depending on the time interval and the calendar used.
-
- 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.
-    """
-    basedate = _dateparse(units)
-    unit = units.split()[0].lower()
-
-    if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
-       (calendar in ['gregorian','standard'] and basedate > gregorian):
-        # use python datetime module,
-        isscalar = False
-        try:
-            dates[0]
-        except:
-            isscalar = True
-        if isscalar:
-            dates = numpy.array([dates])
-        else:
-            dates = numpy.array(dates)
-            shape = dates.shape
-        ismasked = False
-        if hasattr(dates,'mask'):
-            mask = dates.mask
-            ismasked = True
-        times = []
-        for date in dates.flat:
-            if ismasked and not date:
-                times.append(None)
-            else:
-                td = date - basedate
-                # total time in microseconds.
-                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 == 'minutes' or unit == 'minute':
-                    times.append(totaltime/1.e6/60)
-                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 numpy.reshape(numpy.array(times), shape)
-    else: # use netcdftime module for 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.  Accuracy is somewhere between a millisecond and a microsecond,
-depending on the time interval and the calendar used.
-
- 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 C{calendar='proleptic_gregorian'}, or
-C{calendar = 'standard'} or C{'gregorian'}
-and the date is after the breakpoint between the Julian and
-Gregorian calendars (1582-10-15). Otherwise, they are 'phony' datetime 
-objects which support some but not all the methods of 'real' python
-datetime objects. The datetime instances
-do not contain a time-zone offset, even if the specified C{units}
-contains one.
-    """
-    calendar = calendar.lower()
-    basedate = _dateparse(units)
-    unit = units.split()[0].lower()
-
-    if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
-       (calendar in ['gregorian','standard'] and basedate > gregorian):
-        # use python datetime module,
-        isscalar = False
-        try:
-            times[0]
-        except:
-            isscalar = True
-        if isscalar:
-            times = numpy.array([times],dtype='d')
-        else:
-            times = numpy.array(times, dtype='d')
-            shape = times.shape
-        ismasked = False
-        if hasattr(times,'mask'):
-            mask = times.mask
-            ismasked = True
-        dates = []
-        for time in times.flat:
-            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 == 'minutes' or unit == 'minute':
-                    tsecs = time*60.
-                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 = numpy.round(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 numpy.reshape(numpy.array(dates), shape)
-    else: # use netcdftime for 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).
-    """
-    if calendar == None:
-        calendar = getattr(nctime, 'calendar', 'standard')
-    calendar = calendar.lower()
-    basedate = _dateparse(nctime.units)
-
-    if (calendar == 'proleptic_gregorian' and basedate.year >= MINYEAR) or \
-       (calendar in ['gregorian','standard'] and basedate > gregorian):
-        # use python datetime
-        times = date2num(dates,nctime.units,calendar=calendar)
-        return netcdftime.time2index(times, nctime, calendar, select)
-    else: # use netcdftime module for other cases
-        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
index 23e1fbb..ed4964e 100755
--- a/utils/nc3tonc4
+++ b/utils/nc3tonc4
@@ -1,280 +1,4 @@
 #!/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)
+from netCDF4.utils import nc3tonc4
+nc3tonc4()
diff --git a/utils/nc4tonc3 b/utils/nc4tonc3
index 41eaf7b..efa12f6 100755
--- a/utils/nc4tonc3
+++ b/utils/nc4tonc3
@@ -1,127 +1,4 @@
 #!/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)
+from netCDF4.utils import nc4tonc3
+nc4tonc3()
diff --git a/utils/ncinfo b/utils/ncinfo
index 101082c..3afff8f 100755
--- a/utils/ncinfo
+++ b/utils/ncinfo
@@ -1,82 +1,4 @@
 #!/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()
+from netCDF4.utils import ncinfo
+ncinfo()

-- 
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