/* Generated by Cython 0.20.1 on Fri Aug 29 13:58:00 2014 */

#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 0
#else
#include "pyconfig.h"
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 1
#else
#define CYTHON_USE_PYLONG_INTERNALS 0
#endif
#endif
#endif
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02040000
    #error Cython requires Python 2.4+.
#else
#define CYTHON_ABI "0_20_1"
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if CYTHON_COMPILING_IN_PYPY
#define Py_OptimizeFlag 0
#endif
#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define CYTHON_FORMAT_SSIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_As_int(o)
  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                (PyErr_Format(PyExc_TypeError, \
                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
                                 (PyObject*)0))
  #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
                                  !PyComplex_Check(o))
  #define PyIndex_Check __Pyx_PyIndex_Check
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
  #define __PYX_BUILD_PY_SSIZE_T "i"
#else
  #define __PYX_BUILD_PY_SSIZE_T "n"
  #define CYTHON_FORMAT_SSIZE_T "z"
  #define __Pyx_PyIndex_Check PyIndex_Check
#endif
#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)
  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;
  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#endif
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
#endif
#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#if PY_VERSION_HEX < 0x02060000
  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
#endif
#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT)
  #define Py_TPFLAGS_IS_ABSTRACT 0
#endif
#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#define __Pyx_PyString_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
                                         PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif
#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
   a quiet NaN. */
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif


#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__netCDF4
#define __PYX_HAVE_API__netCDF4
#include "stdlib.h"
#include "H5public.h"
#include "netcdf.h"
#include "numpy/arrayobject.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif

#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
    (sizeof(type) > sizeof(Py_ssize_t) &&               \
          likely(v < (type)PY_SSIZE_T_MAX ||            \
                 v == (type)PY_SSIZE_T_MAX)  &&         \
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
                                v == (type)PY_SSIZE_T_MIN)))  ||  \
    (sizeof(type) == sizeof(Py_ssize_t) &&              \
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((char*)s)
#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((char*)s)
#define __Pyx_PyByteArray_FromUString(s)   __Pyx_PyByteArray_FromString((char*)s)
#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((char*)s)
#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return u_end - u - 1;
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys = NULL;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    sys = PyImport_ImportModule("sys");
    if (sys == NULL) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    if (default_encoding == NULL) goto bad;
    if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (ascii_chars_u == NULL) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
    }
    Py_XDECREF(sys);
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return 0;
bad:
    Py_XDECREF(sys);
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys = NULL;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (sys == NULL) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    if (default_encoding == NULL) goto bad;
    default_encoding_c = PyBytes_AS_STRING(default_encoding);
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(sys);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(sys);
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


#ifdef __GNUC__
  /* Test for GCC > 2.95 */
  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
    #define likely(x)   __builtin_expect(!!(x), 1)
    #define unlikely(x) __builtin_expect(!!(x), 0)
  #else /* __GNUC__ > 2 ... */
    #define likely(x)   (x)
    #define unlikely(x) (x)
  #endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */

static PyObject *__pyx_m;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "netCDF4.pyx",
  "utils.pyx",
  "netCDF4.pxi",
};

/*--- Type declarations ---*/
struct __pyx_obj_7netCDF4_Dataset;
struct __pyx_obj_7netCDF4_Group;
struct __pyx_obj_7netCDF4_Dimension;
struct __pyx_obj_7netCDF4_Variable;
struct __pyx_obj_7netCDF4_CompoundType;
struct __pyx_obj_7netCDF4_VLType;
struct __pyx_opt_args_7netCDF4__strencode;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;

/* "netCDF4.pyx":4059
 *     return VLType(group, dt, name, typeid=xtype)
 * 
 * cdef _strencode(pystr,encoding=None):             # <<<<<<<<<<<<<<
 *     # encode a string into bytes.  If already bytes, do nothing.
 *     # uses default_encoding module variable for default encoding.
 */
struct __pyx_opt_args_7netCDF4__strencode {
  int __pyx_n;
  PyObject *encoding;
};
struct __pyx_defaults {
  PyObject *__pyx_arg_exclude;
};

/* "netCDF4.pyx":1280
 * 
 * 
 * cdef class Dataset:             # <<<<<<<<<<<<<<
 *     """
 * Dataset(self, filename, mode="r", clobber=True, diskless=False, persist=False, keepweakref=False, format='NETCDF4')
 */
struct __pyx_obj_7netCDF4_Dataset {
  PyObject_HEAD
  PyObject *__weakref__;
  int _grpid;
  int _isopen;
  PyObject *groups;
  PyObject *dimensions;
  PyObject *variables;
  PyObject *disk_format;
  PyObject *path;
  PyObject *parent;
  PyObject *file_format;
  PyObject *data_model;
  PyObject *cmptypes;
  PyObject *vltypes;
  PyObject *keepweakref;
};


/* "netCDF4.pyx":2064
 * 
 * 
 * cdef class Group(Dataset):             # <<<<<<<<<<<<<<
 *     """
 * Group(self, parent, name)
 */
struct __pyx_obj_7netCDF4_Group {
  struct __pyx_obj_7netCDF4_Dataset __pyx_base;
};


/* "netCDF4.pyx":2135
 * 
 * 
 * cdef class Dimension:             # <<<<<<<<<<<<<<
 *     """
 * Dimension(self, group, name, size=None)
 */
struct __pyx_obj_7netCDF4_Dimension {
  PyObject_HEAD
  int _dimid;
  int _grpid;
  PyObject *_data_model;
  PyObject *_name;
  PyObject *_grp;
};


/* "netCDF4.pyx":2258
 *                 return False
 * 
 * cdef class Variable:             # <<<<<<<<<<<<<<
 *     """
 * Variable(self, group, name, datatype, dimensions=(), zlib=False, complevel=4, shuffle=True, fletcher32=False, contiguous=False, chunksizes=None, endian='native', least_significant_digit=None,fill_value=None)
 */
struct __pyx_obj_7netCDF4_Variable {
  PyObject_HEAD
  int _varid;
  int _grpid;
  int _nunlimdim;
  PyObject *_name;
  PyObject *ndim;
  PyObject *dtype;
  PyObject *mask;
  PyObject *scale;
  PyObject *_isprimitive;
  PyObject *_iscompound;
  PyObject *_isvlen;
  PyObject *_grp;
  PyObject *_cmptype;
  PyObject *_vltype;
};


/* "netCDF4.pyx":3725
 * # Compound datatype support.
 * 
 * cdef class CompoundType:             # <<<<<<<<<<<<<<
 *     """
 * A L{CompoundType} instance is used to describe a compound data type.
 */
struct __pyx_obj_7netCDF4_CompoundType {
  PyObject_HEAD
  nc_type _nc_type;
  PyObject *dtype;
  PyObject *name;
};


/* "netCDF4.pyx":3949
 * # VLEN datatype support.
 * 
 * cdef class VLType:             # <<<<<<<<<<<<<<
 *     """
 * A L{VLType} instance is used to describe a variable length (VLEN) data type.
 */
struct __pyx_obj_7netCDF4_VLType {
  PyObject_HEAD
  nc_type _nc_type;
  PyObject *dtype;
  PyObject *name;
};

#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          if (acquire_gil) { \
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
              PyGILState_Release(__pyx_gilstate_save); \
          } else { \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext() \
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif /* CYTHON_REFNANNY */
#define __Pyx_XDECREF_SET(r, v) do {                            \
        PyObject *tmp = (PyObject *) r;                         \
        r = v; __Pyx_XDECREF(tmp);                              \
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {                             \
        PyObject *tmp = (PyObject *) r;                         \
        r = v; __Pyx_DECREF(tmp);                               \
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/

static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/
#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); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/

#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

#include <string.h>

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/

static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/

#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/

static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
    const char* function_name); /*proto*/

static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/

#define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) \
    __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
        PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/

static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/

static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/

static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) {
    PyObject *method, *result = NULL;
    if (unlikely(!args)) return NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_Call(method, args, NULL);
    Py_DECREF(method);
bad:
    Py_DECREF(args);
    return result;
}
#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \
    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3))
#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \
    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2))
#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \
    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1))
#define __Pyx_PyObject_CallMethod0(obj, name) \
    __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple))

static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d); /*proto*/

#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args))
                PyErr_SetObject(PyExc_KeyError, args);
            Py_XDECREF(args);
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#else
    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#endif

static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/

#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); /*proto*/
#endif

static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#endif
}

#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

#if PY_VERSION_HEX < 0x02050000
#ifndef PyAnySet_CheckExact
#define PyAnySet_CheckExact(ob) \
    ((ob)->ob_type == &PySet_Type || \
     (ob)->ob_type == &PyFrozenSet_Type)
#define PySet_New(iterable) \
    PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL)
#define Pyx_PyFrozenSet_New(iterable) \
    PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL)
#define PySet_Size(anyset) \
    PyObject_Size((anyset))
#define PySet_Contains(anyset, key) \
    PySequence_Contains((anyset), (key))
#define PySet_Pop(set) \
    PyObject_CallMethod((set), (char*)"pop", NULL)
static CYTHON_INLINE int PySet_Clear(PyObject *set) {
    PyObject *ret = PyObject_CallMethod(set, (char*)"clear", NULL);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) {
    PyObject *ret = PyObject_CallMethod(set, (char*)"discard", (char*)"(O)", key);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) {
    PyObject *ret = PyObject_CallMethod(set, (char*)"add", (char*)"(O)", key);
    if (!ret) return -1;
    Py_DECREF(ret); return 0;
}
#endif /* PyAnySet_CheckExact (<= Py2.4) */
#endif /* < Py2.5  */

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/

static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyObject_AsDouble(obj) \
(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \
 likely(PyInt_CheckExact(obj)) ? \
 PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
#else
#define __Pyx_PyObject_AsDouble(obj) \
((likely(PyFloat_CheckExact(obj))) ? \
 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
#endif

static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact); /*proto*/

static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f) \
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f) \
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f) \
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
    PyObject *func_dict;
    PyObject *func_weakreflist;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj; /* No-args super() class cell */
    void *defaults;
    int defaults_pyobjects;
    int flags;
    PyObject *defaults_tuple;   /* Const defaults tuple */
    PyObject *defaults_kwdict;  /* Const kwonly defaults dict */
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations; /* function annotations dict */
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __Pyx_CyFunction_init(void);

static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_nc_type(nc_type value);

static CYTHON_INLINE nc_type __Pyx_PyInt_As_nc_type(PyObject *);

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value);

static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);

static CYTHON_INLINE ptrdiff_t __Pyx_PyInt_As_ptrdiff_t(PyObject *);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_intp(npy_intp value);

static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

static int __Pyx_check_binary_version(void);

#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif

static PyObject *__Pyx_ImportModule(const char *name); /*proto*/

static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/

typedef struct {
    int code_line;
    PyCodeObject* code_object;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/


/* Module declarations from 'numpy' */

/* Module declarations from 'netCDF4' */
static PyTypeObject *__pyx_ptype_7netCDF4_ndarray = 0;
static PyTypeObject *__pyx_ptype_7netCDF4_Dataset = 0;
static PyTypeObject *__pyx_ptype_7netCDF4_Group = 0;
static PyTypeObject *__pyx_ptype_7netCDF4_Dimension = 0;
static PyTypeObject *__pyx_ptype_7netCDF4_Variable = 0;
static PyTypeObject *__pyx_ptype_7netCDF4_CompoundType = 0;
static PyTypeObject *__pyx_ptype_7netCDF4_VLType = 0;
static PyObject *__pyx_f_7netCDF4__get_att_names(int, int); /*proto*/
static PyObject *__pyx_f_7netCDF4__get_att(PyObject *, int, PyObject *); /*proto*/
static PyObject *__pyx_f_7netCDF4__get_format(int); /*proto*/
static PyObject *__pyx_f_7netCDF4__get_full_format(int); /*proto*/
static PyObject *__pyx_f_7netCDF4__set_att(PyObject *, int, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_7netCDF4__get_types(PyObject *); /*proto*/
static PyObject *__pyx_f_7netCDF4__get_dims(PyObject *); /*proto*/
static PyObject *__pyx_f_7netCDF4__get_grps(PyObject *); /*proto*/
static PyObject *__pyx_f_7netCDF4__get_vars(PyObject *); /*proto*/
static PyObject *__pyx_f_7netCDF4__def_compound(PyObject *, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_7netCDF4__find_cmptype(PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_7netCDF4__read_compound(PyObject *, nc_type); /*proto*/
static PyObject *__pyx_f_7netCDF4__def_vlen(PyObject *, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_7netCDF4__read_vlen(PyObject *, nc_type); /*proto*/
static PyObject *__pyx_f_7netCDF4__strencode(PyObject *, struct __pyx_opt_args_7netCDF4__strencode *__pyx_optional_args); /*proto*/
#define __Pyx_MODULE_NAME "netCDF4"
int __pyx_module_is_main_netCDF4 = 0;

/* Implementation of 'netCDF4' */
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_sorted;
static PyObject *__pyx_builtin_IOError;
static PyObject *__pyx_builtin_sum;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_UnicodeDecodeError;
static PyObject *__pyx_pf_7netCDF4__dateparse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_timestr); /* proto */
static PyObject *__pyx_pf_7netCDF4_2stringtoarr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string, PyObject *__pyx_v_NUMCHARS, PyObject *__pyx_v_dtype); /* proto */
static PyObject *__pyx_pf_7netCDF4_4stringtochar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a); /* proto */
static PyObject *__pyx_pf_7netCDF4_6chartostring(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_7netCDF4_8date2num(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar); /* proto */
static PyObject *__pyx_pf_7netCDF4_10num2date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_times, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar); /* proto */
static PyObject *__pyx_pf_7netCDF4_12date2index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_nctime, PyObject *__pyx_v_calendar, PyObject *__pyx_v_select); /* proto */
static PyObject *__pyx_pf_7netCDF4_14getlibversion(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_9MFDataset_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_9MFDataset___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_files, PyObject *__pyx_v_check, PyObject *__pyx_v_aggdim, PyObject *__pyx_v_exclude); /* proto */
static PyObject *__pyx_pf_7netCDF4_9MFDataset_2__setattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7netCDF4_9MFDataset_4__getattribute__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_9MFDataset_8close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_9MFDataset_10__str__(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__str__(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__str__(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__str__(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_cache); /* proto */
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 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__str__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_9Dimension_4__unicode__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_7netCDF4_9Dimension_6__len__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_9Dimension_8group(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_9Dimension_10isunlimited(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_chunk_cache, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_2__array__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_4__str__(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_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_10group(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_12ncattrs(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_14setncattr(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_16setncatts(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_attdict); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_18getncattr(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_20delncattr(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_22filters(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_24endian(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_26chunking(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_28get_var_chunk_cache(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_30set_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_32__delattr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static int __pyx_pf_7netCDF4_8Variable_34__setattr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_36__getattr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_38renameAttribute(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_40__getitem__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_elem); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_42_toma(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_44_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_46__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_48__len__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_50assignValue(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_52getValue(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_54set_auto_maskandscale(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_maskandscale); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_56set_auto_scale(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_scale); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_58set_auto_mask(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_7netCDF4_8Variable_60_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_62_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__str__(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__str__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_6VLType_4__unicode__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_6VLType_8_nc_type___get__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
static int __pyx_pf_7netCDF4_6VLType_8_nc_type_2__set__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_7netCDF4_6VLType_5dtype___get__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
static int __pyx_pf_7netCDF4_6VLType_5dtype_2__set__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7netCDF4_6VLType_5dtype_4__del__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7netCDF4_6VLType_4name___get__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
static int __pyx_pf_7netCDF4_6VLType_4name_2__set__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_7netCDF4_6VLType_4name_4__del__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self); /* proto */
static PyObject *__pyx_tp_new_7netCDF4_Dataset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7netCDF4_Group(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7netCDF4_Dimension(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7netCDF4_Variable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7netCDF4_CompoundType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7netCDF4_VLType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static char __pyx_k_[] = "*";
static char __pyx_k_1[] = "1";
static char __pyx_k_O[] = "O";
static char __pyx_k_S[] = "S";
static char __pyx_k_U[] = "U";
static char __pyx_k_V[] = "V";
static char __pyx_k_a[] = "a";
static char __pyx_k_b[] = "b";
static char __pyx_k_f[] = "f";
static char __pyx_k_i[] = "i";
static char __pyx_k_k[] = "k";
static char __pyx_k_n[] = "n";
static char __pyx_k_r[] = "%r\n";
static char __pyx_k_s[] = "(%s)";
static char __pyx_k_t[] = "t";
static char __pyx_k_u[] = "u'";
static char __pyx_k_v[] = "v";
static char __pyx_k_w[] = "w";
static char __pyx_k_0m[] = "\033[0m";
static char __pyx_k_4m[] = " \033[4m";
static char __pyx_k_S1[] = "S1";
static char __pyx_k_U1[] = "U1";
static char __pyx_k_as[] = "as";
static char __pyx_k_bs[] = "bs";
static char __pyx_k_dt[] = "dt";
static char __pyx_k_f4[] = "f4";
static char __pyx_k_f8[] = "f8";
static char __pyx_k_i0[] = "i0";
static char __pyx_k_i1[] = "i1";
static char __pyx_k_i2[] = "i2";
static char __pyx_k_i4[] = "i4";
static char __pyx_k_i8[] = "i8";
static char __pyx_k_id[] = "id";
static char __pyx_k_ma[] = "ma";
static char __pyx_k_n1[] = "n1";
static char __pyx_k_nv[] = "nv";
static char __pyx_k_td[] = "td";
static char __pyx_k_u1[] = "u1";
static char __pyx_k_u2[] = "u2";
static char __pyx_k_u4[] = "u4";
static char __pyx_k_u8[] = "u8";
static char __pyx_k_ws[] = "ws";
static char __pyx_k__15[] = "/";
static char __pyx_k__16[] = "";
static char __pyx_k__25[] = "\000";
static char __pyx_k__36[] = "'";
static char __pyx_k__38[] = ", ";
static char __pyx_k__39[] = ",";
static char __pyx_k__41[] = ",)";
static char __pyx_k__42[] = ")";
static char __pyx_k__44[] = "__";
static char __pyx_k__49[] = "=";
static char __pyx_k__50[] = ">";
static char __pyx_k__51[] = "<";
static char __pyx_k__52[] = "|";
static char __pyx_k_all[] = "all";
static char __pyx_k_any[] = "any";
static char __pyx_k_arr[] = "arr";
static char __pyx_k_big[] = "big";
static char __pyx_k_cdf[] = "_cdf";
static char __pyx_k_cnt[] = "cnt";
static char __pyx_k_dat[] = "dat";
static char __pyx_k_day[] = "day";
static char __pyx_k_dim[] = "dim";
static char __pyx_k_doc[] = "__doc__";
static char __pyx_k_get[] = "_get";
static char __pyx_k_grp[] = "_grp";
static char __pyx_k_idx[] = "idx";
static char __pyx_k_ind[] = "ind";
static char __pyx_k_key[] = "_key";
static char __pyx_k_len[] = "__len__";
static char __pyx_k_lst[] = "lst";
static char __pyx_k_msg[] = "msg";
static char __pyx_k_num[] = "num";
static char __pyx_k_pop[] = "pop";
static char __pyx_k_put[] = "_put";
static char __pyx_k_r_2[] = "r";
static char __pyx_k_r_3[] = "r+";
static char __pyx_k_r_s[] = "r+s";
static char __pyx_k_s_2[] = "s";
static char __pyx_k_s_s[] = "    %s: %s\n";
static char __pyx_k_sta[] = "sta";
static char __pyx_k_str[] = "str";
static char __pyx_k_sum[] = "sum";
static char __pyx_k_sys[] = "sys";
static char __pyx_k_val[] = "val";
static char __pyx_k_var[] = "var";
static char __pyx_k_vid[] = "vid";
static char __pyx_k_zip[] = "zip";
static char __pyx_k__110[] = ".";
static char __pyx_k_bool[] = "bool";
static char __pyx_k_cdfm[] = "cdfm";
static char __pyx_k_char[] = "char";
static char __pyx_k_copy[] = "copy";
static char __pyx_k_data[] = "data";
static char __pyx_k_date[] = "date";
static char __pyx_k_days[] = "days";
static char __pyx_k_dict[] = "__dict__";
static char __pyx_k_dims[] = "_dims";
static char __pyx_k_dset[] = "dset";
static char __pyx_k_elem[] = "elem";
static char __pyx_k_f4_2[] = "<f4";
static char __pyx_k_f4_3[] = ">f4";
static char __pyx_k_find[] = "find";
static char __pyx_k_glob[] = "glob";
static char __pyx_k_grps[] = "_grps";
static char __pyx_k_hour[] = "hour";
static char __pyx_k_http[] = "http";
static char __pyx_k_in1d[] = "in1d";
static char __pyx_k_init[] = "__init__";
static char __pyx_k_isMA[] = "isMA";
static char __pyx_k_item[] = "item";
static char __pyx_k_izip[] = "izip";
static char __pyx_k_join[] = "join";
static char __pyx_k_keys[] = "keys";
static char __pyx_k_kind[] = "kind";
static char __pyx_k_main[] = "__main__";
static char __pyx_k_mask[] = "mask";
static char __pyx_k_mode[] = "mode";
static char __pyx_k_name[] = "name";
static char __pyx_k_ndim[] = "ndim";
static char __pyx_k_numv[] = "numv";
static char __pyx_k_part[] = "part";
static char __pyx_k_path[] = "path";
static char __pyx_k_prod[] = "prod";
static char __pyx_k_secs[] = "secs";
static char __pyx_k_self[] = "self";
static char __pyx_k_size[] = "size";
static char __pyx_k_slen[] = "slen";
static char __pyx_k_step[] = "step";
static char __pyx_k_stop[] = "stop";
static char __pyx_k_strd[] = "strd";
static char __pyx_k_strt[] = "strt";
static char __pyx_k_test[] = "__test__";
static char __pyx_k_tile[] = "tile";
static char __pyx_k_time[] = "time";
static char __pyx_k_toma[] = "_toma";
static char __pyx_k_unit[] = "unit";
static char __pyx_k_vars[] = "_vars";
static char __pyx_k_view[] = "view";
static char __pyx_k_vlen[] = "vlen";
static char __pyx_k_warn[] = "warn";
static char __pyx_k_zlib[] = "zlib";
static char __pyx_k_1_1_1[] = "1.1.1";
static char __pyx_k_4_2_1[] = "4.2.1";
static char __pyx_k_align[] = "align";
static char __pyx_k_array[] = "array";
static char __pyx_k_attrs[] = "attrs";
static char __pyx_k_atype[] = "atype";
static char __pyx_k_cdf_2[] = "cdf";
static char __pyx_k_check[] = "check";
static char __pyx_k_close[] = "close";
static char __pyx_k_count[] = "count";
static char __pyx_k_d_d_d[] = "%d.%d.%d";
static char __pyx_k_dates[] = "dates";
static char __pyx_k_dimid[] = "_dimid";
static char __pyx_k_dtype[] = "dtype";
static char __pyx_k_empty[] = "empty";
static char __pyx_k_exact[] = "exact";
static char __pyx_k_files[] = "files";
static char __pyx_k_float[] = "float";
static char __pyx_k_grp_2[] = "grp";
static char __pyx_k_grpid[] = "_grpid";
static char __pyx_k_hours[] = "hours";
static char __pyx_k_isnan[] = "isnan";
static char __pyx_k_items[] = "items";
static char __pyx_k_lower[] = "lower";
static char __pyx_k_msecs[] = "msecs";
static char __pyx_k_names[] = "names";
static char __pyx_k_numpy[] = "numpy";
static char __pyx_k_parse[] = "parse";
static char __pyx_k_proxy[] = "proxy";
static char __pyx_k_range[] = "range";
static char __pyx_k_ravel[] = "ravel";
static char __pyx_k_redef[] = "_redef";
static char __pyx_k_s_s_s[] = "%s %s%s\n";
static char __pyx_k_scale[] = "scale";
static char __pyx_k_shape[] = "shape";
static char __pyx_k_since[] = "since";
static char __pyx_k_split[] = "split";
static char __pyx_k_start[] = "start";
static char __pyx_k_str_2[] = "__str__";
static char __pyx_k_times[] = "times";
static char __pyx_k_tostr[] = "_tostr";
static char __pyx_k_tsecs[] = "tsecs";
static char __pyx_k_tzutc[] = "tzutc";
static char __pyx_k_units[] = "units";
static char __pyx_k_utf_8[] = "utf-8";
static char __pyx_k_utime[] = "utime";
static char __pyx_k_vInst[] = "vInst";
static char __pyx_k_vName[] = "vName";
static char __pyx_k_value[] = "value";
static char __pyx_k_varid[] = "_varid";
static char __pyx_k_zeros[] = "zeros";
static char __pyx_k_MFTime[] = "MFTime";
static char __pyx_k_aggdim[] = "aggdim";
static char __pyx_k_append[] = "append";
static char __pyx_k_around[] = "around";
static char __pyx_k_astype[] = "astype";
static char __pyx_k_decode[] = "decode";
static char __pyx_k_dims_2[] = "dims";
static char __pyx_k_dparse[] = "dparse";
static char __pyx_k_dset_2[] = "_dset";
static char __pyx_k_encode[] = "encode";
static char __pyx_k_enddef[] = "_enddef";
static char __pyx_k_endian[] = "endian";
static char __pyx_k_fields[] = "fields";
static char __pyx_k_filled[] = "filled";
static char __pyx_k_format[] = "format";
static char __pyx_k_groups[] = "groups";
static char __pyx_k_import[] = "__import__";
static char __pyx_k_isvlen[] = "_isvlen";
static char __pyx_k_little[] = "little";
static char __pyx_k_lstArr[] = "lstArr";
static char __pyx_k_master[] = "master";
static char __pyx_k_module[] = "__module__";
static char __pyx_k_msecsd[] = "msecsd";
static char __pyx_k_name_2[] = "_name";
static char __pyx_k_native[] = "native";
static char __pyx_k_ncdump[] = "ncdump";
static char __pyx_k_nctime[] = "nctime";
static char __pyx_k_nelems[] = "nelems";
static char __pyx_k_object[] = "object";
static char __pyx_k_parent[] = "parent";
static char __pyx_k_path_s[] = "path = %s\n";
static char __pyx_k_recLen[] = "_recLen";
static char __pyx_k_recVar[] = "_recVar";
static char __pyx_k_second[] = "second";
static char __pyx_k_select[] = "select";
static char __pyx_k_sorted[] = "sorted";
static char __pyx_k_stride[] = "stride";
static char __pyx_k_string[] = "string";
static char __pyx_k_tolist[] = "tolist";
static char __pyx_k_typeid[] = "typeid";
static char __pyx_k_tzinfo[] = "tzinfo";
static char __pyx_k_values[] = "values";
static char __pyx_k_vltype[] = "_vltype";
static char __pyx_k_IOError[] = "IOError";
static char __pyx_k_NETCDF3[] = "NETCDF3";
static char __pyx_k_NETCDF4[] = "NETCDF4";
static char __pyx_k_asarray[] = "asarray";
static char __pyx_k_cdfTLen[] = "_cdfTLen";
static char __pyx_k_cdfVLen[] = "_cdfVLen";
static char __pyx_k_cdftime[] = "cdftime";
static char __pyx_k_clobber[] = "clobber";
static char __pyx_k_cmptype[] = "_cmptype";
static char __pyx_k_d_d_d_s[] = "%d.%d.%d-%s";
static char __pyx_k_dimlens[] = "dimlens";
static char __pyx_k_dimname[] = "dimname";
static char __pyx_k_exclude[] = "exclude";
static char __pyx_k_extDims[] = "extDims";
static char __pyx_k_extType[] = "extType";
static char __pyx_k_files_2[] = "_files";
static char __pyx_k_flatten[] = "flatten";
static char __pyx_k_formats[] = "formats";
static char __pyx_k_getattr[] = "__getattr__";
static char __pyx_k_getdims[] = "_getdims";
static char __pyx_k_getitem[] = "__getitem__";
static char __pyx_k_group_s[] = "group %s:\n";
static char __pyx_k_nc_type[] = "_nc_type";
static char __pyx_k_ncattrs[] = "ncattrs";
static char __pyx_k_netCDF4[] = "netCDF4";
static char __pyx_k_newname[] = "newname";
static char __pyx_k_offsets[] = "offsets";
static char __pyx_k_oldname[] = "oldname";
static char __pyx_k_persist[] = "persist";
static char __pyx_k_prepare[] = "__prepare__";
static char __pyx_k_put_ind[] = "put_ind";
static char __pyx_k_python3[] = "python3";
static char __pyx_k_ref_num[] = "ref_num";
static char __pyx_k_replace[] = "replace";
static char __pyx_k_reshape[] = "reshape";
static char __pyx_k_s_s_s_2[] = "%s %s(%s)\n";
static char __pyx_k_seconds[] = "seconds";
static char __pyx_k_setattr[] = "__setattr__";
static char __pyx_k_shape_2[] = "_shape";
static char __pyx_k_shuffle[] = "shuffle";
static char __pyx_k_squeeze[] = "squeeze";
static char __pyx_k_timestr[] = "timestr";
static char __pyx_k_unicode[] = "__unicode__";
static char __pyx_k_value_2[] = "_value";
static char __pyx_k_varInfo[] = "varInfo";
static char __pyx_k_varname[] = "varname";
static char __pyx_k_version[] = "__version__";
static char __pyx_k_vltypes[] = "vltypes";
static char __pyx_k_weakref[] = "weakref";
static char __pyx_k_KeyError[] = "KeyError";
static char __pyx_k_NUMCHARS[] = "NUMCHARS";
static char __pyx_k_Variable[] = "_Variable";
static char __pyx_k_aggDimId[] = "aggDimId";
static char __pyx_k_basedate[] = "basedate";
static char __pyx_k_byteswap[] = "byteswap";
static char __pyx_k_calendar[] = "calendar";
static char __pyx_k_cmptypes[] = "cmptypes";
static char __pyx_k_compound[] = "compound";
static char __pyx_k_datatype[] = "datatype";
static char __pyx_k_date2num[] = "date2num";
static char __pyx_k_datetime[] = "datetime";
static char __pyx_k_dimnames[] = "dimnames";
static char __pyx_k_diskless[] = "diskless";
static char __pyx_k_endswith[] = "endswith";
static char __pyx_k_extShape[] = "extShape";
static char __pyx_k_filename[] = "filename";
static char __pyx_k_find_dim[] = "_find_dim";
static char __pyx_k_groups_s[] = "    groups = %s\n";
static char __pyx_k_grpnames[] = "grpnames";
static char __pyx_k_ismasked[] = "ismasked";
static char __pyx_k_isscalar[] = "isscalar";
static char __pyx_k_itemsize[] = "itemsize";
static char __pyx_k_newSlice[] = "newSlice";
static char __pyx_k_num2date[] = "num2date";
static char __pyx_k_qualname[] = "__qualname__";
static char __pyx_k_quantize[] = "_quantize";
static char __pyx_k_ref_date[] = "ref_date";
static char __pyx_k_standard[] = "standard";
static char __pyx_k_subdtype[] = "subdtype";
static char __pyx_k_tostring[] = "tostring";
static char __pyx_k_typecode[] = "typecode";
static char __pyx_k_varnames[] = "varnames";
static char __pyx_k_warnings[] = "warnings";
static char __pyx_k_Dimension[] = "_Dimension";
static char __pyx_k_FillValue[] = "_FillValue";
static char __pyx_k_MFDataset[] = "MFDataset";
static char __pyx_k_TypeError[] = "TypeError";
static char __pyx_k_UNDEFINED[] = "UNDEFINED";
static char __pyx_k_byteorder[] = "byteorder";
static char __pyx_k_cdfRecVar[] = "_cdfRecVar";
static char __pyx_k_cdfVLen_2[] = "cdfVLen";
static char __pyx_k_complevel[] = "complevel";
static char __pyx_k_datashape[] = "datashape";
static char __pyx_k_dateparse[] = "_dateparse";
static char __pyx_k_delncattr[] = "delncattr";
static char __pyx_k_dimtotlen[] = "dimtotlen";
static char __pyx_k_enumerate[] = "enumerate";
static char __pyx_k_getncattr[] = "getncattr";
static char __pyx_k_gregorian[] = "gregorian";
static char __pyx_k_isostring[] = "isostring";
static char __pyx_k_itertools[] = "itertools";
static char __pyx_k_majorvers[] = "majorvers";
static char __pyx_k_mastervar[] = "_mastervar";
static char __pyx_k_metaclass[] = "__metaclass__";
static char __pyx_k_minorvers[] = "minorvers";
static char __pyx_k_npversion[] = "_npversion";
static char __pyx_k_nunlimdim[] = "_nunlimdim";
static char __pyx_k_posixpath[] = "posixpath";
static char __pyx_k_recdimlen[] = "recdimlen";
static char __pyx_k_setncattr[] = "setncattr";
static char __pyx_k_timedelta[] = "timedelta";
static char __pyx_k_totaltime[] = "totaltime";
static char __pyx_k_traceback[] = "traceback";
static char __pyx_k_unlimdims[] = "unlimdims";
static char __pyx_k_variables[] = "variables";
static char __pyx_k_walk_grps[] = "_walk_grps";
static char __pyx_k_IndexError[] = "IndexError";
static char __pyx_k_ValueError[] = "ValueError";
static char __pyx_k_add_offset[] = "add_offset";
static char __pyx_k_aggDimName[] = "aggDimName";
static char __pyx_k_chunksizes[] = "chunksizes";
static char __pyx_k_contiguous[] = "contiguous";
static char __pyx_k_data_model[] = "data_model";
static char __pyx_k_date2index[] = "date2index";
static char __pyx_k_dimensions[] = "dimensions";
static char __pyx_k_dtype_name[] = "dtype_name";
static char __pyx_k_fill_value[] = "fill_value";
static char __pyx_k_filling_on[] = "filling on";
static char __pyx_k_fletcher32[] = "fletcher32";
static char __pyx_k_groups_s_2[] = "    groups: %s\n";
static char __pyx_k_iscompound[] = "_iscompound";
static char __pyx_k_masterDims[] = "masterDims";
static char __pyx_k_masterType[] = "masterType";
static char __pyx_k_ncdump_var[] = "ncdump_var";
static char __pyx_k_nctonptype[] = "_nctonptype";
static char __pyx_k_netcdftime[] = "netcdftime";
static char __pyx_k_nptonctype[] = "_nptonctype";
static char __pyx_k_preemption[] = "preemption";
static char __pyx_k_recdimname[] = "recdimname";
static char __pyx_k_sortbylist[] = "_sortbylist";
static char __pyx_k_startswith[] = "startswith";
static char __pyx_k_time2index[] = "time2index";
static char __pyx_k_ImportError[] = "ImportError";
static char __pyx_k_NC_DISKLESS[] = "NC_DISKLESS";
static char __pyx_k_OrderedDict[] = "OrderedDict";
static char __pyx_k_assign_vlen[] = "_assign_vlen";
static char __pyx_k_cdfRecVar_2[] = "cdfRecVar";
static char __pyx_k_chunk_cache[] = "chunk_cache";
static char __pyx_k_collections[] = "collections";
static char __pyx_k_concatenate[] = "concatenate";
static char __pyx_k_dateutil_tz[] = "dateutil.tz";
static char __pyx_k_disk_format[] = "disk_format";
static char __pyx_k_file_format[] = "_file_format";
static char __pyx_k_filling_off[] = "filling off\n";
static char __pyx_k_isprimitive[] = "_isprimitive";
static char __pyx_k_isunlimited[] = "isunlimited";
static char __pyx_k_keepweakref[] = "keepweakref";
static char __pyx_k_masterShape[] = "masterShape";
static char __pyx_k_microsecond[] = "microsecond";
static char __pyx_k_millisecond[] = "millisecond";
static char __pyx_k_ordereddict[] = "ordereddict";
static char __pyx_k_patchstring[] = "patchstring";
static char __pyx_k_releasevers[] = "releasevers";
static char __pyx_k_string_type[] = ": string type";
static char __pyx_k_stringtoarr[] = "stringtoarr";
static char __pyx_k_variables_s[] = "    variables = %s\n";
static char __pyx_k_MFTime__time[] = "_MFTime__time";
static char __pyx_k_RuntimeError[] = "RuntimeError";
static char __pyx_k_chartostring[] = "chartostring";
static char __pyx_k_dimensions_s[] = "    dimensions = %s\n";
static char __pyx_k_getattribute[] = "__getattribute__";
static char __pyx_k_masked_array[] = "masked_array";
static char __pyx_k_masterRecVar[] = "masterRecVar";
static char __pyx_k_microseconds[] = "microseconds";
static char __pyx_k_milliseconds[] = "milliseconds";
static char __pyx_k_private_atts[] = "_private_atts";
static char __pyx_k_recdimname_2[] = "_recdimname";
static char __pyx_k_scale_factor[] = "scale_factor";
static char __pyx_k_stringtochar[] = "stringtochar";
static char __pyx_k_version_info[] = "version_info";
static char __pyx_k_Illegal_index[] = "Illegal index";
static char __pyx_k_MFTime___init[] = "MFTime.__init__";
static char __pyx_k_MFTime__delta[] = "_MFTime__delta";
static char __pyx_k_NETCDF3_64BIT[] = "NETCDF3_64BIT";
static char __pyx_k_datatype_name[] = "datatype_name";
static char __pyx_k_file_format_2[] = "file_format";
static char __pyx_k_getlibversion[] = "getlibversion";
static char __pyx_k_is_native_big[] = "is_native_big";
static char __pyx_k_missing_value[] = "missing_value";
static char __pyx_k_name_s_size_s[] = ": name = '%s', size = %s\n";
static char __pyx_k_netCDF4_utils[] = "netCDF4_utils";
static char __pyx_k_set_auto_mask[] = "set_auto_mask";
static char __pyx_k_timestr_split[] = "timestr_split";
static char __pyx_k_unicode_error[] = "unicode_error";
static char __pyx_k_AttributeError[] = "AttributeError";
static char __pyx_k_Variable___len[] = "_Variable.__len__";
static char __pyx_k_Variable___str[] = "_Variable.__str__";
static char __pyx_k_current_size_s[] = "current size = %s\n";
static char __pyx_k_has_rename_grp[] = "__has_rename_grp__";
static char __pyx_k_hdf5libversion[] = "__hdf5libversion__";
static char __pyx_k_set_auto_scale[] = "set_auto_scale";
static char __pyx_k_supportedtypes[] = "_supportedtypes";
static char __pyx_k_Dimension___len[] = "_Dimension.__len__";
static char __pyx_k_Dimension___str[] = "_Dimension.__str__";
static char __pyx_k_MFDataset___str[] = "MFDataset.__str__";
static char __pyx_k_MFDataset_close[] = "MFDataset.close";
static char __pyx_k_NETCDF3_CLASSIC[] = "NETCDF3_CLASSIC";
static char __pyx_k_NETCDF4_CLASSIC[] = "NETCDF4_CLASSIC";
static char __pyx_k_Variable___init[] = "_Variable.__init__";
static char __pyx_k_Variable__shape[] = "_Variable._shape";
static char __pyx_k_current_shape_s[] = "current shape = %s\n";
static char __pyx_k_dateutil_parser[] = "dateutil.parser";
static char __pyx_k_has_nc_inq_path[] = "__has_nc_inq_path__";
static char __pyx_k_out_array_shape[] = "_out_array_shape";
static char __pyx_k_Dimension___init[] = "_Dimension.__init__";
static char __pyx_k_MFDataset___init[] = "MFDataset.__init__";
static char __pyx_k_MFTime___getitem[] = "MFTime.__getitem__";
static char __pyx_k_StartCountStride[] = "_StartCountStride";
static char __pyx_k_Variable_ncattrs[] = "_Variable.ncattrs";
static char __pyx_k_default_encoding[] = "default_encoding";
static char __pyx_k_default_fillvals[] = "default_fillvals";
static char __pyx_k_is_native_little[] = "is_native_little";
static char __pyx_k_vlen_data_type_s[] = "vlen data type: %s\n";
static char __pyx_k_MFDataset_ncattrs[] = "MFDataset.ncattrs";
static char __pyx_k_Variable_typecode[] = "_Variable.typecode";
static char __pyx_k_gethdf5libversion[] = "_gethdf5libversion";
static char __pyx_k_netcdf4libversion[] = "__netcdf4libversion__";
static char __pyx_k_UnicodeDecodeError[] = "UnicodeDecodeError";
static char __pyx_k_Variable___getattr[] = "_Variable.__getattr__";
static char __pyx_k_Variable___getitem[] = "_Variable.__getitem__";
static char __pyx_k_dimensions_sizes_s[] = "    dimensions(sizes): %s\n";
static char __pyx_k_set_default_format[] = "_set_default_format";
static char __pyx_k_MFDataset___setattr[] = "MFDataset.__setattr__";
static char __pyx_k_get_var_chunk_cache[] = "get_var_chunk_cache";
static char __pyx_k_proleptic_gregorian[] = "proleptic_gregorian";
static char __pyx_k_compound_data_type_s[] = "compound data type: %s\n";
static char __pyx_k_name_s_numpy_dtype_s[] = ": name = '%s', numpy dtype = %s\n";
static char __pyx_k_Dimension_isunlimited[] = "_Dimension.isunlimited";
static char __pyx_k_set_auto_maskandscale[] = "set_auto_maskandscale";
static char __pyx_k_unlimited_dimensions_s[] = "unlimited dimensions = %s\n";
static char __pyx_k_variables_dimensions_s[] = "    variables(dimensions): %s\n";
static char __pyx_k_least_significant_digit[] = "least_significant_digit";
static char __pyx_k_no_since_in_unit_string[] = "no 'since' in unit_string";
static char __pyx_k_shape_cannot_be_altered[] = "shape cannot be altered";
static char __pyx_k_unlimited_name_s_size_s[] = " (unlimited): name = '%s', size = %s\n";
static char __pyx_k_MFDataset___getattribute[] = "MFDataset.__getattribute__";
static char __pyx_k_root_group_s_file_format[] = "root group (%s file format):\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";
static char __pyx_k_s_not_a_valid_dimension_name[] = "%s not a valid dimension name";
static char __pyx_k_mode_must_be_w_r_a_or_r_got_s[] = "mode must be 'w', 'r', 'a' or 'r+', got '%s'";
static char __pyx_k_Variable_set_auto_maskandscale[] = "_Variable.set_auto_maskandscale";
static char __pyx_k_filepath_method_not_enabled_To[] = "\nfilepath method not enabled.  To enable, install Cython, make sure you have \nversion 4.1.2 or higher of the netcdf C lib, and rebuild netcdf4-python.";
static char __pyx_k_renameGroup_method_not_enabled[] = "\nrenameGroup method not enabled.  To enable, install Cython, make sure you have \nversion 4.3.1 or higher of the netcdf C lib, and rebuild netcdf4-python.";
static char __pyx_k_FillValue_attribute_must_be_set[] = "_FillValue attribute must be set when variable is ";
static char __pyx_k_Introduction_Python_interface_t[] = "\nIntroduction\n============\n\nPython interface to the netCDF version 4 library.  U{netCDF version 4 \n<http://www.unidata.ucar.edu/software/netcdf/netcdf-4>} has many features \nnot found in earlier versions of the library and is implemented on top of \nU{HDF5 <http://www.hdfgroup.org/HDF5>}. This module can read and write \nfiles in both the new netCDF 4 and the old netCDF 3 format, and can create \nfiles that are readable by HDF5 clients. The API modelled after \nU{Scientific.IO.NetCDF \n<http://dirac.cnrs-orleans.fr/plone/software/scientificpython/>}, and should be \nfamiliar to users of that module.\n\nMost new features of netCDF 4 are implemented, such as multiple\nunlimited dimensions, groups and zlib data compression.  All the new\nnumeric data types (such as 64 bit and unsigned integer types) are\nimplemented. Compound and variable length (vlen) data types are supported, \nbut the enum and opaque data types are not. Mixtures of compound and vlen\ndata types (compound types containing vlens, and vlens containing compound \ntypes) are not supported.\n\nDownload \n========\n\n - Latest bleeding-edge code from the U{github repository\n   <http://github.com/Unidata/netcdf4-python>}.\n - Latest U{releases <https://pypi.python.org/pypi/netCDF4>}\n   (source code and windows installers).\n\nRequires \n======== \n\n - Python 2.5 or later (python 3 works too).\n - numpy array module U{http://numpy.scipy.org}, version 1.3.0 or later (1.5.1\n   or higher recommended, required if using python 3).\n - U{Cython <http://cython.org>} is optional - if it is installed setup.py will \n   use it to recompile the Cython source code into C, using conditional compilation\n   to enable features in the netCDF API that have been added since version 4.1.1.  If\n   Cython is not installed, these features (such as the ability to rename Group objects)\n   will be disabled to preserve backward compatibility with older versions of the netCDF\n   library.\n - For python < 2.7, the orderedd""ict module U{http://python.org/pypi/ordereddict}.\n - The HDF5 C library version 1.8.4-patch1 or higher (1.8.8 or higher\n recommended) from U{ftp://ftp.hdfgroup.org/HDF5/current/src}.\n Be sure to build with 'C{--enable-hl --enable-shared}'.\n - U{Libcurl <http://curl.haxx.se/libcurl/>}, if you want\n U{OPeNDAP<http://opendap.org/>} support.\n - U{HDF4 <http://www.hdfgroup.org/products/hdf4/>}, if you want\n to be able to read HDF4 \"Scientific Dataset\" (SD) files.\n - The netCDF-4 C library from U{ftp://ftp.unidata.ucar.edu/pub/netcdf}.\n Version 4.1.1 or higher is required (4.2 or higher recommended).\n Be sure to build with 'C{--enable-netcdf-4 --enable-shared}', and set\n C{CPPFLAGS=\"-I $HDF5_DIR/include\"} and C{LDFLAGS=\"-L $HDF5_DIR/lib\"},\n where C{$HDF5_DIR} is the directory where HDF5 was installed.\n If you want U{OPeNDAP<http://opendap.org/>} support, add 'C{--enable-dap}'.\n If you want HDF4 SD support, add 'C{--enable-hdf4}' and add\n the location of the HDF4 headers and library to C{CPPFLAGS} and C{LDFLAGS}.\n\n\nInstall\n=======\n\n - install the requisite python modules and C libraries (see above). It's\n easiest if all the C libs are built as shared libraries.\n - optionally, set the C{HDF5_DIR} environment variable to point to where HDF5\n is installed (the libs in C{$HDF5_DIR/lib}, the headers in\n C{$HDF5_DIR/include}). If the headers and libs are installed in different\n places, you can use C{HDF5_INCDIR} and C{HDF5_LIBDIR} to define the locations\n of the headers and libraries independently.\n - optionally, set the C{NETCDF4_DIR} (or C{NETCDF4_INCDIR} and C{NETCDF4_LIBDIR})\n environment variable(s) to point to\n where the netCDF version 4 library and headers are installed.\n - If the locations of the HDF5 and netCDF libs and headers are not specified\n with environment variables, some standard locations will be searched.\n - if HDF5 was built as a static library  with U{szip\n <http://www.hdfgroup.org/doc_resource/SZIP/>} support,\n you m""ay also need to set the C{SZIP_DIR} (or C{SZIP_INCDIR} and C{SZIP_LIBDIR})\n environment variable(s) to point to where szip is installed. Note that\n the netCDF library does not support creating szip compressed files, but can read szip\n compressed files if the HDF5 lib is configured to support szip.\n - if netCDF lib was built as a static library with HDF4 and/or OpenDAP\n support, you may also need to set C{HDF4_DIR}, C{JPEG_DIR} and/or\n C{CURL_DIR}.\n - Instead of using environment variables to specify the locations of the\n required libraries, you can either let setup.py try to auto-detect their\n locations, or use the file C{setup.cfg} to specify them.  To use this \n method, copy the file C{setup.cfg.template} to C{setup.cfg},\n then open C{setup.cfg} in a text editor and follow the instructions in the  \n comments for editing.  If you use C{setup.cfg}, environment variables will be\n ignored.\n - If you are using netcdf 4.1.2 or higher, instead of setting all those\n enviroment variables defining where libs are installed, you can just set one \n environment variable, USE_NCCONFIG, to 1.  This will tell python to run the\n netcdf nc-config utility to determine where all the dependencies live.\n - run C{python setup.py build}, then C{python setup.py install} (as root if\n necessary).\n - If using environment variables to specify build options, be sure to run\n 'python setup.py build' *without* using sudo.  sudo does not pass environment\n variables. If you run 'setup.py build' first without sudo, you can run\n 'setup.py install' with sudo.  \n - run the tests in the 'test' directory by running C{python run_all.py}.\n\nTutorial\n========\n\n1) Creating/Opening/Closing a netCDF file\n-----------------------------------------\n\nTo create a netCDF file from python, you simply call the L{Dataset}\nconstructor. This is also the method used to open an existing netCDF\nfile.  If the file is open for write access (C{w, r+} or C{a}), you may\nwrite any type of data inc""luding new dimensions, groups, variables and\nattributes.  netCDF files come in several flavors (C{NETCDF3_CLASSIC,\nNETCDF3_64BIT, NETCDF4_CLASSIC}, and C{NETCDF4}). The first two flavors\nare supported by version 3 of the netCDF library. C{NETCDF4_CLASSIC}\nfiles use the version 4 disk format (HDF5), but do not use any features\nnot found in the version 3 API. They can be read by netCDF 3 clients\nonly if they have been relinked against the netCDF 4 library. They can\nalso be read by HDF5 clients. C{NETCDF4} files use the version 4 disk\nformat (HDF5) and use the new features of the version 4 API.  The\nC{netCDF4} module can read and write files in any of these formats. When\ncreating a new file, the format may be specified using the C{format}\nkeyword in the C{Dataset} constructor.  The default format is\nC{NETCDF4}. To see how a given file is formatted, you can examine the\nC{data_model} L{Dataset} attribute.  Closing the netCDF file is\naccomplished via the L{close<Dataset.close>} method of the L{Dataset}\ninstance.\n\nHere's an example:\n\n>>> from netCDF4 import Dataset\n>>> rootgrp = Dataset('test.nc', 'w', format='NETCDF4')\n>>> print rootgrp.data_model\nNETCDF4\n>>>\n>>> rootgrp.close()\n\nRemote U{OPeNDAP<http://opendap.org>}-hosted datasets can be accessed for\nreading over http if a URL is provided to the L{Dataset} constructor instead of a \nfilename.  However, this requires that the netCDF library be built with\nOPenDAP support, via the C{--enable-dap} configure option (added in\nversion 4.0.1).\n            \n\n2) Groups in a netCDF file\n--------------------------\n\nnetCDF version 4 added support for organizing data in hierarchical\ngroups, which are analagous to directories in a filesystem. Groups serve\nas containers for variables, dimensions and attributes, as well as other\ngroups.  A C{netCDF4.Dataset} defines creates a special group, called\nthe 'root group', which is similar to the root directory in a unix\nfilesystem.  To create L{Group} in""stances, use the\nL{createGroup<Dataset.createGroup>} method of a L{Dataset} or L{Group}\ninstance. L{createGroup<Dataset.createGroup>} takes a single argument, a\npython string containing the name of the new group. The new L{Group}\ninstances contained within the root group can be accessed by name using\nthe C{groups} dictionary attribute of the L{Dataset} instance.  Only\nC{NETCDF4} formatted files support Groups, if you try to create a Group\nin a netCDF 3 file you will get an error message.\n\n>>> rootgrp = Dataset('test.nc', 'a')\n>>> fcstgrp = rootgrp.createGroup('forecasts')\n>>> analgrp = rootgrp.createGroup('analyses')\n>>> print rootgrp.groups\nOrderedDict([('forecasts', <netCDF4.Group object at 0x1b4b7b0>),\n             ('analyses', <netCDF4.Group object at 0x1b4b970>)])\n>>>\n\nGroups can exist within groups in a L{Dataset}, just as directories\nexist within directories in a unix filesystem. Each L{Group} instance\nhas a C{'groups'} attribute dictionary containing all of the group\ninstances contained within that group. Each L{Group} instance also has a\nC{'path'} attribute that contains a simulated unix directory path to\nthat group. \n\nHere's an example that shows how to navigate all the groups in a\nL{Dataset}. The function C{walktree} is a Python generator that is used\nto walk the directory tree. Note that printing the L{Dataset} or L{Group}\nobject yields summary information about it's contents.\n\n>>> fcstgrp1 = fcstgrp.createGroup('model1')\n>>> fcstgrp2 = fcstgrp.createGroup('model2')\n>>> def walktree(top):\n>>>     values = top.groups.values()\n>>>     yield values\n>>>     for value in top.groups.values():\n>>>         for children in walktree(value):\n>>>             yield children\n>>> print rootgrp\n>>> for children in walktree(rootgrp):\n>>>      for child in children:\n>>>          print child\n<type 'netCDF4.Dataset'>\nroot group (NETCDF4 file format):\n    dimensions: \n    variables: \n        groups: forecasts, analyses\n<type 'net""CDF4.Group'>\ngroup /forecasts:\n    dimensions:\n    variables:\n    groups: model1, model2\n<type 'netCDF4.Group'>\ngroup /analyses:\n    dimensions:\n    variables:\n    groups:\n<type 'netCDF4.Group'>\ngroup /forecasts/model1:\n    dimensions:\n    variables:\n    groups:\n<type 'netCDF4.Group'>\ngroup /forecasts/model2:\n    dimensions:\n    variables:\n    groups:\n>>>\n\n3) Dimensions in a netCDF file\n------------------------------\n\nnetCDF defines the sizes of all variables in terms of dimensions, so\nbefore any variables can be created the dimensions they use must be\ncreated first. A special case, not often used in practice, is that of a\nscalar variable, which has no dimensions. A dimension is created using\nthe L{createDimension<Dataset.createDimension>} method of a L{Dataset}\nor L{Group} instance. A Python string is used to set the name of the\ndimension, and an integer value is used to set the size. To create an\nunlimited dimension (a dimension that can be appended to), the size\nvalue is set to C{None} or 0. In this example, there both the C{time} and\nC{level} dimensions are unlimited.  Having more than one unlimited\ndimension is a new netCDF 4 feature, in netCDF 3 files there may be only\none, and it must be the first (leftmost) dimension of the variable.\n\n>>> level = rootgrp.createDimension('level', None)\n>>> time = rootgrp.createDimension('time', None)\n>>> lat = rootgrp.createDimension('lat', 73)\n>>> lon = rootgrp.createDimension('lon', 144)\n            \n\nAll of the L{Dimension} instances are stored in a python dictionary.\n\n>>> print rootgrp.dimensions\nOrderedDict([('level', <netCDF4.Dimension object at 0x1b48030>),\n             ('time', <netCDF4.Dimension object at 0x1b481c0>),\n             ('lat', <netCDF4.Dimension object at 0x1b480f8>),\n             ('lon', <netCDF4.Dimension object at 0x1b48a08>)])\n>>>\n\nCalling the python C{len} function with a L{Dimension} instance returns\nthe current size of that dimension.\nThe L{isu""nlimited<Dimension.isunlimited>} method of a L{Dimension} instance\ncan be used to determine if the dimensions is unlimited, or appendable.\n\n>>> print len(lon)\n144\n>>> print len.is_unlimited()\nFalse\n>>> print time.is_unlimited()\nTrue\n>>>\n\nPrinting the L{Dimension} object\nprovides useful summary info, including the name and length of the dimension,\nand whether it is unlimited.\n\n>>> for dimobj in rootgrp.dimensions.values():\n>>>    print dimobj\n<type 'netCDF4.Dimension'> (unlimited): name = 'level', size = 0\n<type 'netCDF4.Dimension'> (unlimited): name = 'time', size = 0\n<type 'netCDF4.Dimension'>: name = 'lat', size = 73\n<type 'netCDF4.Dimension'>: name = 'lon', size = 144\n<type 'netCDF4.Dimension'> (unlimited): name = 'time', size = 0\n>>>\n\nL{Dimension} names can be changed using the\nL{renameDimension<Dataset.renameDimension>} method of a L{Dataset} or\nL{Group} instance.\n            \n4) Variables in a netCDF file\n-----------------------------\n\nnetCDF variables behave much like python multidimensional array objects\nsupplied by the U{numpy module <http://numpy.scipy.org>}. However,\nunlike numpy arrays, netCDF4 variables can be appended to along one or\nmore 'unlimited' dimensions. To create a netCDF variable, use the\nL{createVariable<Dataset.createVariable>} method of a L{Dataset} or\nL{Group} instance. The L{createVariable<Dataset.createVariable>} method\nhas two mandatory arguments, the variable name (a Python string), and\nthe variable datatype. The variable's dimensions are given by a tuple\ncontaining the dimension names (defined previously with\nL{createDimension<Dataset.createDimension>}). To create a scalar\nvariable, simply leave out the dimensions keyword. The variable\nprimitive datatypes correspond to the dtype attribute of a numpy array. \nYou can specify the datatype as a numpy dtype object, or anything that\ncan be converted to a numpy dtype object.  Valid datatype specifiers\ninclude: C{'f4'} (32-bit floating point), C{'""f8'} (64-bit floating\npoint), C{'i4'} (32-bit signed integer), C{'i2'} (16-bit signed\ninteger), C{'i8'} (64-bit singed integer), C{'i1'} (8-bit signed\ninteger), C{'u1'} (8-bit unsigned integer), C{'u2'} (16-bit unsigned\ninteger), C{'u4'} (32-bit unsigned integer), C{'u8'} (64-bit unsigned\ninteger), or C{'S1'} (single-character string).  The old Numeric\nsingle-character typecodes (C{'f'},C{'d'},C{'h'},\nC{'s'},C{'b'},C{'B'},C{'c'},C{'i'},C{'l'}), corresponding to\n(C{'f4'},C{'f8'},C{'i2'},C{'i2'},C{'i1'},C{'i1'},C{'S1'},C{'i4'},C{'i4'}),\nwill also work. The unsigned integer types and the 64-bit integer type\ncan only be used if the file format is C{NETCDF4}.\n\nThe dimensions themselves are usually also defined as variables, called\ncoordinate variables. The L{createVariable<Dataset.createVariable>}\nmethod returns an instance of the L{Variable} class whose methods can be\nused later to access and set variable data and attributes.\n\n>>> times = rootgrp.createVariable('time','f8',('time',))\n>>> levels = rootgrp.createVariable('level','i4',('level',))\n>>> latitudes = rootgrp.createVariable('latitude','f4',('lat',))\n>>> longitudes = rootgrp.createVariable('longitude','f4',('lon',))\n>>> # two dimensions unlimited.\n>>> temp = rootgrp.createVariable('temp','f4',('time','level','lat','lon',))\n\nAll of the variables in the L{Dataset} or L{Group} are stored in a\nPython dictionary, in the same way as the dimensions:\n\n>>> print rootgrp.variables\nOrderedDict([('time', <netCDF4.Variable object at 0x1b4ba70>),\n             ('level', <netCDF4.Variable object at 0x1b4bab0>), \n             ('latitude', <netCDF4.Variable object at 0x1b4baf0>),\n             ('longitude', <netCDF4.Variable object at 0x1b4bb30>),\n             ('temp', <netCDF4.Variable object at 0x1b4bb70>)])\n>>>\n\nTo get summary info on a L{Variable} instance in an interactive session, just print it.\n\n>>> print rootgrp.variables['temp']\n<type 'netCDF4.Variable'>\nfloat32 temp(time, level, lat,"" lon)\n    least_significant_digit: 3\n    units: K\nunlimited dimensions: time, level\ncurrent shape = (0, 0, 73, 144)\n>>>\n\nL{Variable} names can be changed using the\nL{renameVariable<Dataset.renameVariable>} method of a L{Dataset}\ninstance.\n            \n\n5) Attributes in a netCDF file\n------------------------------\n\nThere are two types of attributes in a netCDF file, global and variable. \nGlobal attributes provide information about a group, or the entire\ndataset, as a whole. L{Variable} attributes provide information about\none of the variables in a group. Global attributes are set by assigning\nvalues to L{Dataset} or L{Group} instance variables. L{Variable}\nattributes are set by assigning values to L{Variable} instances\nvariables. Attributes can be strings, numbers or sequences. Returning to\nour example,\n\n>>> import time\n>>> rootgrp.description = 'bogus example script'\n>>> rootgrp.history = 'Created ' + time.ctime(time.time())\n>>> rootgrp.source = 'netCDF4 python module tutorial'\n>>> latitudes.units = 'degrees north'\n>>> longitudes.units = 'degrees east'\n>>> levels.units = 'hPa'\n>>> temp.units = 'K'\n>>> times.units = 'hours since 0001-01-01 00:00:00.0'\n>>> times.calendar = 'gregorian'\n\nThe L{ncattrs<Dataset.ncattrs>} method of a L{Dataset}, L{Group} or\nL{Variable} instance can be used to retrieve the names of all the netCDF\nattributes. This method is provided as a convenience, since using the\nbuilt-in C{dir} Python function will return a bunch of private methods\nand attributes that cannot (or should not) be modified by the user.\n\n>>> for name in rootgrp.ncattrs():\n>>>     print 'Global attr', name, '=', getattr(rootgrp,name)\nGlobal attr description = bogus example script\nGlobal attr history = Created Mon Nov  7 10.30:56 2005\nGlobal attr source = netCDF4 python module tutorial\n\nThe C{__dict__} attribute of a L{Dataset}, L{Group} or L{Variable} \ninstance provides all the netCDF attribute name/value pairs in a python \ndict""ionary:\n\n>>> print rootgrp.__dict__\nOrderedDict([(u'description', u'bogus example script'),\n             (u'history', u'Created Thu Mar  3 19:30:33 2011'), \n             (u'source', u'netCDF4 python module tutorial')])\n\nAttributes can be deleted from a netCDF L{Dataset}, L{Group} or\nL{Variable} using the python C{del} statement (i.e. C{del grp.foo}\nremoves the attribute C{foo} the the group C{grp}).\n\n6) Writing data to and retrieving data from a netCDF variable\n-------------------------------------------------------------\n\nNow that you have a netCDF L{Variable} instance, how do you put data\ninto it? You can just treat it like an array and assign data to a slice.\n\n>>> import numpy \n>>> lats =  numpy.arange(-90,91,2.5)\n>>> lons =  numpy.arange(-180,180,2.5)\n>>> latitudes[:] = lats\n>>> longitudes[:] = lons\n>>> print 'latitudes =\\n',latitudes[:]\nlatitudes =\n[-90.  -87.5 -85.  -82.5 -80.  -77.5 -75.  -72.5 -70.  -67.5 -65.  -62.5\n -60.  -57.5 -55.  -52.5 -50.  -47.5 -45.  -42.5 -40.  -37.5 -35.  -32.5\n -30.  -27.5 -25.  -22.5 -20.  -17.5 -15.  -12.5 -10.   -7.5  -5.   -2.5\n   0.    2.5   5.    7.5  10.   12.5  15.   17.5  20.   22.5  25.   27.5\n  30.   32.5  35.   37.5  40.   42.5  45.   47.5  50.   52.5  55.   57.5\n  60.   62.5  65.   67.5  70.   72.5  75.   77.5  80.   82.5  85.   87.5\n  90. ]\n>>>\n\nUnlike NumPy's array objects, netCDF L{Variable} \nobjects with unlimited dimensions will grow along those dimensions if you \nassign data outside the currently defined range of indices.\n\n>>> # append along two unlimited dimensions by assigning to slice.\n>>> nlats = len(rootgrp.dimensions['lat'])\n>>> nlons = len(rootgrp.dimensions['lon'])\n>>> print 'temp shape before adding data = ',temp.shape\ntemp shape before adding data =  (0, 0, 73, 144)\n>>>\n>>> from numpy.random import uniform\n>>> temp[0:5,0:10,:,:] = uniform(size=(5,10,nlats,nlons))\n>>> print 'temp shape after adding data = ',temp.shape\ntemp shape after adding data =  (6, 10"", 73, 144)\n>>>\n>>> # levels have grown, but no values yet assigned.\n>>> print 'levels shape after adding pressure data = ',levels.shape\nlevels shape after adding pressure data =  (10,)\n>>>\n\nNote that the size of the levels variable grows when data is appended\nalong the C{level} dimension of the variable C{temp}, even though no\ndata has yet been assigned to levels.\n\n>>> # now, assign data to levels dimension variable.\n>>> levels[:] =  [1000.,850.,700.,500.,300.,250.,200.,150.,100.,50.]\n\nHowever, that there are some differences between NumPy and netCDF \nvariable slicing rules. Slices behave as usual, being specified as a \nC{start:stop:step} triplet. Using a scalar integer index C{i} takes the ith \nelement and reduces the rank of the output array by one. Boolean array and\ninteger sequence indexing behaves differently for netCDF variables\nthan for numpy arrays.  Only 1-d boolean arrays and integer sequences are\nallowed, and these indices work independently along each dimension (similar\nto the way vector subscripts work in fortran).  This means that\n\n>>> temp[0, 0, [0,1,2,3], [0,1,2,3]]\n\nreturns an array of shape (4,4) when slicing a netCDF variable, but for a\nnumpy array it returns an array of shape (4,).  \nSimilarly, a netCDF variable of shape C{(2,3,4,5)} indexed\nwith C{[0, array([True, False, True]), array([False, True, True, True]), :]}\nwould return a C{(2, 3, 5)} array. In NumPy, this would raise an error since\nit would be equivalent to C{[0, [0,1], [1,2,3], :]}. While this behaviour can\ncause some confusion for those used to NumPy's 'fancy indexing' rules, it\nprovides a very powerful way to extract data from multidimensional netCDF\nvariables by using logical operations on the dimension arrays to create slices.\n\nFor example, \n\n>>> tempdat = temp[::2, [1,3,6], lats>0, lons>0]\n\nwill extract time indices 0,2 and 4, pressure levels\n850, 500 and 200 hPa, all Northern Hemisphere latitudes and Eastern\nHemisphere longitudes, resulti""ng in a numpy array of shape  (3, 3, 36, 71).\n\n>>> print 'shape of fancy temp slice = ',tempdat.shape\nshape of fancy temp slice =  (3, 3, 36, 71)\n>>>\n\nTime coordinate values pose a special challenge to netCDF users.  Most\nmetadata standards (such as CF and COARDS) specify that time should be\nmeasure relative to a fixed date using a certain calendar, with units\nspecified like C{hours since YY:MM:DD hh-mm-ss}.  These units can be\nawkward to deal with, without a utility to convert the values to and\nfrom calendar dates.  The functione called L{num2date} and L{date2num} are\nprovided with this package to do just that.  Here's an example of how they\ncan be used:\n\n>>> # fill in times.\n>>> from datetime import datetime, timedelta\n>>> from netCDF4 import num2date, date2num\n>>> dates = [datetime(2001,3,1)+n*timedelta(hours=12) for n in range(temp.shape[0])]\n>>> times[:] = date2num(dates,units=times.units,calendar=times.calendar)\n>>> print 'time values (in units %s): ' % times.units+'\\n',times[:]\ntime values (in units hours since January 1, 0001): \n[ 17533056.  17533068.  17533080.  17533092.  17533104.]\n>>>\n>>> dates = num2date(times[:],units=times.units,calendar=times.calendar)\n>>> print 'dates corresponding to time values:\\n',dates\ndates corresponding to time values:\n[2001-03-01 00:00:00 2001-03-01 12:00:00 2001-03-02 00:00:00\n 2001-03-02 12:00:00 2001-03-03 00:00:00]\n>>>\n\nL{num2date} converts numeric values of time in the specified C{units}\nand C{calendar} to datetime objects, and L{date2num} does the reverse.\nAll the calendars currently defined in the U{CF metadata convention \n<http://cf-pcmdi.llnl.gov/documents/cf-conventions/>} are supported.\nA function called L{date2index} is also provided which returns the indices\nof a netCDF time variable corresponding to a sequence of datetime instances.\n\n\n7) Reading data from a multi-file netCDF dataset.\n-------------------------------------------------\n\nIf you want to read data from a var""iable that spans multiple netCDF files,\nyou can use the L{MFDataset} class to read the data as if it were \ncontained in a single file. Instead of using a single filename to create\na L{Dataset} instance, create a L{MFDataset} instance with either a list\nof filenames, or a string with a wildcard (which is then converted to\na sorted list of files using the python glob module).\nVariables in the list of files that share the same unlimited \ndimension are aggregated together, and can be sliced across multiple\nfiles.  To illustrate this, let's first create a bunch of netCDF files with\nthe same variable (with the same unlimited dimension).  The files\nmust in be in C{NETCDF3_64BIT}, C{NETCDF3_CLASSIC} or \nC{NETCDF4_CLASSIC format} (C{NETCDF4} formatted multi-file\ndatasets are not supported).\n\n>>> for nfile in range(10):\n>>>     f = Dataset('mftest'+repr(nfile)+'.nc','w',format='NETCDF4_CLASSIC')\n>>>     f.createDimension('x',None)\n>>>     x = f.createVariable('x','i',('x',))\n>>>     x[0:10] = numpy.arange(nfile*10,10*(nfile+1))\n>>>     f.close()\n\nNow read all the files back in at once with L{MFDataset}\n\n>>> from netCDF4 import MFDataset\n>>> f = MFDataset('mftest*nc')\n>>> print f.variables['x'][:]\n[ 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\n 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\n 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\n 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]\n>>>\n\nNote that MFDataset can only be used to read, not write, multi-file\ndatasets. \n\n8) Efficient compression of netCDF variables\n--------------------------------------------\n\nData stored in netCDF 4 L{Variable} objects can be compressed and\ndecompressed on the fly. The parameters for the compression are\ndetermined by the C{zlib}, C{complevel} and C{shuffle} keyword arguments\nto the L{createVariable<Dataset.createVariable>} method. To turn on""\ncompression, set C{zlib=True}.  The C{complevel} keyword regulates the\nspeed and efficiency of the compression (1 being fastest, but lowest\ncompression ratio, 9 being slowest but best compression ratio). The\ndefault value of C{complevel} is 4. Setting C{shuffle=False} will turn\noff the HDF5 shuffle filter, which de-interlaces a block of data before\ncompression by reordering the bytes.  The shuffle filter can\nsignificantly improve compression ratios, and is on by default.  Setting\nC{fletcher32} keyword argument to\nL{createVariable<Dataset.createVariable>} to C{True} (it's C{False} by\ndefault) enables the Fletcher32 checksum algorithm for error detection.\nIt's also possible to set the HDF5 chunking parameters and endian-ness\nof the binary data stored in the HDF5 file with the C{chunksizes}\nand C{endian} keyword arguments to\nL{createVariable<Dataset.createVariable>}.  These keyword arguments only\nare relevant for C{NETCDF4} and C{NETCDF4_CLASSIC} files (where the\nunderlying file format is HDF5) and are silently ignored if the file\nformat is C{NETCDF3_CLASSIC} or C{NETCDF3_64BIT},\n\nIf your data only has a certain number of digits of precision (say for\nexample, it is temperature data that was measured with a precision of\n0.1 degrees), you can dramatically improve zlib compression by\nquantizing (or truncating) the data using the C{least_significant_digit}\nkeyword argument to L{createVariable<Dataset.createVariable>}. The least\nsignificant digit is the power of ten of the smallest decimal place in\nthe data that is a reliable value. For example if the data has a\nprecision of 0.1, then setting C{least_significant_digit=1} will cause\ndata the data to be quantized using C{numpy.around(scale*data)/scale}, where\nscale = 2**bits, and bits is determined so that a precision of 0.1 is\nretained (in this case bits=4).  Effectively, this makes the compression\n'lossy' instead of 'lossless', that is some precision in the data is\nsacrificed for the sake of ""disk space.\n\nIn our example, try replacing the line\n\n>>> temp = rootgrp.createVariable('temp','f4',('time','level','lat','lon',))\n\nwith\n\n>>> temp = dataset.createVariable('temp','f4',('time','level','lat','lon',),zlib=True)\n\nand then\n\n>>> temp = dataset.createVariable('temp','f4',('time','level','lat','lon',),zlib=True,least_significant_digit=3)\n\nand see how much smaller the resulting files are.\n\n9) Beyond homogenous arrays of a fixed type - compound data types\n-----------------------------------------------------------------\n\nCompound data types map directly to numpy structured (a.k.a 'record'\narrays).  Structured arrays are akin to C structs, or derived types\nin Fortran. They allow for the construction of table-like structures\ncomposed of combinations of other data types, including other \ncompound types. Compound types might be useful for representing multiple\nparameter values at each point on a grid, or at each time and space\nlocation for scattered (point) data. You can then access all the\ninformation for a point by reading one variable, instead of reading\ndifferent parameters from different variables.  Compound data types\nare created from the corresponding numpy data type using the \nL{createCompoundType<Dataset.createCompoundType>} method of a L{Dataset} or L{Group} instance.\nSince there is no native complex data type in netcdf, compound types are handy\nfor storing numpy complex arrays.  Here's an example:\n\n>>> f = Dataset('complex.nc','w')\n>>> size = 3 # length of 1-d complex array\n>>> # create sample complex data.\n>>> datac = numpy.exp(1j*(1.+numpy.linspace(0, numpy.pi, size)))\n>>> # create complex128 compound data type.\n>>> complex128 = numpy.dtype([('real',numpy.float64),('imag',numpy.float64)])\n>>> complex128_t = f.createCompoundType(complex128,'complex128')\n>>> # create a variable with this data type, write some data to it.\n>>> f.createDimension('x_dim',None)\n>>> v = f.createVariable('cmplx_var',complex128_t,'x_dim""')\n>>> data = numpy.empty(size,complex128) # numpy structured array\n>>> data['real'] = datac.real; data['imag'] = datac.imag\n>>> v[:] = data # write numpy structured array to netcdf compound var\n>>> # close and reopen the file, check the contents.\n>>> f.close(); f = Dataset('complex.nc')\n>>> v = f.variables['cmplx_var']\n>>> datain = v[:] # read in all the data into a numpy structured array\n>>> # create an empty numpy complex array\n>>> datac2 = numpy.empty(datain.shape,numpy.complex128)\n>>> # .. fill it with contents of structured array.\n>>> datac2.real = datain['real']; datac2.imag = datain['imag']\n>>> print datac.dtype,datac # original data\ncomplex128 [ 0.54030231+0.84147098j -0.84147098+0.54030231j  -0.54030231-0.84147098j]\n>>>\n>>> print datac2.dtype,datac2 # data from file\ncomplex128 [ 0.54030231+0.84147098j -0.84147098+0.54030231j  -0.54030231-0.84147098j]\n>>>\n\nCompound types can be nested, but you must create the 'inner'\nones first. All of the compound types defined for a L{Dataset} or L{Group} are stored in a\nPython dictionary, just like variables and dimensions. As always, printing\nobjects gives useful summary information in an interactive session:\n\n>>> print f\n<type 'netCDF4.Dataset'>\nroot group (NETCDF4 file format):\n    dimensions: x_dim\n    variables: cmplx_var\n    groups:\n<type 'netCDF4.Variable'>\n>>> print f.variables['cmplx_var']\ncompound cmplx_var(x_dim)\ncompound data type: [('real', '<f8'), ('imag', '<f8')]\nunlimited dimensions: x_dim\ncurrent shape = (3,)\n>>> print f.cmptypes\nOrderedDict([('complex128', <netCDF4.CompoundType object at 0x1029eb7e8>)])\n>>> print f.cmptypes['complex128']\n<type 'netCDF4.CompoundType'>: name = 'complex128', numpy dtype = [(u'real','<f8'), (u'imag', '<f8')]\n>>>\n\n10) Variable-length (vlen) data types.\n--------------------------------------\n\nNetCDF 4 has support for variable-length or \"ragged\" arrays.  These are arrays\nof variable length sequences having the same type. To creat""e a variable-length \ndata type, use the L{createVLType<Dataset.createVLType>} method\nmethod of a L{Dataset} or L{Group} instance.\n\n>>> f = Dataset('tst_vlen.nc','w')\n>>> vlen_t = f.createVLType(numpy.int32, 'phony_vlen')\n\nThe numpy datatype of the variable-length sequences and the name of the \nnew datatype must be specified. Any of the primitive datatypes can be \nused (signed and unsigned integers, 32 and 64 bit floats, and characters),\nbut compound data types cannot.\nA new variable can then be created using this datatype.\n\n>>> x = f.createDimension('x',3)\n>>> y = f.createDimension('y',4)\n>>> vlvar = f.createVariable('phony_vlen_var', vlen_t, ('y','x'))\n\nSince there is no native vlen datatype in numpy, vlen arrays are represented\nin python as object arrays (arrays of dtype C{object}). These are arrays whose \nelements are Python object pointers, and can contain any type of python object.\nFor this application, they must contain 1-D numpy arrays all of the same type\nbut of varying length.\nIn this case, they contain 1-D numpy C{int32} arrays of random length betwee\n1 and 10.\n\n>>> import random\n>>> data = numpy.empty(len(y)*len(x),object)\n>>> for n in range(len(y)*len(x)):\n>>>    data[n] = numpy.arange(random.randint(1,10),dtype='int32')+1\n>>> data = numpy.reshape(data,(len(y),len(x)))\n>>> vlvar[:] = data\n>>> print 'vlen variable =\\n',vlvar[:]\nvlen variable =\n[[[ 1  2  3  4  5  6  7  8  9 10] [1 2 3 4 5] [1 2 3 4 5 6 7 8]]\n [[1 2 3 4 5 6 7] [1 2 3 4 5 6] [1 2 3 4 5]]\n [[1 2 3 4 5] [1 2 3 4] [1]]\n [[ 1  2  3  4  5  6  7  8  9 10] [ 1  2  3  4  5  6  7  8  9 10]\n  [1 2 3 4 5 6 7 8]]]\n>>> print f\n<type 'netCDF4.Dataset'>\nroot group (NETCDF4 file format):\n    dimensions: x, y\n    variables: phony_vlen_var\n    groups:\n>>> print f.variables['phony_vlen_var']\n<type 'netCDF4.Variable'>\nvlen phony_vlen_var(y, x)\nvlen data type: int32\nunlimited dimensions:\ncurrent shape = (4, 3)\n>>> print f.VLtypes['phony_vlen']\n<type 'netCDF4.VL""Type'>: name = 'phony_vlen', numpy dtype = int32\n>>>\n\nNumpy object arrays containing python strings can also be written as vlen\nvariables,  For vlen strings, you don't need to create a vlen data type. \nInstead, simply use the python C{str} builtin (or a numpy string datatype\nwith fixed length greater than 1) when calling the\nL{createVariable<Dataset.createVariable>} method.  \n\n>>> z = f.createDimension('z',10)\n>>> strvar = rootgrp.createVariable('strvar', str, 'z')\n\nIn this example, an object array is filled with random python strings with\nrandom lengths between 2 and 12 characters, and the data in the object \narray is assigned to the vlen string variable.\n\n>>> chars = '1234567890aabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'\n>>> data = numpy.empty(10,'O')\n>>> for n in range(10):\n>>>     stringlen = random.randint(2,12)\n>>>     data[n] = ''.join([random.choice(chars) for i in range(stringlen)])\n>>> strvar[:] = data\n>>> print 'variable-length string variable:\\n',strvar[:]\nvariable-length string variable:\n[aDy29jPt jd7aplD b8t4RM jHh8hq KtaPWF9cQj Q1hHN5WoXSiT MMxsVeq td LUzvVTzj\n 5DS9X8S]\n>>> print f\n<type 'netCDF4.Dataset'>\nroot group (NETCDF4 file format):\n    dimensions: x, y, z\n    variables: phony_vlen_var, strvar\n    groups:\n>>> print f.variables['strvar']\n<type 'netCDF4.Variable'>\nvlen strvar(z)\nvlen data type: <type 'str'>\nunlimited dimensions:\ncurrent size = (10,)\n>>>\n\nIt is also possible to set contents of vlen string variables with numpy arrays\nof any string or unicode data type. Note, however, that accessing the contents\nof such variables will always return numpy arrays with dtype C{object}.\n\nAll of the code in this tutorial is available in C{examples/tutorial.py},\nUnit tests are in the C{test} directory.\n\n@contact: Jeffrey Whitaker <jeffrey.s.whitaker@noaa.gov>\n\n@copyright: 2008 by Jeffrey Whitaker.\n\n@license: Permission to use, copy, modify, and distribute this software and\nits documentation f""or any purpose and without fee is hereby granted,\nprovided that the above copyright notice appear in all copies and that\nboth the copyright notice and this permission notice appear in\nsupporting documentation.\nTHE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\nINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO\nEVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR\nCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF\nUSE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.";
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>>> # create a series of netCDF files with a variable sharing\n>>> # the same unlimited dimension.\n>>> for nfile in range(10):\n>>>     f = Dataset('mftest'+repr(nfile)+'.nc','w')\n>>>     f.createDimension('x',None)\n>>>     x = f.createVariable('x','i',('x',))\n>>>     x[0:10] = numpy.arange(nfile*10,10*(nfile+1))\n>>>     f.close()\n>>> # now read all those files in at once, in one Dataset.\n>>> f = MFDataset('mftest*nc')\n>>> print f.variables['x'][:]\n[ 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\n 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\n 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\n 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]\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',))\n>>> t2 = f2.createVariable('time','i',('time',))\n>>> t1.units = 'days since 2000-01-01'\n>>> t2.units = 'days since 2000-02-01'\n>>> t1.calendar = 'standard'\n>>> t2.calendar = 'standard'\n>>> t1[:] = numpy.arange(31)\n>>> t2[:] = numpy.arange(30)\n>>> f1.close()\n>>> f2.close()\n>>> # Read the two files in at once, in one Dataset.\n>>> f = MFDataset('mftest*nc')\n>>> t = f.variables['time']\n>>> print t.units\ndays since 2000-01-01\n>>> print t[32] # The value written in the file, inconsistent with the MF time units.\n1\n>>> T = MFTime(t)\n>>> print T[32]                        \n32                           \n    ";
static char __pyx_k_Variable_object_no_longer_valid[] = "Variable object no longer valid";
static char __pyx_k_Volumes_DataCaddy_python_netcdf[] = "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx";
static char __pyx_k_assign_vlen_method_only_for_use[] = "_assign_vlen method only for use with VLEN variables";
static char __pyx_k_cannot_set__FillValue_attribute[] = "cannot set _FillValue attribute for VLEN or compound variable";
static char __pyx_k_cannot_specify_chunksizes_for_a[] = "cannot specify chunksizes for a contiguous dataset";
static char __pyx_k_endian_keyword_argument_must_be[] = "'endian' keyword argument must be 'little','big' or 'native', got '%s'";
static char __pyx_k_endian_ness_of_dtype_and_endian[] = "endian-ness of dtype and endian kwarg do not match, using endian kwarg";
static char __pyx_k_get_variables_s_dimension_names[] = "get variables's dimension names";
static char __pyx_k_illegal_data_type_for_attribute[] = "illegal data type for attribute, must be one of %s, got %s";
static char __pyx_k_s_is_one_of_the_reserved_attrib[] = "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead.";
static char __pyx_k_single_element_VLEN_slices_must[] = "single element VLEN slices must be specified by integers only";
static char __pyx_k_wrong_data_type_in_object_array[] = "wrong data type in object array: should be %s, got %s";
static char __pyx_k_wrong_data_type_should_be_s_got[] = "wrong data type: should be %s, got %s";
static char __pyx_k_Dimension_object_no_longer_valid[] = "Dimension object no longer valid";
static char __pyx_k_MFNetCDF4_only_works_with_NETCDF[] = "MFNetCDF4 only works with NETCDF3_CLASSIC, NETCDF3_64BIT and NETCDF4_CLASSIC formatted files, not NETCDF4";
static char __pyx_k_MFTime_requires_that_the_same_ti[] = "MFTime requires that the same time calendar is used by all files.";
static char __pyx_k_MFTime_requires_that_the_time_va[] = "MFTime requires that the time variable in all files have a calendar attribute";
static char __pyx_k_Return_the_number_of_stored_elem[] = "Return the number of stored elements.";
static char __pyx_k_Unsupported_compound_type_elemen[] = "Unsupported compound type element";
static char __pyx_k_Variable_length_strings_are_only[] = "Variable length strings are only supported for the NETCDF4 format. For other formats, consider using netCDF4.stringtochar to convert string arrays into character arrays with an additional dimension.";
static char __pyx_k_aggregation_variable_s_not_defin[] = "aggregation variable %s not defined in %s";
static char __pyx_k_attribute_s_has_unsupported_data[] = "attribute %s has unsupported datatype";
static char __pyx_k_cannot_assign_fill_value_for_mas[] = "cannot assign fill_value for masked array when missing_value attribute is not a scalar";
static char __pyx_k_cannot_close_a_L_Group_only_appl[] = "cannot close a L{Group} (only applies to Dataset)";
static char __pyx_k_cannot_find_compound_type_in_thi[] = "cannot find compound type in this group or parent groups";
static char __pyx_k_cannot_using_file_globbing_for_r[] = "cannot using file globbing for remote (OPeNDAP) datasets";
static char __pyx_k_chunksizes_must_be_a_sequence_wi[] = "chunksizes must be a sequence with the same length as dimensions";
static char __pyx_k_compound_field_of_an_unsupported[] = "compound field of an unsupported data type";
static char __pyx_k_created_using_fill_value_keyword[] = "created (using fill_value keyword to createVariable)";
static char __pyx_k_data_to_put_in_string_variable_m[] = "data to put in string variable must be an object array containing Python strings";
static char __pyx_k_dateutil_module_required_for_acc[] = "dateutil module required for accuracy < 1 second";
static char __pyx_k_dimension_s_not_defined_in_group[] = "dimension %s not defined in group %s or any group in it's family tree";
static char __pyx_k_diskless_mode_requires_netcdf_li[] = "diskless mode requires netcdf lib >= 4.2.1, you have %s";
static char __pyx_k_dtype_must_string_or_unicode_S_o[] = "dtype must string or unicode ('S' or 'U')";
static char __pyx_k_filling_on_default__FillValue_of[] = "filling on, default _FillValue of %s ignored\n";
static char __pyx_k_find_current_sizes_of_all_variab[] = "find current sizes of all variable dimensions";
static char __pyx_k_format_must_be_NETCDF4_NETCDF4_C[] = "format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'";
static char __pyx_k_illegal_primitive_data_type_must[] = "illegal primitive data type, must be one of %s, got %s";
static char __pyx_k_invalid_scale_factor_or_add_offs[] = "invalid scale_factor or add_offset attribute, no unpacking done...";
static char __pyx_k_master_dataset_s_does_not_have_a[] = "master dataset %s does not have a aggregation dimension";
static char __pyx_k_milliseconds_microseconds_not_su[] = "milliseconds/microseconds not supported for this calendar";
static char __pyx_k_negative_strides_not_allowed_whe[] = "negative strides not allowed when slicing MFVariable Variable instance";
static char __pyx_k_numpy_data_type_for_primitive_da[] = "numpy data type (for primitive data types) or VLType/CompoundType instance (for compound or vlen data types)";
static char __pyx_k_only_endian_native_allowed_for_N[] = "only endian='native' allowed for NETCDF3 files";
static char __pyx_k_only_numpy_string_unicode_or_obj[] = "only numpy string, unicode or object arrays can be assigned to VLEN str var slices";
static char __pyx_k_please_install_ordereddict_https[] = "please install ordereddict (https://pypi.python.org/pypi/ordereddict)";
static char __pyx_k_requires_numpy_version_1_0rc1_or[] = "requires numpy version 1.0rc1 or later";
static char __pyx_k_root_group_s_data_model_file_for[] = "root group (%s data model, file format %s):\n";
static char __pyx_k_size_of_data_array_does_not_conf[] = "size of data array does not conform to slice";
static char __pyx_k_strides_must_all_be_1_for_string[] = "strides must all be 1 for string variables";
static char __pyx_k_strides_must_all_be_1_for_vlen_v[] = "strides must all be 1 for vlen variables";
static char __pyx_k_to_assign_values_to_a_non_scalar[] = "to assign values to a non-scalar variable, use a slice";
static char __pyx_k_to_retrieve_values_from_a_non_sc[] = "to retrieve values from a non-scalar variable, use slicing";
static char __pyx_k_type_must_string_or_unicode_S_or[] = "type must string or unicode ('S' or 'U')";
static char __pyx_k_unsupported_component_type_for_V[] = "unsupported component type for VLEN";
static char __pyx_k_unsupported_datatype_specified_f[] = "unsupported datatype specified for VLEN";
static char __pyx_k_variable_s_data_type_mismatch_be[] = "variable %s : data type mismatch between master %s (%s) and extension %s (%s)";
static char __pyx_k_variable_s_dimensions_mismatch_b[] = "variable %s : dimensions mismatch between master %s (%s) and extension %s (%s)";
static char __pyx_k_variable_s_rank_mismatch_between[] = "variable %s : rank mismatch between master %s (%s) and extension %s (%s)";
static char __pyx_k_variable_s_shape_mismatch_betwee[] = "variable %s : shape mismatch between master %s (%s) and extension %s (%s)";
static char __pyx_k_vlen_string_array_attributes_not[] = "vlen string array attributes not supported";
static char __pyx_k_Volumes_DataCaddy_python_netcdf_2[] = "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/netCDF4.pyx";
static char __pyx_k_s_is_one_of_the_reserved_attrib_2[] = "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead.";
static char __pyx_k_filling_on_default__FillValue_of_2[] = "filling on, default _FillValue of %s used\n";
static char __pyx_k_master_dataset_s_does_not_have_a_2[] = "master dataset %s does not have any variables to aggregate";
static PyObject *__pyx_n_s_;
static PyObject *__pyx_kp_s_0m;
static PyObject *__pyx_kp_s_1;
static PyObject *__pyx_kp_s_1_1_1;
static PyObject *__pyx_kp_s_4_2_1;
static PyObject *__pyx_kp_s_4m;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_s_Dimension;
static PyObject *__pyx_n_s_Dimension___init;
static PyObject *__pyx_n_s_Dimension___len;
static PyObject *__pyx_n_s_Dimension___str;
static PyObject *__pyx_n_s_Dimension_isunlimited;
static PyObject *__pyx_kp_s_Dimension_object_no_longer_valid;
static PyObject *__pyx_n_s_FillValue;
static PyObject *__pyx_kp_s_FillValue_attribute_must_be_set;
static PyObject *__pyx_n_s_IOError;
static PyObject *__pyx_kp_s_Illegal_index;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_n_s_MFDataset;
static PyObject *__pyx_n_s_MFDataset___getattribute;
static PyObject *__pyx_n_s_MFDataset___init;
static PyObject *__pyx_n_s_MFDataset___setattr;
static PyObject *__pyx_n_s_MFDataset___str;
static PyObject *__pyx_n_s_MFDataset_close;
static PyObject *__pyx_n_s_MFDataset_ncattrs;
static PyObject *__pyx_kp_s_MFDataset_self_files_check_Fals;
static PyObject *__pyx_kp_s_MFNetCDF4_only_works_with_NETCDF;
static PyObject *__pyx_n_s_MFTime;
static PyObject *__pyx_n_s_MFTime___getitem;
static PyObject *__pyx_n_s_MFTime___init;
static PyObject *__pyx_n_s_MFTime__delta;
static PyObject *__pyx_n_s_MFTime__time;
static PyObject *__pyx_kp_s_MFTime_requires_that_the_same_ti;
static PyObject *__pyx_kp_s_MFTime_requires_that_the_time_va;
static PyObject *__pyx_kp_s_MFTime_self_time_units_None_Cla;
static PyObject *__pyx_n_s_NC_DISKLESS;
static PyObject *__pyx_n_s_NETCDF3;
static PyObject *__pyx_n_s_NETCDF3_64BIT;
static PyObject *__pyx_n_s_NETCDF3_CLASSIC;
static PyObject *__pyx_n_s_NETCDF4;
static PyObject *__pyx_n_s_NETCDF4_CLASSIC;
static PyObject *__pyx_n_s_NUMCHARS;
static PyObject *__pyx_n_s_O;
static PyObject *__pyx_n_s_OrderedDict;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_S;
static PyObject *__pyx_n_s_S1;
static PyObject *__pyx_n_s_StartCountStride;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_U;
static PyObject *__pyx_n_s_U1;
static PyObject *__pyx_n_s_UNDEFINED;
static PyObject *__pyx_n_s_UnicodeDecodeError;
static PyObject *__pyx_kp_s_Unsupported_compound_type_elemen;
static PyObject *__pyx_n_s_V;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_Variable;
static PyObject *__pyx_n_s_Variable___getattr;
static PyObject *__pyx_n_s_Variable___getitem;
static PyObject *__pyx_n_s_Variable___init;
static PyObject *__pyx_n_s_Variable___len;
static PyObject *__pyx_n_s_Variable___str;
static PyObject *__pyx_n_s_Variable__shape;
static PyObject *__pyx_kp_s_Variable_length_strings_are_only;
static PyObject *__pyx_n_s_Variable_ncattrs;
static PyObject *__pyx_kp_s_Variable_object_no_longer_valid;
static PyObject *__pyx_n_s_Variable_set_auto_maskandscale;
static PyObject *__pyx_n_s_Variable_typecode;
static PyObject *__pyx_kp_s_Volumes_DataCaddy_python_netcdf;
static PyObject *__pyx_kp_s_Volumes_DataCaddy_python_netcdf_2;
static PyObject *__pyx_kp_s__110;
static PyObject *__pyx_kp_s__15;
static PyObject *__pyx_kp_s__16;
static PyObject *__pyx_kp_s__25;
static PyObject *__pyx_kp_s__36;
static PyObject *__pyx_kp_s__38;
static PyObject *__pyx_kp_s__39;
static PyObject *__pyx_kp_s__41;
static PyObject *__pyx_kp_s__42;
static PyObject *__pyx_n_s__44;
static PyObject *__pyx_kp_s__49;
static PyObject *__pyx_kp_s__50;
static PyObject *__pyx_kp_s__51;
static PyObject *__pyx_kp_s__52;
static PyObject *__pyx_n_s_a;
static PyObject *__pyx_n_s_add_offset;
static PyObject *__pyx_n_s_aggDimId;
static PyObject *__pyx_n_s_aggDimName;
static PyObject *__pyx_n_s_aggdim;
static PyObject *__pyx_kp_s_aggregation_variable_s_not_defin;
static PyObject *__pyx_n_s_align;
static PyObject *__pyx_n_s_all;
static PyObject *__pyx_n_s_any;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_around;
static PyObject *__pyx_n_s_arr;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_s_as;
static PyObject *__pyx_n_s_asarray;
static PyObject *__pyx_n_s_assign_vlen;
static PyObject *__pyx_kp_s_assign_vlen_method_only_for_use;
static PyObject *__pyx_n_s_astype;
static PyObject *__pyx_kp_s_attribute_s_has_unsupported_data;
static PyObject *__pyx_n_s_attrs;
static PyObject *__pyx_n_s_atype;
static PyObject *__pyx_n_s_b;
static PyObject *__pyx_n_s_basedate;
static PyObject *__pyx_n_s_big;
static PyObject *__pyx_n_s_bool;
static PyObject *__pyx_n_s_bs;
static PyObject *__pyx_n_s_byteorder;
static PyObject *__pyx_n_s_byteswap;
static PyObject *__pyx_n_s_calendar;
static PyObject *__pyx_kp_s_cannot_assign_fill_value_for_mas;
static PyObject *__pyx_kp_s_cannot_close_a_L_Group_only_appl;
static PyObject *__pyx_kp_s_cannot_find_compound_type_in_thi;
static PyObject *__pyx_kp_s_cannot_set__FillValue_attribute;
static PyObject *__pyx_kp_s_cannot_specify_chunksizes_for_a;
static PyObject *__pyx_kp_s_cannot_using_file_globbing_for_r;
static PyObject *__pyx_n_s_cdf;
static PyObject *__pyx_n_s_cdfRecVar;
static PyObject *__pyx_n_s_cdfRecVar_2;
static PyObject *__pyx_n_s_cdfTLen;
static PyObject *__pyx_n_s_cdfVLen;
static PyObject *__pyx_n_s_cdfVLen_2;
static PyObject *__pyx_n_s_cdf_2;
static PyObject *__pyx_n_s_cdfm;
static PyObject *__pyx_n_s_cdftime;
static PyObject *__pyx_n_s_char;
static PyObject *__pyx_n_s_chartostring;
static PyObject *__pyx_n_s_check;
static PyObject *__pyx_n_s_chunk_cache;
static PyObject *__pyx_n_s_chunksizes;
static PyObject *__pyx_kp_s_chunksizes_must_be_a_sequence_wi;
static PyObject *__pyx_n_s_clobber;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_cmptype;
static PyObject *__pyx_n_s_cmptypes;
static PyObject *__pyx_n_s_cnt;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_complevel;
static PyObject *__pyx_n_s_compound;
static PyObject *__pyx_kp_s_compound_data_type_s;
static PyObject *__pyx_kp_s_compound_field_of_an_unsupported;
static PyObject *__pyx_n_s_concatenate;
static PyObject *__pyx_n_s_contiguous;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_n_s_count;
static PyObject *__pyx_kp_s_created_using_fill_value_keyword;
static PyObject *__pyx_kp_s_current_shape_s;
static PyObject *__pyx_kp_s_current_size_s;
static PyObject *__pyx_kp_s_d_d_d;
static PyObject *__pyx_kp_s_d_d_d_s;
static PyObject *__pyx_n_s_dat;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_data_model;
static PyObject *__pyx_kp_s_data_to_put_in_string_variable_m;
static PyObject *__pyx_n_s_datashape;
static PyObject *__pyx_n_s_datatype;
static PyObject *__pyx_n_s_datatype_name;
static PyObject *__pyx_n_s_date;
static PyObject *__pyx_n_s_date2index;
static PyObject *__pyx_n_s_date2num;
static PyObject *__pyx_n_s_dateparse;
static PyObject *__pyx_n_s_dates;
static PyObject *__pyx_n_s_datetime;
static PyObject *__pyx_kp_s_dateutil_module_required_for_acc;
static PyObject *__pyx_n_s_dateutil_parser;
static PyObject *__pyx_n_s_dateutil_tz;
static PyObject *__pyx_n_s_day;
static PyObject *__pyx_n_s_days;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_default_encoding;
static PyObject *__pyx_n_s_default_fillvals;
static PyObject *__pyx_n_s_delncattr;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dim;
static PyObject *__pyx_kp_s_dimension_s_not_defined_in_group;
static PyObject *__pyx_n_s_dimensions;
static PyObject *__pyx_kp_s_dimensions_cannot_be_altered;
static PyObject *__pyx_kp_s_dimensions_s;
static PyObject *__pyx_kp_s_dimensions_sizes_s;
static PyObject *__pyx_n_s_dimid;
static PyObject *__pyx_n_s_dimlens;
static PyObject *__pyx_n_s_dimname;
static PyObject *__pyx_n_s_dimnames;
static PyObject *__pyx_n_s_dims;
static PyObject *__pyx_n_s_dims_2;
static PyObject *__pyx_n_s_dimtotlen;
static PyObject *__pyx_n_s_disk_format;
static PyObject *__pyx_n_s_diskless;
static PyObject *__pyx_kp_s_diskless_mode_requires_netcdf_li;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_dparse;
static PyObject *__pyx_n_s_dset;
static PyObject *__pyx_n_s_dset_2;
static PyObject *__pyx_n_s_dt;
static PyObject *__pyx_n_s_dtype;
static PyObject *__pyx_kp_s_dtype_must_string_or_unicode_S_o;
static PyObject *__pyx_n_s_dtype_name;
static PyObject *__pyx_n_s_elem;
static PyObject *__pyx_n_s_empty;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_enddef;
static PyObject *__pyx_n_s_endian;
static PyObject *__pyx_kp_s_endian_keyword_argument_must_be;
static PyObject *__pyx_kp_s_endian_ness_of_dtype_and_endian;
static PyObject *__pyx_n_s_endswith;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_exact;
static PyObject *__pyx_n_s_exclude;
static PyObject *__pyx_n_s_extDims;
static PyObject *__pyx_n_s_extShape;
static PyObject *__pyx_n_s_extType;
static PyObject *__pyx_n_s_f;
static PyObject *__pyx_n_s_f4;
static PyObject *__pyx_kp_s_f4_2;
static PyObject *__pyx_kp_s_f4_3;
static PyObject *__pyx_n_s_f8;
static PyObject *__pyx_n_s_fields;
static PyObject *__pyx_n_s_file_format;
static PyObject *__pyx_n_s_file_format_2;
static PyObject *__pyx_n_s_filename;
static PyObject *__pyx_kp_s_filepath_method_not_enabled_To;
static PyObject *__pyx_n_s_files;
static PyObject *__pyx_n_s_files_2;
static PyObject *__pyx_n_s_fill_value;
static PyObject *__pyx_n_s_filled;
static PyObject *__pyx_kp_s_filling_off;
static PyObject *__pyx_kp_s_filling_on;
static PyObject *__pyx_kp_s_filling_on_default__FillValue_of;
static PyObject *__pyx_kp_s_filling_on_default__FillValue_of_2;
static PyObject *__pyx_n_s_find;
static PyObject *__pyx_n_s_find_dim;
static PyObject *__pyx_n_s_flatten;
static PyObject *__pyx_n_s_fletcher32;
static PyObject *__pyx_n_s_float;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_kp_s_format_must_be_NETCDF4_NETCDF4_C;
static PyObject *__pyx_n_s_formats;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_get_var_chunk_cache;
static PyObject *__pyx_n_s_getattr;
static PyObject *__pyx_n_s_getattribute;
static PyObject *__pyx_n_s_getdims;
static PyObject *__pyx_n_s_gethdf5libversion;
static PyObject *__pyx_n_s_getitem;
static PyObject *__pyx_n_s_getlibversion;
static PyObject *__pyx_n_s_getncattr;
static PyObject *__pyx_n_s_glob;
static PyObject *__pyx_n_s_gregorian;
static PyObject *__pyx_kp_s_group_s;
static PyObject *__pyx_n_s_groups;
static PyObject *__pyx_kp_s_groups_s;
static PyObject *__pyx_kp_s_groups_s_2;
static PyObject *__pyx_n_s_grp;
static PyObject *__pyx_n_s_grp_2;
static PyObject *__pyx_n_s_grpid;
static PyObject *__pyx_n_s_grpnames;
static PyObject *__pyx_n_s_grps;
static PyObject *__pyx_n_s_has_nc_inq_format_extended;
static PyObject *__pyx_n_s_has_nc_inq_path;
static PyObject *__pyx_n_s_has_rename_grp;
static PyObject *__pyx_n_s_hdf5libversion;
static PyObject *__pyx_n_s_hour;
static PyObject *__pyx_n_s_hours;
static PyObject *__pyx_n_s_http;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_i0;
static PyObject *__pyx_n_s_i1;
static PyObject *__pyx_n_s_i2;
static PyObject *__pyx_n_s_i4;
static PyObject *__pyx_n_s_i8;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_idx;
static PyObject *__pyx_kp_s_illegal_data_type_for_attribute;
static PyObject *__pyx_kp_s_illegal_primitive_data_type_must;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_in1d;
static PyObject *__pyx_n_s_ind;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_kp_s_invalid_scale_factor_or_add_offs;
static PyObject *__pyx_n_s_isMA;
static PyObject *__pyx_n_s_is_native_big;
static PyObject *__pyx_n_s_is_native_little;
static PyObject *__pyx_n_s_iscompound;
static PyObject *__pyx_n_s_ismasked;
static PyObject *__pyx_n_s_isnan;
static PyObject *__pyx_n_s_isostring;
static PyObject *__pyx_n_s_isprimitive;
static PyObject *__pyx_n_s_isscalar;
static PyObject *__pyx_n_s_isunlimited;
static PyObject *__pyx_n_s_isvlen;
static PyObject *__pyx_n_s_item;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_itemsize;
static PyObject *__pyx_n_s_itertools;
static PyObject *__pyx_n_s_izip;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_k;
static PyObject *__pyx_n_s_keepweakref;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_kind;
static PyObject *__pyx_n_s_least_significant_digit;
static PyObject *__pyx_n_s_len;
static PyObject *__pyx_n_s_little;
static PyObject *__pyx_n_s_lower;
static PyObject *__pyx_n_s_lst;
static PyObject *__pyx_n_s_lstArr;
static PyObject *__pyx_n_s_ma;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_majorvers;
static PyObject *__pyx_n_s_mask;
static PyObject *__pyx_n_s_masked_array;
static PyObject *__pyx_n_s_master;
static PyObject *__pyx_n_s_masterDims;
static PyObject *__pyx_n_s_masterRecVar;
static PyObject *__pyx_n_s_masterShape;
static PyObject *__pyx_n_s_masterType;
static PyObject *__pyx_kp_s_master_dataset_s_does_not_have_a;
static PyObject *__pyx_kp_s_master_dataset_s_does_not_have_a_2;
static PyObject *__pyx_n_s_mastervar;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_microsecond;
static PyObject *__pyx_n_s_microseconds;
static PyObject *__pyx_n_s_millisecond;
static PyObject *__pyx_n_s_milliseconds;
static PyObject *__pyx_kp_s_milliseconds_microseconds_not_su;
static PyObject *__pyx_n_s_minorvers;
static PyObject *__pyx_n_s_missing_value;
static PyObject *__pyx_n_s_mode;
static PyObject *__pyx_kp_s_mode_must_be_w_r_a_or_r_got_s;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_msecs;
static PyObject *__pyx_n_s_msecsd;
static PyObject *__pyx_n_s_msg;
static PyObject *__pyx_n_s_n;
static PyObject *__pyx_n_s_n1;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_kp_s_name_s_numpy_dtype_s;
static PyObject *__pyx_kp_s_name_s_size_s;
static PyObject *__pyx_n_s_names;
static PyObject *__pyx_n_s_native;
static PyObject *__pyx_n_s_nc_type;
static PyObject *__pyx_n_s_ncattrs;
static PyObject *__pyx_n_s_ncdump;
static PyObject *__pyx_n_s_ncdump_var;
static PyObject *__pyx_n_s_nctime;
static PyObject *__pyx_n_s_nctonptype;
static PyObject *__pyx_n_s_ndim;
static PyObject *__pyx_kp_s_negative_strides_not_allowed_whe;
static PyObject *__pyx_n_s_nelems;
static PyObject *__pyx_n_s_netCDF4;
static PyObject *__pyx_n_s_netCDF4_utils;
static PyObject *__pyx_n_s_netcdf4libversion;
static PyObject *__pyx_n_s_netcdftime;
static PyObject *__pyx_n_s_newSlice;
static PyObject *__pyx_n_s_newname;
static PyObject *__pyx_kp_s_no_since_in_unit_string;
static PyObject *__pyx_n_s_nptonctype;
static PyObject *__pyx_n_s_npversion;
static PyObject *__pyx_n_s_num;
static PyObject *__pyx_n_s_num2date;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_n_s_numv;
static PyObject *__pyx_n_s_nunlimdim;
static PyObject *__pyx_n_s_nv;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_offsets;
static PyObject *__pyx_n_s_oldname;
static PyObject *__pyx_kp_s_only_endian_native_allowed_for_N;
static PyObject *__pyx_kp_s_only_numpy_string_unicode_or_obj;
static PyObject *__pyx_n_s_ordereddict;
static PyObject *__pyx_n_s_out_array_shape;
static PyObject *__pyx_n_s_parent;
static PyObject *__pyx_n_s_parse;
static PyObject *__pyx_n_s_part;
static PyObject *__pyx_n_s_patchstring;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_kp_s_path_s;
static PyObject *__pyx_n_s_persist;
static PyObject *__pyx_kp_s_please_install_ordereddict_https;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_posixpath;
static PyObject *__pyx_n_s_preemption;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_private_atts;
static PyObject *__pyx_n_s_prod;
static PyObject *__pyx_n_s_proleptic_gregorian;
static PyObject *__pyx_n_s_proxy;
static PyObject *__pyx_n_s_put;
static PyObject *__pyx_n_s_put_ind;
static PyObject *__pyx_n_s_python3;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_quantize;
static PyObject *__pyx_kp_s_r;
static PyObject *__pyx_n_s_r_2;
static PyObject *__pyx_kp_s_r_3;
static PyObject *__pyx_kp_s_r_s;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_ravel;
static PyObject *__pyx_n_s_recLen;
static PyObject *__pyx_n_s_recVar;
static PyObject *__pyx_n_s_recdimlen;
static PyObject *__pyx_n_s_recdimname;
static PyObject *__pyx_n_s_recdimname_2;
static PyObject *__pyx_n_s_redef;
static PyObject *__pyx_n_s_ref_date;
static PyObject *__pyx_n_s_ref_num;
static PyObject *__pyx_n_s_releasevers;
static PyObject *__pyx_kp_s_renameGroup_method_not_enabled;
static PyObject *__pyx_n_s_replace;
static PyObject *__pyx_kp_s_requires_numpy_version_1_0rc1_or;
static PyObject *__pyx_n_s_reshape;
static PyObject *__pyx_kp_s_root_group_s_data_model_file_for;
static PyObject *__pyx_kp_s_root_group_s_file_format;
static PyObject *__pyx_kp_s_s;
static PyObject *__pyx_n_s_s_2;
static PyObject *__pyx_kp_s_s_is_one_of_the_reserved_attrib;
static PyObject *__pyx_kp_s_s_is_one_of_the_reserved_attrib_2;
static PyObject *__pyx_kp_s_s_not_a_valid_dimension_name;
static PyObject *__pyx_kp_s_s_not_a_valid_variable_name;
static PyObject *__pyx_kp_s_s_s;
static PyObject *__pyx_kp_s_s_s_s;
static PyObject *__pyx_kp_s_s_s_s_2;
static PyObject *__pyx_n_s_scale;
static PyObject *__pyx_n_s_scale_factor;
static PyObject *__pyx_n_s_second;
static PyObject *__pyx_n_s_seconds;
static PyObject *__pyx_n_s_secs;
static PyObject *__pyx_n_s_select;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_set_auto_mask;
static PyObject *__pyx_n_s_set_auto_maskandscale;
static PyObject *__pyx_n_s_set_auto_scale;
static PyObject *__pyx_n_s_set_default_format;
static PyObject *__pyx_n_s_setattr;
static PyObject *__pyx_n_s_setncattr;
static PyObject *__pyx_n_s_shape;
static PyObject *__pyx_n_s_shape_2;
static PyObject *__pyx_kp_s_shape_cannot_be_altered;
static PyObject *__pyx_n_s_shuffle;
static PyObject *__pyx_n_s_since;
static PyObject *__pyx_kp_s_single_element_VLEN_slices_must;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_kp_s_size_of_data_array_does_not_conf;
static PyObject *__pyx_n_s_slen;
static PyObject *__pyx_n_s_sortbylist;
static PyObject *__pyx_n_s_sorted;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_squeeze;
static PyObject *__pyx_n_s_sta;
static PyObject *__pyx_n_s_standard;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_s_startswith;
static PyObject *__pyx_n_s_step;
static PyObject *__pyx_n_s_stop;
static PyObject *__pyx_n_s_str;
static PyObject *__pyx_n_s_str_2;
static PyObject *__pyx_n_s_strd;
static PyObject *__pyx_n_s_stride;
static PyObject *__pyx_kp_s_strides_must_all_be_1_for_string;
static PyObject *__pyx_kp_s_strides_must_all_be_1_for_vlen_v;
static PyObject *__pyx_n_s_string;
static PyObject *__pyx_kp_s_string_type;
static PyObject *__pyx_n_s_stringtoarr;
static PyObject *__pyx_n_s_stringtochar;
static PyObject *__pyx_n_s_strt;
static PyObject *__pyx_n_s_subdtype;
static PyObject *__pyx_n_s_sum;
static PyObject *__pyx_n_s_supportedtypes;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_s_td;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_tile;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_n_s_time2index;
static PyObject *__pyx_n_s_timedelta;
static PyObject *__pyx_n_s_times;
static PyObject *__pyx_n_s_timestr;
static PyObject *__pyx_n_s_timestr_split;
static PyObject *__pyx_kp_s_to_assign_values_to_a_non_scalar;
static PyObject *__pyx_kp_s_to_retrieve_values_from_a_non_sc;
static PyObject *__pyx_n_s_tolist;
static PyObject *__pyx_n_s_toma;
static PyObject *__pyx_n_s_tostr;
static PyObject *__pyx_n_s_tostring;
static PyObject *__pyx_n_s_totaltime;
static PyObject *__pyx_n_s_traceback;
static PyObject *__pyx_n_s_tsecs;
static PyObject *__pyx_kp_s_type_must_string_or_unicode_S_or;
static PyObject *__pyx_n_s_typecode;
static PyObject *__pyx_n_s_typeid;
static PyObject *__pyx_n_s_tzinfo;
static PyObject *__pyx_n_s_tzutc;
static PyObject *__pyx_kp_s_u;
static PyObject *__pyx_n_s_u1;
static PyObject *__pyx_n_s_u2;
static PyObject *__pyx_n_s_u4;
static PyObject *__pyx_n_s_u8;
static PyObject *__pyx_n_s_unicode;
static PyObject *__pyx_n_s_unicode_error;
static PyObject *__pyx_n_s_unit;
static PyObject *__pyx_n_s_units;
static PyObject *__pyx_n_s_unlimdims;
static PyObject *__pyx_kp_s_unlimited_dimensions_s;
static PyObject *__pyx_kp_s_unlimited_dimensions_s_2;
static PyObject *__pyx_kp_s_unlimited_name_s_size_s;
static PyObject *__pyx_kp_s_unsupported_component_type_for_V;
static PyObject *__pyx_kp_s_unsupported_datatype_specified_f;
static PyObject *__pyx_kp_s_utf_8;
static PyObject *__pyx_n_s_utime;
static PyObject *__pyx_n_s_v;
static PyObject *__pyx_n_s_vInst;
static PyObject *__pyx_n_s_vName;
static PyObject *__pyx_n_s_val;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_value_2;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_var;
static PyObject *__pyx_n_s_varInfo;
static PyObject *__pyx_kp_s_variable_s_data_type_mismatch_be;
static PyObject *__pyx_kp_s_variable_s_dimensions_mismatch_b;
static PyObject *__pyx_kp_s_variable_s_rank_mismatch_between;
static PyObject *__pyx_kp_s_variable_s_shape_mismatch_betwee;
static PyObject *__pyx_n_s_variables;
static PyObject *__pyx_kp_s_variables_dimensions_s;
static PyObject *__pyx_kp_s_variables_s;
static PyObject *__pyx_n_s_varid;
static PyObject *__pyx_n_s_varname;
static PyObject *__pyx_n_s_varnames;
static PyObject *__pyx_n_s_vars;
static PyObject *__pyx_n_s_version;
static PyObject *__pyx_n_s_version_info;
static PyObject *__pyx_n_s_vid;
static PyObject *__pyx_n_s_view;
static PyObject *__pyx_n_s_vlen;
static PyObject *__pyx_kp_s_vlen_data_type_s;
static PyObject *__pyx_kp_s_vlen_string_array_attributes_not;
static PyObject *__pyx_n_s_vltype;
static PyObject *__pyx_n_s_vltypes;
static PyObject *__pyx_n_s_w;
static PyObject *__pyx_n_s_walk_grps;
static PyObject *__pyx_n_s_warn;
static PyObject *__pyx_n_s_warnings;
static PyObject *__pyx_n_s_weakref;
static PyObject *__pyx_kp_s_wrong_data_type_in_object_array;
static PyObject *__pyx_kp_s_wrong_data_type_should_be_s_got;
static PyObject *__pyx_n_s_ws;
static PyObject *__pyx_n_s_zeros;
static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_n_s_zlib;
static PyObject *__pyx_float_0_0;
static PyObject *__pyx_float_1_0;
static PyObject *__pyx_float_24_;
static PyObject *__pyx_float_1_e3;
static PyObject *__pyx_float_1_e6;
static PyObject *__pyx_float_3600_;
static PyObject *__pyx_float_86400_;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_6;
static PyObject *__pyx_int_8;
static PyObject *__pyx_int_10;
static PyObject *__pyx_int_15;
static PyObject *__pyx_int_24;
static PyObject *__pyx_int_1582;
static PyObject *__pyx_int_1900;
static PyObject *__pyx_int_3600;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_slice__7;
static PyObject *__pyx_slice__9;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_slice__10;
static PyObject *__pyx_slice__11;
static PyObject *__pyx_slice__12;
static PyObject *__pyx_slice__13;
static PyObject *__pyx_slice__17;
static PyObject *__pyx_slice__19;
static PyObject *__pyx_slice__30;
static PyObject *__pyx_slice__32;
static PyObject *__pyx_slice__33;
static PyObject *__pyx_slice__34;
static PyObject *__pyx_slice__54;
static PyObject *__pyx_slice__55;
static PyObject *__pyx_slice__60;
static PyObject *__pyx_slice__61;
static PyObject *__pyx_slice__68;
static PyObject *__pyx_slice__69;
static PyObject *__pyx_slice__70;
static PyObject *__pyx_slice__75;
static PyObject *__pyx_slice__77;
static PyObject *__pyx_slice__91;
static PyObject *__pyx_slice__98;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__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__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__90;
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__99;
static PyObject *__pyx_slice__100;
static PyObject *__pyx_slice__105;
static PyObject *__pyx_slice__106;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__131;
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__170;
static PyObject *__pyx_tuple__172;
static PyObject *__pyx_tuple__174;
static PyObject *__pyx_tuple__175;
static PyObject *__pyx_tuple__176;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__117;
static PyObject *__pyx_codeobj__119;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__128;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__132;
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__171;
static PyObject *__pyx_codeobj__173;
static PyObject *__pyx_codeobj__177;

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":5
 * gregorian = datetime(1582,10,15)
 * 
 * def _dateparse(timestr):             # <<<<<<<<<<<<<<
 *     """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,
 *     return a datetime instance"""
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_1_dateparse(PyObject *__pyx_self, PyObject *__pyx_v_timestr); /*proto*/
static char __pyx_doc_7netCDF4__dateparse[] = "parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,\n    return a datetime instance";
static PyMethodDef __pyx_mdef_7netCDF4_1_dateparse = {__Pyx_NAMESTR("_dateparse"), (PyCFunction)__pyx_pw_7netCDF4_1_dateparse, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4__dateparse)};
static PyObject *__pyx_pw_7netCDF4_1_dateparse(PyObject *__pyx_self, PyObject *__pyx_v_timestr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_dateparse (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4__dateparse(__pyx_self, ((PyObject *)__pyx_v_timestr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4__dateparse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_timestr) {
  PyObject *__pyx_v_dparse = NULL;
  PyObject *__pyx_v_tzutc = NULL;
  PyObject *__pyx_v_msg = NULL;
  PyObject *__pyx_v_timestr_split = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_units = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_isostring = NULL;
  PyObject *__pyx_v_basedate = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_dateparse", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":8
 *     """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,
 *     return a datetime instance"""
 *     try:             # <<<<<<<<<<<<<<
 *         import dateutil.parser as dparse
 *         from dateutil.tz import tzutc
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":9
 *     return a datetime instance"""
 *     try:
 *         import dateutil.parser as dparse             # <<<<<<<<<<<<<<
 *         from dateutil.tz import tzutc
 *     except ImportError:
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_n_s_);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_);
      __Pyx_GIVEREF(__pyx_n_s_);
      __pyx_t_5 = __Pyx_Import(__pyx_n_s_dateutil_parser, __pyx_t_4, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_dparse = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":10
 *     try:
 *         import dateutil.parser as dparse
 *         from dateutil.tz import tzutc             # <<<<<<<<<<<<<<
 *     except ImportError:
 *         msg = 'dateutil module required for accuracy < 1 second'
 */
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_n_s_tzutc);
      PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_tzutc);
      __Pyx_GIVEREF(__pyx_n_s_tzutc);
      __pyx_t_4 = __Pyx_Import(__pyx_n_s_dateutil_tz, __pyx_t_5, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_tzutc); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_tzutc = __pyx_t_5;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":11
 *         import dateutil.parser as dparse
 *         from dateutil.tz import tzutc
 *     except ImportError:             # <<<<<<<<<<<<<<
 *         msg = 'dateutil module required for accuracy < 1 second'
 *         raise ImportError(msg)
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("netCDF4._dateparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_7);

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":12
 *         from dateutil.tz import tzutc
 *     except ImportError:
 *         msg = 'dateutil module required for accuracy < 1 second'             # <<<<<<<<<<<<<<
 *         raise ImportError(msg)
 *     timestr_split = timestr.split()
 */
      __Pyx_INCREF(__pyx_kp_s_dateutil_module_required_for_acc);
      __pyx_v_msg = __pyx_kp_s_dateutil_module_required_for_acc;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":13
 *     except ImportError:
 *         msg = 'dateutil module required for accuracy < 1 second'
 *         raise ImportError(msg)             # <<<<<<<<<<<<<<
 *     timestr_split = timestr.split()
 *     units = timestr_split[0].lower()
 */
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_msg);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_msg);
      __Pyx_GIVEREF(__pyx_v_msg);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    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_L4_exception_handled:;
    __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);
    __pyx_L10_try_end:;
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":14
 *         msg = 'dateutil module required for accuracy < 1 second'
 *         raise ImportError(msg)
 *     timestr_split = timestr.split()             # <<<<<<<<<<<<<<
 *     units = timestr_split[0].lower()
 *     if timestr_split[1].lower() != 'since':
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_timestr_split = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":15
 *         raise ImportError(msg)
 *     timestr_split = timestr.split()
 *     units = timestr_split[0].lower()             # <<<<<<<<<<<<<<
 *     if timestr_split[1].lower() != 'since':
 *         raise ValueError("no 'since' in unit_string")
 */
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_timestr_split, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lower); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_units = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":16
 *     timestr_split = timestr.split()
 *     units = timestr_split[0].lower()
 *     if timestr_split[1].lower() != 'since':             # <<<<<<<<<<<<<<
 *         raise ValueError("no 'since' in unit_string")
 *     # parse the date string.
 */
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_timestr_split, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lower); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_since, Py_NE)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_10) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":17
 *     units = timestr_split[0].lower()
 *     if timestr_split[1].lower() != 'since':
 *         raise ValueError("no 'since' in unit_string")             # <<<<<<<<<<<<<<
 *     # parse the date string.
 *     n = timestr.find('since')+6
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __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[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":19
 *         raise ValueError("no 'since' in unit_string")
 *     # parse the date string.
 *     n = timestr.find('since')+6             # <<<<<<<<<<<<<<
 *     isostring = timestr[n:]
 *     basedate = dparse.parse(isostring)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_timestr, __pyx_n_s_find); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_7, __pyx_int_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_n = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":20
 *     # parse the date string.
 *     n = timestr.find('since')+6
 *     isostring = timestr[n:]             # <<<<<<<<<<<<<<
 *     basedate = dparse.parse(isostring)
 *     if basedate.tzinfo is None:
 */
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_timestr, 0, 0, &__pyx_v_n, NULL, NULL, 0, 0, 1); 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_v_isostring = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":21
 *     n = timestr.find('since')+6
 *     isostring = timestr[n:]
 *     basedate = dparse.parse(isostring)             # <<<<<<<<<<<<<<
 *     if basedate.tzinfo is None:
 *         basedate = basedate.replace(tzinfo=tzutc())
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dparse, __pyx_n_s_parse); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_isostring);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_isostring);
  __Pyx_GIVEREF(__pyx_v_isostring);
  __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 = 21; __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_v_basedate = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":22
 *     isostring = timestr[n:]
 *     basedate = dparse.parse(isostring)
 *     if basedate.tzinfo is None:             # <<<<<<<<<<<<<<
 *         basedate = basedate.replace(tzinfo=tzutc())
 *     return basedate
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_tzinfo); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_10 = (__pyx_t_4 == Py_None);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_11 = (__pyx_t_10 != 0);
  if (__pyx_t_11) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":23
 *     basedate = dparse.parse(isostring)
 *     if basedate.tzinfo is None:
 *         basedate = basedate.replace(tzinfo=tzutc())             # <<<<<<<<<<<<<<
 *     return basedate
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_basedate, __pyx_n_s_replace); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_tzutc, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_tzinfo, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_basedate, __pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L14;
  }
  __pyx_L14:;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":24
 *     if basedate.tzinfo is None:
 *         basedate = basedate.replace(tzinfo=tzutc())
 *     return basedate             # <<<<<<<<<<<<<<
 * 
 * # utility functions (visible from python).
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_basedate);
  __pyx_r = __pyx_v_basedate;
  goto __pyx_L0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":5
 * gregorian = datetime(1582,10,15)
 * 
 * def _dateparse(timestr):             # <<<<<<<<<<<<<<
 *     """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,
 *     return a datetime instance"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("netCDF4._dateparse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dparse);
  __Pyx_XDECREF(__pyx_v_tzutc);
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XDECREF(__pyx_v_timestr_split);
  __Pyx_XDECREF(__pyx_v_units);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_isostring);
  __Pyx_XDECREF(__pyx_v_basedate);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":28
 * # utility functions (visible from python).
 * 
 * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
 *     """
 * stringtoarr(a, NUMCHARS,dtype='S')
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_3stringtoarr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_2stringtoarr[] = "\nstringtoarr(a, NUMCHARS,dtype='S')\n\nconvert a string to a character array of length NUMCHARS\n\n@param a:  Input python string.\n\n@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@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 be returned.\n\n@return: A rank 1 numpy character array of length NUMCHARS with datatype 'S1'\n(default) or 'U1' (if dtype='U')";
static PyMethodDef __pyx_mdef_7netCDF4_3stringtoarr = {__Pyx_NAMESTR("stringtoarr"), (PyCFunction)__pyx_pw_7netCDF4_3stringtoarr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_2stringtoarr)};
static PyObject *__pyx_pw_7netCDF4_3stringtoarr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_string = 0;
  PyObject *__pyx_v_NUMCHARS = 0;
  PyObject *__pyx_v_dtype = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stringtoarr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_string,&__pyx_n_s_NUMCHARS,&__pyx_n_s_dtype,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)__pyx_n_s_S);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_string)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_NUMCHARS)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dtype);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "stringtoarr") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_string = values[0];
    __pyx_v_NUMCHARS = values[1];
    __pyx_v_dtype = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("stringtoarr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.stringtoarr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_2stringtoarr(__pyx_self, __pyx_v_string, __pyx_v_NUMCHARS, __pyx_v_dtype);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_2stringtoarr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string, PyObject *__pyx_v_NUMCHARS, PyObject *__pyx_v_dtype) {
  PyObject *__pyx_v_arr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("stringtoarr", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":45
 * @return: A rank 1 numpy character array of length NUMCHARS with datatype 'S1'
 * (default) or 'U1' (if dtype='U')"""
 *     if dtype not in ["S","U"]:             # <<<<<<<<<<<<<<
 *         raise ValueError("dtype must string or unicode ('S' or 'U')")
 *     arr = numpy.zeros(NUMCHARS,dtype+'1')
 */
  __Pyx_INCREF(__pyx_v_dtype);
  __pyx_t_1 = __pyx_v_dtype;
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_S, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {
    __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_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":46
 * (default) or 'U1' (if dtype='U')"""
 *     if dtype not in ["S","U"]:
 *         raise ValueError("dtype must string or unicode ('S' or 'U')")             # <<<<<<<<<<<<<<
 *     arr = numpy.zeros(NUMCHARS,dtype+'1')
 *     arr[0:len(string)] = tuple(string)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":47
 *     if dtype not in ["S","U"]:
 *         raise ValueError("dtype must string or unicode ('S' or 'U')")
 *     arr = numpy.zeros(NUMCHARS,dtype+'1')             # <<<<<<<<<<<<<<
 *     arr[0:len(string)] = tuple(string)
 *     return arr
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __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_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 = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_NUMCHARS);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_NUMCHARS);
  __Pyx_GIVEREF(__pyx_v_NUMCHARS);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, 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_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_arr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":48
 *         raise ValueError("dtype must string or unicode ('S' or 'U')")
 *     arr = numpy.zeros(NUMCHARS,dtype+'1')
 *     arr[0:len(string)] = tuple(string)             # <<<<<<<<<<<<<<
 *     return arr
 * 
 */
  __pyx_t_1 = PyTuple_New(1); 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_INCREF(__pyx_v_string);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_string);
  __Pyx_GIVEREF(__pyx_v_string);
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __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_6, 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_6); __pyx_t_6 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":49
 *     arr = numpy.zeros(NUMCHARS,dtype+'1')
 *     arr[0:len(string)] = tuple(string)
 *     return arr             # <<<<<<<<<<<<<<
 * 
 * def stringtochar(a):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_arr);
  __pyx_r = __pyx_v_arr;
  goto __pyx_L0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":28
 * # utility functions (visible from python).
 * 
 * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
 *     """
 * stringtoarr(a, NUMCHARS,dtype='S')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("netCDF4.stringtoarr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":51
 *     return arr
 * 
 * def stringtochar(a):             # <<<<<<<<<<<<<<
 *     """
 * stringtochar(a)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_5stringtochar(PyObject *__pyx_self, PyObject *__pyx_v_a); /*proto*/
static char __pyx_doc_7netCDF4_4stringtochar[] = "\nstringtochar(a)\n\nconvert a string array to a character array with one extra dimension\n\n@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@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 = {__Pyx_NAMESTR("stringtochar"), (PyCFunction)__pyx_pw_7netCDF4_5stringtochar, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_4stringtochar)};
static PyObject *__pyx_pw_7netCDF4_5stringtochar(PyObject *__pyx_self, PyObject *__pyx_v_a) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stringtochar (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_4stringtochar(__pyx_self, ((PyObject *)__pyx_v_a));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_4stringtochar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a) {
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  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("stringtochar", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":63
 * @return: A numpy character array with datatype 'S1' or 'U1'
 * and shape a.shape + (N,), where N is the length of each string in a."""
 *     dtype = a.dtype.kind             # <<<<<<<<<<<<<<
 *     if dtype not in ["S","U"]:
 *         raise ValueError("type must string or unicode ('S' or 'U')")
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dtype = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/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_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_S, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {
    __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_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_3;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = (__pyx_t_5 != 0);
  if (__pyx_t_3) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":65
 *     dtype = a.dtype.kind
 *     if dtype not in ["S","U"]:
 *         raise ValueError("type must string or unicode ('S' or 'U')")             # <<<<<<<<<<<<<<
 *     b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')
 *     b.shape = a.shape + (a.itemsize,)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":66
 *     if dtype not in ["S","U"]:
 *         raise ValueError("type must string or unicode ('S' or 'U')")
 *     b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')             # <<<<<<<<<<<<<<
 *     b.shape = a.shape + (a.itemsize,)
 *     return b
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); 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_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_tostring); 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_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); 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_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); 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_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_7 = PyTuple_New(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);
  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_t_2, __pyx_t_7, NULL); 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_2); __pyx_t_2 = 0;
  __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 = 66; __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(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_7, NULL); 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 = PyNumber_Add(__pyx_v_dtype, __pyx_kp_s_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_t_2 = PyTuple_New(2); 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);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_b = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":67
 *         raise ValueError("type must string or unicode ('S' or 'U')")
 *     b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')
 *     b.shape = a.shape + (a.itemsize,)             # <<<<<<<<<<<<<<
 *     return b
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_itemsize); 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_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __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 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_7, __pyx_t_1); 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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_b, __pyx_n_s_shape, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":68
 *     b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')
 *     b.shape = a.shape + (a.itemsize,)
 *     return b             # <<<<<<<<<<<<<<
 * 
 * def chartostring(b):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_b);
  __pyx_r = __pyx_v_b;
  goto __pyx_L0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":51
 *     return arr
 * 
 * def stringtochar(a):             # <<<<<<<<<<<<<<
 *     """
 * stringtochar(a)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __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;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":70
 *     return b
 * 
 * def chartostring(b):             # <<<<<<<<<<<<<<
 *     """
 * chartostring(b)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7chartostring(PyObject *__pyx_self, PyObject *__pyx_v_b); /*proto*/
static char __pyx_doc_7netCDF4_6chartostring[] = "\nchartostring(b)\n\nconvert a character array to a string array with one less dimension.\n\n@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@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 = {__Pyx_NAMESTR("chartostring"), (PyCFunction)__pyx_pw_7netCDF4_7chartostring, METH_O, __Pyx_DOCSTR(__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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  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);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":82
 * @return: A numpy string array with datatype 'SN' or 'UN' and shape b.shape[:-1],
 * where N=b.shape[-1]."""
 *     dtype = b.dtype.kind             # <<<<<<<<<<<<<<
 *     if dtype not in ["S","U"]:
 *         raise ValueError("type must string or unicode ('S' or 'U')")
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_kind); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dtype = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":83
 * where N=b.shape[-1]."""
 *     dtype = b.dtype.kind
 *     if dtype not in ["S","U"]:             # <<<<<<<<<<<<<<
 *         raise ValueError("type must string or unicode ('S' or 'U')")
 *     bs = b.tostring().decode(default_encoding)
 */
  __Pyx_INCREF(__pyx_v_dtype);
  __pyx_t_2 = __pyx_v_dtype;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_S, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {
    __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_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_3;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = (__pyx_t_5 != 0);
  if (__pyx_t_3) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":84
 *     dtype = b.dtype.kind
 *     if dtype not in ["S","U"]:
 *         raise ValueError("type must string or unicode ('S' or 'U')")             # <<<<<<<<<<<<<<
 *     bs = b.tostring().decode(default_encoding)
 *     slen = int(b.shape[-1])
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":85
 *     if dtype not in ["S","U"]:
 *         raise ValueError("type must string or unicode ('S' or 'U')")
 *     bs = b.tostring().decode(default_encoding)             # <<<<<<<<<<<<<<
 *     slen = int(b.shape[-1])
 *     a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_tostring); 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_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); 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_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); 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_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 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); 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_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_bs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":86
 *         raise ValueError("type must string or unicode ('S' or 'U')")
 *     bs = b.tostring().decode(default_encoding)
 *     slen = int(b.shape[-1])             # <<<<<<<<<<<<<<
 *     a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen))
 *     a.shape = b.shape[:-1]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_slen = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":87
 *     bs = b.tostring().decode(default_encoding)
 *     slen = int(b.shape[-1])
 *     a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen))             # <<<<<<<<<<<<<<
 *     a.shape = b.shape[:-1]
 *     return a
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(0); 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_7 = PyObject_Length(__pyx_v_bs); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); 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_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_slen);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_slen);
  __Pyx_GIVEREF(__pyx_v_slen);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_8, 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_8); __pyx_t_8 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_8 = __pyx_t_2; __Pyx_INCREF(__pyx_t_8); __pyx_t_7 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_8)) {
      if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_8)) {
      if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_9(__pyx_t_8);
      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 = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_n1, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_v_n1, __pyx_v_slen); 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_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_bs, 0, 0, &__pyx_v_n1, &__pyx_t_2, 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_2); __pyx_t_2 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (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_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_Repr(__pyx_v_slen); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = PyNumber_Add(__pyx_v_dtype, __pyx_t_8); 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_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_1 = 0;
  __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); 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_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_a = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":88
 *     slen = int(b.shape[-1])
 *     a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen))
 *     a.shape = b.shape[:-1]             # <<<<<<<<<<<<<<
 *     return a
 * 
 */
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_shape); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_10, 0, -1, NULL, NULL, &__pyx_slice__7, 0, 1, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_shape, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":89
 *     a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen))
 *     a.shape = b.shape[:-1]
 *     return a             # <<<<<<<<<<<<<<
 * 
 * def date2num(dates,units,calendar='standard'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_a);
  __pyx_r = __pyx_v_a;
  goto __pyx_L0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":70
 *     return b
 * 
 * def chartostring(b):             # <<<<<<<<<<<<<<
 *     """
 * chartostring(b)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __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;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":91
 *     return a
 * 
 * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
 *     """
 * date2num(dates,units,calendar='standard')
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9date2num(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_8date2num[] = "\ndate2num(dates,units,calendar='standard')\n\nReturn numeric time values given datetime objects. The units\nof the numeric time values are described by the L{units} argument\nand the L{calendar} keyword. The datetime objects must\nbe in UTC with no time-zone offset.  If there is a \ntime-zone offset in C{units}, it will be applied to the\nreturned numeric values.\n\n@param dates: A datetime object or a sequence of datetime objects.\nThe datetime objects should not include a time-zone offset.\n\n@param units: a string of the form C{'B{time units} since B{reference time}}'\ndescribing the time units. B{C{time units}} can be days, hours, minutes,\nseconds, milliseconds or microseconds. B{C{reference time}} is the time\norigin. Milliseconds and microseconds\ncan only be used with the proleptic_gregorian calendar, or the standard\nand gregorian calendars if the time origin is after 1582-10-15.\nA valid choice would be units=C{'milliseconds since 1800-01-01 00:00:00-6:00'}.\n\n@param calendar: describes the calendar used in the time calculations. \nAll the values currently defined in the U{CF metadata convention \n<http://cf-pcmdi.llnl.gov/documents/cf-conventions/>} are supported.\nValid calendars C{'standard', 'gregorian', 'proleptic_gregorian'\n'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.\nDefault is C{'standard'}, which is a mixed Julian/Gregorian calendar.\n\n@return: a numeric time value, or an array of numeric time values.\n    ";
static PyMethodDef __pyx_mdef_7netCDF4_9date2num = {__Pyx_NAMESTR("date2num"), (PyCFunction)__pyx_pw_7netCDF4_9date2num, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8date2num)};
static PyObject *__pyx_pw_7netCDF4_9date2num(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dates = 0;
  PyObject *__pyx_v_units = 0;
  PyObject *__pyx_v_calendar = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("date2num (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dates,&__pyx_n_s_units,&__pyx_n_s_calendar,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)__pyx_n_s_standard);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dates)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_units)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("date2num", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_calendar);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2num") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dates = values[0];
    __pyx_v_units = values[1];
    __pyx_v_calendar = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("date2num", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_8date2num(__pyx_self, __pyx_v_dates, __pyx_v_units, __pyx_v_calendar);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8date2num(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar) {
  PyObject *__pyx_v_unit = NULL;
  PyObject *__pyx_v_basedate = NULL;
  PyObject *__pyx_v_tzutc = NULL;
  PyObject *__pyx_v_msg = NULL;
  int __pyx_v_isscalar;
  int __pyx_v_ismasked;
  CYTHON_UNUSED PyObject *__pyx_v_mask = NULL;
  PyObject *__pyx_v_times = NULL;
  PyObject *__pyx_v_date = NULL;
  PyObject *__pyx_v_td = NULL;
  PyObject *__pyx_v_totaltime = NULL;
  PyObject *__pyx_v_cdftime = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_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("date2num", 0);
  __Pyx_INCREF(__pyx_v_dates);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":122
 * @return: a numeric time value, or an array of numeric time values.
 *     """
 *     unit = units.split()[0].lower()             # <<<<<<<<<<<<<<
 *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
 *         basedate = _dateparse(units)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_unit = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":123
 *     """
 *     unit = units.split()[0].lower()
 *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:             # <<<<<<<<<<<<<<
 *         basedate = _dateparse(units)
 *         from dateutil.tz import tzutc
 */
  __Pyx_INCREF(__pyx_v_unit);
  __pyx_t_1 = __pyx_v_unit;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_microseconds, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_3) {
    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_milliseconds, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_3;
  }
  if (!__pyx_t_5) {
    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_microsecond, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_5;
  }
  if (!__pyx_t_4) {
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_millisecond, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_t_5;
  } else {
    __pyx_t_3 = __pyx_t_4;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":124
 *     unit = units.split()[0].lower()
 *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
 *         basedate = _dateparse(units)             # <<<<<<<<<<<<<<
 *         from dateutil.tz import tzutc
 *         if calendar != 'proleptic_gregorian' and not \
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_units);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_units);
    __Pyx_GIVEREF(__pyx_v_units);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __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_2); __pyx_t_2 = 0;
    __pyx_v_basedate = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":125
 *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
 *         basedate = _dateparse(units)
 *         from dateutil.tz import tzutc             # <<<<<<<<<<<<<<
 *         if calendar != 'proleptic_gregorian' and not \
 *            (calendar in ['gregorian','standard'] and \
 */
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_n_s_tzutc);
    PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_tzutc);
    __Pyx_GIVEREF(__pyx_n_s_tzutc);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_dateutil_tz, __pyx_t_6, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tzutc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_v_tzutc = __pyx_t_6;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":126
 *         basedate = _dateparse(units)
 *         from dateutil.tz import tzutc
 *         if calendar != 'proleptic_gregorian' and not \             # <<<<<<<<<<<<<<
 *            (calendar in ['gregorian','standard'] and \
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 */
    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":127
 *         from dateutil.tz import tzutc
 *         if calendar != 'proleptic_gregorian' and not \
 *            (calendar in ['gregorian','standard'] and \             # <<<<<<<<<<<<<<
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 *             msg = 'milliseconds/microseconds not supported for this calendar'
 */
      __Pyx_INCREF(__pyx_v_calendar);
      __pyx_t_2 = __pyx_v_calendar;
      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_3) {
        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = __pyx_t_5;
      } else {
        __pyx_t_7 = __pyx_t_3;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_3 = __pyx_t_7;
      if (__pyx_t_3) {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":128
 *         if calendar != 'proleptic_gregorian' and not \
 *            (calendar in ['gregorian','standard'] and \
 *             basedate > gregorian.replace(tzinfo=tzutc())):             # <<<<<<<<<<<<<<
 *             msg = 'milliseconds/microseconds not supported for this calendar'
 *             raise ValueError(msg)
 */
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_tzutc, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tzinfo, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_5 = __pyx_t_7;
      } else {
        __pyx_t_5 = __pyx_t_3;
      }

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":126
 *         basedate = _dateparse(units)
 *         from dateutil.tz import tzutc
 *         if calendar != 'proleptic_gregorian' and not \             # <<<<<<<<<<<<<<
 *            (calendar in ['gregorian','standard'] and \
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 */
      __pyx_t_3 = (!__pyx_t_5);
      __pyx_t_5 = __pyx_t_3;
    } else {
      __pyx_t_5 = __pyx_t_4;
    }
    if (__pyx_t_5) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":129
 *            (calendar in ['gregorian','standard'] and \
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 *             msg = 'milliseconds/microseconds not supported for this calendar'             # <<<<<<<<<<<<<<
 *             raise ValueError(msg)
 *         # use python datetime module,
 */
      __Pyx_INCREF(__pyx_kp_s_milliseconds_microseconds_not_su);
      __pyx_v_msg = __pyx_kp_s_milliseconds_microseconds_not_su;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":130
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 *             msg = 'milliseconds/microseconds not supported for this calendar'
 *             raise ValueError(msg)             # <<<<<<<<<<<<<<
 *         # use python datetime module,
 *         isscalar = False
 */
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_msg);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg);
      __Pyx_GIVEREF(__pyx_v_msg);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":132
 *             raise ValueError(msg)
 *         # use python datetime module,
 *         isscalar = False             # <<<<<<<<<<<<<<
 *         try:
 *             dates[0]
 */
    __pyx_v_isscalar = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":133
 *         # use python datetime module,
 *         isscalar = False
 *         try:             # <<<<<<<<<<<<<<
 *             dates[0]
 *         except:
 */
    {
      __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:*/ {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":134
 *         isscalar = False
 *         try:
 *             dates[0]             # <<<<<<<<<<<<<<
 *         except:
 *             isscalar = True
 */
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_dates, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L5_error;};
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":135
 *         try:
 *             dates[0]
 *         except:             # <<<<<<<<<<<<<<
 *             isscalar = True
 *         if isscalar: dates = [dates]
 */
      /*except:*/ {
        __Pyx_AddTraceback("netCDF4.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_6);

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":136
 *             dates[0]
 *         except:
 *             isscalar = True             # <<<<<<<<<<<<<<
 *         if isscalar: dates = [dates]
 *         ismasked = False
 */
        __pyx_v_isscalar = 1;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L6_exception_handled;
      }
      __pyx_L7_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_L6_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_L12_try_end:;
    }

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":137
 *         except:
 *             isscalar = True
 *         if isscalar: dates = [dates]             # <<<<<<<<<<<<<<
 *         ismasked = False
 *         if hasattr(dates,'mask'):
 */
    __pyx_t_5 = (__pyx_v_isscalar != 0);
    if (__pyx_t_5) {
      __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_dates);
      PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v_dates);
      __Pyx_GIVEREF(__pyx_v_dates);
      __Pyx_DECREF_SET(__pyx_v_dates, __pyx_t_6);
      __pyx_t_6 = 0;
      goto __pyx_L15;
    }
    __pyx_L15:;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":138
 *             isscalar = True
 *         if isscalar: dates = [dates]
 *         ismasked = False             # <<<<<<<<<<<<<<
 *         if hasattr(dates,'mask'):
 *             mask = dates.mask
 */
    __pyx_v_ismasked = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":139
 *         if isscalar: dates = [dates]
 *         ismasked = False
 *         if hasattr(dates,'mask'):             # <<<<<<<<<<<<<<
 *             mask = dates.mask
 *             ismasked = True
 */
    __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 = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = (__pyx_t_5 != 0);
    if (__pyx_t_4) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":140
 *         ismasked = False
 *         if hasattr(dates,'mask'):
 *             mask = dates.mask             # <<<<<<<<<<<<<<
 *             ismasked = True
 *         times = []
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_dates, __pyx_n_s_mask); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_v_mask = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":141
 *         if hasattr(dates,'mask'):
 *             mask = dates.mask
 *             ismasked = True             # <<<<<<<<<<<<<<
 *         times = []
 *         for date in dates:
 */
      __pyx_v_ismasked = 1;
      goto __pyx_L16;
    }
    __pyx_L16:;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":142
 *             mask = dates.mask
 *             ismasked = True
 *         times = []             # <<<<<<<<<<<<<<
 *         for date in dates:
 *             if ismasked and not date:
 */
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_times = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":143
 *             ismasked = True
 *         times = []
 *         for date in dates:             # <<<<<<<<<<<<<<
 *             if ismasked and not date:
 *                 times.append(None)
 */
    if (PyList_CheckExact(__pyx_v_dates) || PyTuple_CheckExact(__pyx_v_dates)) {
      __pyx_t_6 = __pyx_v_dates; __Pyx_INCREF(__pyx_t_6); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_dates); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_6)) {
        if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_6)) {
        if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_6);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_date, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":144
 *         times = []
 *         for date in dates:
 *             if ismasked and not date:             # <<<<<<<<<<<<<<
 *                 times.append(None)
 *             else:
 */
      if ((__pyx_v_ismasked != 0)) {
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_5 = ((!__pyx_t_4) != 0);
        __pyx_t_4 = __pyx_t_5;
      } else {
        __pyx_t_4 = (__pyx_v_ismasked != 0);
      }
      if (__pyx_t_4) {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":145
 *         for date in dates:
 *             if ismasked and not date:
 *                 times.append(None)             # <<<<<<<<<<<<<<
 *             else:
 *                 date = date.replace(tzinfo=tzutc())
 */
        __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_times, Py_None); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L19;
      }
      /*else*/ {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":147
 *                 times.append(None)
 *             else:
 *                 date = date.replace(tzinfo=tzutc())             # <<<<<<<<<<<<<<
 *                 td = date - basedate
 *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_date, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = PyDict_New(); 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_14 = __Pyx_PyObject_Call(__pyx_v_tzutc, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_14);
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_tzinfo, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 147; __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_1); __pyx_t_1 = 0;
        __Pyx_DECREF_SET(__pyx_v_date, __pyx_t_14);
        __pyx_t_14 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":148
 *             else:
 *                 date = date.replace(tzinfo=tzutc())
 *                 td = date - basedate             # <<<<<<<<<<<<<<
 *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
 *                 if unit == 'microseconds' or unit == 'microsecond':
 */
        __pyx_t_14 = PyNumber_Subtract(__pyx_v_date, __pyx_v_basedate); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_14);
        __pyx_t_14 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":149
 *                 date = date.replace(tzinfo=tzutc())
 *                 td = date - basedate
 *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6             # <<<<<<<<<<<<<<
 *                 if unit == 'microseconds' or unit == 'microsecond':
 *                     times.append(totaltime)
 */
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_td, __pyx_n_s_seconds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __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[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_15 = PyNumber_Multiply(__pyx_t_2, __pyx_int_24); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyNumber_Multiply(__pyx_t_15, __pyx_int_3600); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __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_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyNumber_Multiply(__pyx_t_15, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyNumber_Add(__pyx_t_14, __pyx_t_2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_totaltime, __pyx_t_15);
        __pyx_t_15 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":150
 *                 td = date - basedate
 *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
 *                 if unit == 'microseconds' or unit == 'microsecond':             # <<<<<<<<<<<<<<
 *                     times.append(totaltime)
 *                 elif unit == 'milliseconds' or unit == 'millisecond':
 */
        __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_microseconds, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (!__pyx_t_4) {
          __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_microsecond, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_3 = __pyx_t_5;
        } else {
          __pyx_t_3 = __pyx_t_4;
        }
        if (__pyx_t_3) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":151
 *                 totaltime = td.microseconds + (td.seconds + td.days * 24 * 3600) * 1.e6
 *                 if unit == 'microseconds' or unit == 'microsecond':
 *                     times.append(totaltime)             # <<<<<<<<<<<<<<
 *                 elif unit == 'milliseconds' or unit == 'millisecond':
 *                     times.append(totaltime/1.e3)
 */
          __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_times, __pyx_v_totaltime); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L20;
        }

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":152
 *                 if unit == 'microseconds' or unit == 'microsecond':
 *                     times.append(totaltime)
 *                 elif unit == 'milliseconds' or unit == 'millisecond':             # <<<<<<<<<<<<<<
 *                     times.append(totaltime/1.e3)
 *                 elif unit == 'seconds' or unit == 'second':
 */
        __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_milliseconds, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (!__pyx_t_3) {
          __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_millisecond, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_5 = __pyx_t_4;
        } else {
          __pyx_t_5 = __pyx_t_3;
        }
        if (__pyx_t_5) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":153
 *                     times.append(totaltime)
 *                 elif unit == 'milliseconds' or unit == 'millisecond':
 *                     times.append(totaltime/1.e3)             # <<<<<<<<<<<<<<
 *                 elif unit == 'seconds' or unit == 'second':
 *                     times.append(totaltime/1.e6)
 */
          __pyx_t_15 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e3); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_15); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          goto __pyx_L20;
        }

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":154
 *                 elif unit == 'milliseconds' or unit == 'millisecond':
 *                     times.append(totaltime/1.e3)
 *                 elif unit == 'seconds' or unit == 'second':             # <<<<<<<<<<<<<<
 *                     times.append(totaltime/1.e6)
 *                 elif unit == 'hours' or unit == 'hour':
 */
        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_seconds, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (!__pyx_t_5) {
          __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_second, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_4 = __pyx_t_3;
        } else {
          __pyx_t_4 = __pyx_t_5;
        }
        if (__pyx_t_4) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":155
 *                     times.append(totaltime/1.e3)
 *                 elif unit == 'seconds' or unit == 'second':
 *                     times.append(totaltime/1.e6)             # <<<<<<<<<<<<<<
 *                 elif unit == 'hours' or unit == 'hour':
 *                     times.append(totaltime/1.e6/3600)
 */
          __pyx_t_15 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_15); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          goto __pyx_L20;
        }

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":156
 *                 elif unit == 'seconds' or unit == 'second':
 *                     times.append(totaltime/1.e6)
 *                 elif unit == 'hours' or unit == 'hour':             # <<<<<<<<<<<<<<
 *                     times.append(totaltime/1.e6/3600)
 *                 elif unit == 'days' or unit == 'day':
 */
        __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_hours, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (!__pyx_t_4) {
          __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_hour, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_3 = __pyx_t_5;
        } else {
          __pyx_t_3 = __pyx_t_4;
        }
        if (__pyx_t_3) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":157
 *                     times.append(totaltime/1.e6)
 *                 elif unit == 'hours' or unit == 'hour':
 *                     times.append(totaltime/1.e6/3600)             # <<<<<<<<<<<<<<
 *                 elif unit == 'days' or unit == 'day':
 *                     times.append(totaltime/1.e6/3600./24.)
 */
          __pyx_t_15 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_15, __pyx_int_3600); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_2); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L20;
        }

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/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_3 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_days, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (!__pyx_t_3) {
          __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_day, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_5 = __pyx_t_4;
        } else {
          __pyx_t_5 = __pyx_t_3;
        }
        if (__pyx_t_5) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":159
 *                     times.append(totaltime/1.e6/3600)
 *                 elif unit == 'days' or unit == 'day':
 *                     times.append(totaltime/1.e6/3600./24.)             # <<<<<<<<<<<<<<
 *         if isscalar:
 *             return times[0]
 */
          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_totaltime, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_15 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_float_3600_); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_15, __pyx_float_24_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_times, __pyx_t_2); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L20;
        }
        __pyx_L20:;
      }
      __pyx_L19:;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":160
 *                 elif unit == 'days' or unit == 'day':
 *                     times.append(totaltime/1.e6/3600./24.)
 *         if isscalar:             # <<<<<<<<<<<<<<
 *             return times[0]
 *         else:
 */
    __pyx_t_5 = (__pyx_v_isscalar != 0);
    if (__pyx_t_5) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":161
 *                     times.append(totaltime/1.e6/3600./24.)
 *         if isscalar:
 *             return times[0]             # <<<<<<<<<<<<<<
 *         else:
 *             return times
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_times, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":163
 *             return times[0]
 *         else:
 *             return times             # <<<<<<<<<<<<<<
 *     else: # if only second accuracy required, can use other calendars.
 *         cdftime = netcdftime.utime(units,calendar=calendar)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_times);
      __pyx_r = __pyx_v_times;
      goto __pyx_L0;
    }
  }
  /*else*/ {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":165
 *             return times
 *     else: # if only second accuracy required, can use other calendars.
 *         cdftime = netcdftime.utime(units,calendar=calendar)             # <<<<<<<<<<<<<<
 *         return cdftime.date2num(dates)
 * 
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __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_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_units);
    PyTuple_SET_ITEM(__pyx_t_6, 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_14 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __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_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_v_cdftime = __pyx_t_14;
    __pyx_t_14 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":166
 *     else: # if only second accuracy required, can use other calendars.
 *         cdftime = netcdftime.utime(units,calendar=calendar)
 *         return cdftime.date2num(dates)             # <<<<<<<<<<<<<<
 * 
 * def num2date(times,units,calendar='standard'):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_date2num); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = PyTuple_New(1); 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_INCREF(__pyx_v_dates);
    PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_dates);
    __Pyx_GIVEREF(__pyx_v_dates);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":91
 *     return a
 * 
 * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
 *     """
 * date2num(dates,units,calendar='standard')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("netCDF4.date2num", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_unit);
  __Pyx_XDECREF(__pyx_v_basedate);
  __Pyx_XDECREF(__pyx_v_tzutc);
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XDECREF(__pyx_v_mask);
  __Pyx_XDECREF(__pyx_v_times);
  __Pyx_XDECREF(__pyx_v_date);
  __Pyx_XDECREF(__pyx_v_td);
  __Pyx_XDECREF(__pyx_v_totaltime);
  __Pyx_XDECREF(__pyx_v_cdftime);
  __Pyx_XDECREF(__pyx_v_dates);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":168
 *         return cdftime.date2num(dates)
 * 
 * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
 *     """
 * num2date(times,units,calendar='standard')
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_11num2date(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_10num2date[] = "\nnum2date(times,units,calendar='standard')\n\nReturn datetime objects given numeric time values. The units\nof the numeric time values are described by the C{units} argument\nand the C{calendar} keyword. The returned datetime objects represent \nUTC with no time-zone offset, even if the specified \nC{units} contain a time-zone offset.\n\n@param times: numeric time values. \n\n@param units: a string of the form C{'B{time units} since B{reference time}}'\ndescribing the time units. B{C{time units}} can be days, hours, minutes,\nseconds, milliseconds or microseconds. B{C{reference time}} is the time\norigin. Milliseconds and microseconds\ncan only be used with the proleptic_gregorian calendar, or the standard\nand gregorian calendars if the time origin is after 1582-10-15.\nA valid choice would be units=C{'milliseconds since 1800-01-01 00:00:00-6:00'}.\n\n@keyword calendar: describes the calendar used in the time calculations. \nAll the values currently defined in the U{CF metadata convention \n<http://cf-pcmdi.llnl.gov/documents/cf-conventions/>} are supported.\nValid calendars C{'standard', 'gregorian', 'proleptic_gregorian'\n'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.\nDefault is C{'standard'}, which is a mixed Julian/Gregorian calendar.\n\n@return: a datetime instance, or an array of datetime instances.\n\nThe datetime instances returned are 'real' python datetime \nobjects if the date falls in the Gregorian calendar (i.e. \nC{calendar='proleptic_gregorian'}, or C{calendar = 'standard'} or C{'gregorian'}\nand the date is after 1582-10-15). Otherwise, they are 'phony' datetime \nobjects which support some but not all the methods of 'real' python\ndatetime objects.  This is because the python datetime module cannot\nthe uses the C{'proleptic_gregorian'} calendar, even before the switch\noccured from the Julian calendar in 1582. The datetime instances\ndo not contain a time-zone offset, even if the specified C{units}\ncontains one.\n    ";
static PyMethodDef __pyx_mdef_7netCDF4_11num2date = {__Pyx_NAMESTR("num2date"), (PyCFunction)__pyx_pw_7netCDF4_11num2date, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_10num2date)};
static PyObject *__pyx_pw_7netCDF4_11num2date(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_times = 0;
  PyObject *__pyx_v_units = 0;
  PyObject *__pyx_v_calendar = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("num2date (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_times,&__pyx_n_s_units,&__pyx_n_s_calendar,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)__pyx_n_s_standard);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_times)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_units)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_calendar);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "num2date") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_times = values[0];
    __pyx_v_units = values[1];
    __pyx_v_calendar = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("num2date", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_10num2date(__pyx_self, __pyx_v_times, __pyx_v_units, __pyx_v_calendar);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_10num2date(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_times, PyObject *__pyx_v_units, PyObject *__pyx_v_calendar) {
  PyObject *__pyx_v_unit = NULL;
  PyObject *__pyx_v_basedate = NULL;
  PyObject *__pyx_v_tzutc = NULL;
  PyObject *__pyx_v_msg = NULL;
  int __pyx_v_isscalar;
  int __pyx_v_ismasked;
  CYTHON_UNUSED PyObject *__pyx_v_mask = NULL;
  PyObject *__pyx_v_dates = NULL;
  PyObject *__pyx_v_time = NULL;
  PyObject *__pyx_v_tsecs = NULL;
  PyObject *__pyx_v_days = NULL;
  PyObject *__pyx_v_msecsd = NULL;
  PyObject *__pyx_v_secs = NULL;
  PyObject *__pyx_v_msecs = NULL;
  PyObject *__pyx_v_td = NULL;
  PyObject *__pyx_v_date = NULL;
  PyObject *__pyx_v_cdftime = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("num2date", 0);
  __Pyx_INCREF(__pyx_v_times);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":208
 * contains one.
 *     """
 *     unit = units.split()[0].lower()             # <<<<<<<<<<<<<<
 *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
 *         basedate = _dateparse(units)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_units, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_unit = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":209
 *     """
 *     unit = units.split()[0].lower()
 *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:             # <<<<<<<<<<<<<<
 *         basedate = _dateparse(units)
 *         from dateutil.tz import tzutc
 */
  __Pyx_INCREF(__pyx_v_unit);
  __pyx_t_1 = __pyx_v_unit;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_microseconds, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_3) {
    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_milliseconds, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_3;
  }
  if (!__pyx_t_5) {
    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_microsecond, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_5;
  }
  if (!__pyx_t_4) {
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_millisecond, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_t_5;
  } else {
    __pyx_t_3 = __pyx_t_4;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":210
 *     unit = units.split()[0].lower()
 *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
 *         basedate = _dateparse(units)             # <<<<<<<<<<<<<<
 *         from dateutil.tz import tzutc
 *         if calendar != 'proleptic_gregorian' and not \
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_units);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_units);
    __Pyx_GIVEREF(__pyx_v_units);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __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_2); __pyx_t_2 = 0;
    __pyx_v_basedate = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":211
 *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
 *         basedate = _dateparse(units)
 *         from dateutil.tz import tzutc             # <<<<<<<<<<<<<<
 *         if calendar != 'proleptic_gregorian' and not \
 *            (calendar in ['gregorian','standard'] and \
 */
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_n_s_tzutc);
    PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_tzutc);
    __Pyx_GIVEREF(__pyx_n_s_tzutc);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_dateutil_tz, __pyx_t_6, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tzutc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_6);
    __pyx_v_tzutc = __pyx_t_6;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":212
 *         basedate = _dateparse(units)
 *         from dateutil.tz import tzutc
 *         if calendar != 'proleptic_gregorian' and not \             # <<<<<<<<<<<<<<
 *            (calendar in ['gregorian','standard'] and \
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 */
    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":213
 *         from dateutil.tz import tzutc
 *         if calendar != 'proleptic_gregorian' and not \
 *            (calendar in ['gregorian','standard'] and \             # <<<<<<<<<<<<<<
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 *             msg = 'milliseconds/microseconds not supported for this calendar'
 */
      __Pyx_INCREF(__pyx_v_calendar);
      __pyx_t_2 = __pyx_v_calendar;
      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_3) {
        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = __pyx_t_5;
      } else {
        __pyx_t_7 = __pyx_t_3;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_3 = __pyx_t_7;
      if (__pyx_t_3) {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":214
 *         if calendar != 'proleptic_gregorian' and not \
 *            (calendar in ['gregorian','standard'] and \
 *             basedate > gregorian.replace(tzinfo=tzutc())):             # <<<<<<<<<<<<<<
 *             msg = 'milliseconds/microseconds not supported for this calendar'
 *             raise ValueError(msg)
 */
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_tzutc, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tzinfo, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_5 = __pyx_t_7;
      } else {
        __pyx_t_5 = __pyx_t_3;
      }

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":212
 *         basedate = _dateparse(units)
 *         from dateutil.tz import tzutc
 *         if calendar != 'proleptic_gregorian' and not \             # <<<<<<<<<<<<<<
 *            (calendar in ['gregorian','standard'] and \
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 */
      __pyx_t_3 = (!__pyx_t_5);
      __pyx_t_5 = __pyx_t_3;
    } else {
      __pyx_t_5 = __pyx_t_4;
    }
    if (__pyx_t_5) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":215
 *            (calendar in ['gregorian','standard'] and \
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 *             msg = 'milliseconds/microseconds not supported for this calendar'             # <<<<<<<<<<<<<<
 *             raise ValueError(msg)
 *         isscalar = False
 */
      __Pyx_INCREF(__pyx_kp_s_milliseconds_microseconds_not_su);
      __pyx_v_msg = __pyx_kp_s_milliseconds_microseconds_not_su;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":216
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 *             msg = 'milliseconds/microseconds not supported for this calendar'
 *             raise ValueError(msg)             # <<<<<<<<<<<<<<
 *         isscalar = False
 *         try:
 */
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_msg);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg);
      __Pyx_GIVEREF(__pyx_v_msg);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":217
 *             msg = 'milliseconds/microseconds not supported for this calendar'
 *             raise ValueError(msg)
 *         isscalar = False             # <<<<<<<<<<<<<<
 *         try:
 *             times[0]
 */
    __pyx_v_isscalar = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":218
 *             raise ValueError(msg)
 *         isscalar = False
 *         try:             # <<<<<<<<<<<<<<
 *             times[0]
 *         except:
 */
    {
      __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:*/ {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":219
 *         isscalar = False
 *         try:
 *             times[0]             # <<<<<<<<<<<<<<
 *         except:
 *             isscalar = True
 */
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_times, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L5_error;};
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":220
 *         try:
 *             times[0]
 *         except:             # <<<<<<<<<<<<<<
 *             isscalar = True
 *         if isscalar: times = [times]
 */
      /*except:*/ {
        __Pyx_AddTraceback("netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_6);

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":221
 *             times[0]
 *         except:
 *             isscalar = True             # <<<<<<<<<<<<<<
 *         if isscalar: times = [times]
 *         ismasked = False
 */
        __pyx_v_isscalar = 1;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L6_exception_handled;
      }
      __pyx_L7_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_L6_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_L12_try_end:;
    }

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":222
 *         except:
 *             isscalar = True
 *         if isscalar: times = [times]             # <<<<<<<<<<<<<<
 *         ismasked = False
 *         if hasattr(times,'mask'):
 */
    __pyx_t_5 = (__pyx_v_isscalar != 0);
    if (__pyx_t_5) {
      __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_times);
      PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v_times);
      __Pyx_GIVEREF(__pyx_v_times);
      __Pyx_DECREF_SET(__pyx_v_times, __pyx_t_6);
      __pyx_t_6 = 0;
      goto __pyx_L15;
    }
    __pyx_L15:;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":223
 *             isscalar = True
 *         if isscalar: times = [times]
 *         ismasked = False             # <<<<<<<<<<<<<<
 *         if hasattr(times,'mask'):
 *             mask = times.mask
 */
    __pyx_v_ismasked = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":224
 *         if isscalar: times = [times]
 *         ismasked = False
 *         if hasattr(times,'mask'):             # <<<<<<<<<<<<<<
 *             mask = times.mask
 *             ismasked = True
 */
    __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 = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = (__pyx_t_5 != 0);
    if (__pyx_t_4) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":225
 *         ismasked = False
 *         if hasattr(times,'mask'):
 *             mask = times.mask             # <<<<<<<<<<<<<<
 *             ismasked = True
 *         dates = []
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_times, __pyx_n_s_mask); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_v_mask = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":226
 *         if hasattr(times,'mask'):
 *             mask = times.mask
 *             ismasked = True             # <<<<<<<<<<<<<<
 *         dates = []
 *         for time in times:
 */
      __pyx_v_ismasked = 1;
      goto __pyx_L16;
    }
    __pyx_L16:;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":227
 *             mask = times.mask
 *             ismasked = True
 *         dates = []             # <<<<<<<<<<<<<<
 *         for time in times:
 *             if ismasked and not time:
 */
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_dates = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":228
 *             ismasked = True
 *         dates = []
 *         for time in times:             # <<<<<<<<<<<<<<
 *             if ismasked and not time:
 *                 dates.append(None)
 */
    if (PyList_CheckExact(__pyx_v_times) || PyTuple_CheckExact(__pyx_v_times)) {
      __pyx_t_6 = __pyx_v_times; __Pyx_INCREF(__pyx_t_6); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_times); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_6)) {
        if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_6)) {
        if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_6);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_time, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":229
 *         dates = []
 *         for time in times:
 *             if ismasked and not time:             # <<<<<<<<<<<<<<
 *                 dates.append(None)
 *             else:
 */
      if ((__pyx_v_ismasked != 0)) {
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_time); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_5 = ((!__pyx_t_4) != 0);
        __pyx_t_4 = __pyx_t_5;
      } else {
        __pyx_t_4 = (__pyx_v_ismasked != 0);
      }
      if (__pyx_t_4) {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":230
 *         for time in times:
 *             if ismasked and not time:
 *                 dates.append(None)             # <<<<<<<<<<<<<<
 *             else:
 *                 # convert to total seconds
 */
        __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_dates, Py_None); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L19;
      }
      /*else*/ {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":233
 *             else:
 *                 # convert to total seconds
 *                 if unit == 'microseconds' or unit == 'microsecond':             # <<<<<<<<<<<<<<
 *                     tsecs = time/1.e6
 *                 elif unit == 'milliseconds' or unit == 'millisecond':
 */
        __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_microseconds, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (!__pyx_t_4) {
          __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_microsecond, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_3 = __pyx_t_5;
        } else {
          __pyx_t_3 = __pyx_t_4;
        }
        if (__pyx_t_3) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":234
 *                 # convert to total seconds
 *                 if unit == 'microseconds' or unit == 'microsecond':
 *                     tsecs = time/1.e6             # <<<<<<<<<<<<<<
 *                 elif unit == 'milliseconds' or unit == 'millisecond':
 *                     tsecs = time/1.e3
 */
          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_time, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_2);
          __pyx_t_2 = 0;
          goto __pyx_L20;
        }

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":235
 *                 if unit == 'microseconds' or unit == 'microsecond':
 *                     tsecs = time/1.e6
 *                 elif unit == 'milliseconds' or unit == 'millisecond':             # <<<<<<<<<<<<<<
 *                     tsecs = time/1.e3
 *                 elif unit == 'seconds' or unit == 'second':
 */
        __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_milliseconds, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (!__pyx_t_3) {
          __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_millisecond, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_5 = __pyx_t_4;
        } else {
          __pyx_t_5 = __pyx_t_3;
        }
        if (__pyx_t_5) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":236
 *                     tsecs = time/1.e6
 *                 elif unit == 'milliseconds' or unit == 'millisecond':
 *                     tsecs = time/1.e3             # <<<<<<<<<<<<<<
 *                 elif unit == 'seconds' or unit == 'second':
 *                     tsecs = time
 */
          __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_time, __pyx_float_1_e3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_2);
          __pyx_t_2 = 0;
          goto __pyx_L20;
        }

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":237
 *                 elif unit == 'milliseconds' or unit == 'millisecond':
 *                     tsecs = time/1.e3
 *                 elif unit == 'seconds' or unit == 'second':             # <<<<<<<<<<<<<<
 *                     tsecs = time
 *                 elif unit == 'hours' or unit == 'hour':
 */
        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_seconds, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (!__pyx_t_5) {
          __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_second, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_4 = __pyx_t_3;
        } else {
          __pyx_t_4 = __pyx_t_5;
        }
        if (__pyx_t_4) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":238
 *                     tsecs = time/1.e3
 *                 elif unit == 'seconds' or unit == 'second':
 *                     tsecs = time             # <<<<<<<<<<<<<<
 *                 elif unit == 'hours' or unit == 'hour':
 *                     tsecs = time*3600.
 */
          __Pyx_INCREF(__pyx_v_time);
          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_v_time);
          goto __pyx_L20;
        }

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":239
 *                 elif unit == 'seconds' or unit == 'second':
 *                     tsecs = time
 *                 elif unit == 'hours' or unit == 'hour':             # <<<<<<<<<<<<<<
 *                     tsecs = time*3600.
 *                 elif unit == 'days' or unit == 'day':
 */
        __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_hours, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (!__pyx_t_4) {
          __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_hour, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_3 = __pyx_t_5;
        } else {
          __pyx_t_3 = __pyx_t_4;
        }
        if (__pyx_t_3) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":240
 *                     tsecs = time
 *                 elif unit == 'hours' or unit == 'hour':
 *                     tsecs = time*3600.             # <<<<<<<<<<<<<<
 *                 elif unit == 'days' or unit == 'day':
 *                     tsecs = time*86400.
 */
          __pyx_t_2 = PyNumber_Multiply(__pyx_v_time, __pyx_float_3600_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_2);
          __pyx_t_2 = 0;
          goto __pyx_L20;
        }

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":241
 *                 elif unit == 'hours' or unit == 'hour':
 *                     tsecs = time*3600.
 *                 elif unit == 'days' or unit == 'day':             # <<<<<<<<<<<<<<
 *                     tsecs = time*86400.
 *                 # compute time delta.
 */
        __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_days, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (!__pyx_t_3) {
          __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_unit, __pyx_n_s_day, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_5 = __pyx_t_4;
        } else {
          __pyx_t_5 = __pyx_t_3;
        }
        if (__pyx_t_5) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":242
 *                     tsecs = time*3600.
 *                 elif unit == 'days' or unit == 'day':
 *                     tsecs = time*86400.             # <<<<<<<<<<<<<<
 *                 # compute time delta.
 *                 days = tsecs // 86400.
 */
          __pyx_t_2 = PyNumber_Multiply(__pyx_v_time, __pyx_float_86400_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_v_tsecs, __pyx_t_2);
          __pyx_t_2 = 0;
          goto __pyx_L20;
        }
        __pyx_L20:;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":244
 *                     tsecs = time*86400.
 *                 # compute time delta.
 *                 days = tsecs // 86400.             # <<<<<<<<<<<<<<
 *                 msecsd = tsecs*1.e6 - days*86400.*1.e6
 *                 secs = msecsd // 1.e6
 */
        if (unlikely(!__pyx_v_tsecs)) { __Pyx_RaiseUnboundLocalError("tsecs"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
        __pyx_t_2 = PyNumber_FloorDivide(__pyx_v_tsecs, __pyx_float_86400_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_days, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":245
 *                 # compute time delta.
 *                 days = tsecs // 86400.
 *                 msecsd = tsecs*1.e6 - days*86400.*1.e6             # <<<<<<<<<<<<<<
 *                 secs = msecsd // 1.e6
 *                 msecs = int(msecsd - secs*1.e6)
 */
        if (unlikely(!__pyx_v_tsecs)) { __Pyx_RaiseUnboundLocalError("tsecs"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
        __pyx_t_2 = PyNumber_Multiply(__pyx_v_tsecs, __pyx_float_1_e6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = PyNumber_Multiply(__pyx_v_days, __pyx_float_86400_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_14 = PyNumber_Multiply(__pyx_t_1, __pyx_float_1_e6); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_14); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __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_14); __pyx_t_14 = 0;
        __Pyx_XDECREF_SET(__pyx_v_msecsd, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":246
 *                 days = tsecs // 86400.
 *                 msecsd = tsecs*1.e6 - days*86400.*1.e6
 *                 secs = msecsd // 1.e6             # <<<<<<<<<<<<<<
 *                 msecs = int(msecsd - secs*1.e6)
 *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)
 */
        __pyx_t_1 = PyNumber_FloorDivide(__pyx_v_msecsd, __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_XDECREF_SET(__pyx_v_secs, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":247
 *                 msecsd = tsecs*1.e6 - days*86400.*1.e6
 *                 secs = msecsd // 1.e6
 *                 msecs = int(msecsd - secs*1.e6)             # <<<<<<<<<<<<<<
 *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)
 *                 # add time delta to base date.
 */
        __pyx_t_1 = PyNumber_Multiply(__pyx_v_secs, __pyx_float_1_e6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __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 = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyNumber_Int(__pyx_t_14); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_XDECREF_SET(__pyx_v_msecs, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":248
 *                 secs = msecsd // 1.e6
 *                 msecs = int(msecsd - secs*1.e6)
 *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)             # <<<<<<<<<<<<<<
 *                 # add time delta to base date.
 *                 date = basedate + td
 */
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_timedelta); 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 = PyDict_New(); 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);
        if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_days, __pyx_v_days) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_seconds, __pyx_v_secs) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_microseconds, __pyx_v_msecs) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_14); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_XDECREF_SET(__pyx_v_td, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":250
 *                 td = timedelta(days=days,seconds=secs,microseconds=msecs)
 *                 # add time delta to base date.
 *                 date = basedate + td             # <<<<<<<<<<<<<<
 *                 dates.append(date)
 *         if isscalar:
 */
        __pyx_t_2 = PyNumber_Add(__pyx_v_basedate, __pyx_v_td); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_date, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":251
 *                 # add time delta to base date.
 *                 date = basedate + td
 *                 dates.append(date)             # <<<<<<<<<<<<<<
 *         if isscalar:
 *             return dates[0]
 */
        __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 = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L19:;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":252
 *                 date = basedate + td
 *                 dates.append(date)
 *         if isscalar:             # <<<<<<<<<<<<<<
 *             return dates[0]
 *         else:
 */
    __pyx_t_5 = (__pyx_v_isscalar != 0);
    if (__pyx_t_5) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":253
 *                 dates.append(date)
 *         if isscalar:
 *             return dates[0]             # <<<<<<<<<<<<<<
 *         else:
 *             return dates
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_dates, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":255
 *             return dates[0]
 *         else:
 *             return dates             # <<<<<<<<<<<<<<
 *     else: # if only second accuracy required, can use other calendars.
 *         cdftime = netcdftime.utime(units,calendar=calendar)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_dates);
      __pyx_r = __pyx_v_dates;
      goto __pyx_L0;
    }
  }
  /*else*/ {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":257
 *             return dates
 *     else: # if only second accuracy required, can use other calendars.
 *         cdftime = netcdftime.utime(units,calendar=calendar)             # <<<<<<<<<<<<<<
 *         return cdftime.num2date(times)
 * 
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_utime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_units);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_units);
    __Pyx_GIVEREF(__pyx_v_units);
    __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_calendar, __pyx_v_calendar) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_14); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_v_cdftime = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":258
 *     else: # if only second accuracy required, can use other calendars.
 *         cdftime = netcdftime.utime(units,calendar=calendar)
 *         return cdftime.num2date(times)             # <<<<<<<<<<<<<<
 * 
 * def date2index(dates, nctime, calendar=None, select='exact'):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdftime, __pyx_n_s_num2date); 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);
    __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_INCREF(__pyx_v_times);
    PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_times);
    __Pyx_GIVEREF(__pyx_v_times);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 258; __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_14); __pyx_t_14 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":168
 *         return cdftime.date2num(dates)
 * 
 * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
 *     """
 * num2date(times,units,calendar='standard')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("netCDF4.num2date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_unit);
  __Pyx_XDECREF(__pyx_v_basedate);
  __Pyx_XDECREF(__pyx_v_tzutc);
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XDECREF(__pyx_v_mask);
  __Pyx_XDECREF(__pyx_v_dates);
  __Pyx_XDECREF(__pyx_v_time);
  __Pyx_XDECREF(__pyx_v_tsecs);
  __Pyx_XDECREF(__pyx_v_days);
  __Pyx_XDECREF(__pyx_v_msecsd);
  __Pyx_XDECREF(__pyx_v_secs);
  __Pyx_XDECREF(__pyx_v_msecs);
  __Pyx_XDECREF(__pyx_v_td);
  __Pyx_XDECREF(__pyx_v_date);
  __Pyx_XDECREF(__pyx_v_cdftime);
  __Pyx_XDECREF(__pyx_v_times);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":260
 *         return cdftime.num2date(times)
 * 
 * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
 *     """
 * date2index(dates, nctime, calendar=None, select='exact')
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_13date2index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_12date2index[] = "\ndate2index(dates, nctime, calendar=None, select='exact')\n\nReturn indices of a netCDF time variable corresponding to the given dates.\n\n@param dates: A datetime object or a sequence of datetime objects.\nThe datetime objects should not include a time-zone offset.\n\n@param nctime: A netCDF time variable object. The nctime object must have a\nC{units} attribute.\n\n@keyword calendar: Describes the calendar used in the time calculation.\nValid calendars C{'standard', 'gregorian', 'proleptic_gregorian'\n'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'}.\nDefault is C{'standard'}, which is a mixed Julian/Gregorian calendar\nIf C{calendar} is None, its value is given by C{nctime.calendar} or\nC{standard} if no such attribute exists.\n\n@keyword select: C{'exact', 'before', 'after', 'nearest'}\nThe index selection method. C{exact} will return the indices perfectly \nmatching the dates given. C{before} and C{after} will return the indices \ncorresponding to the dates just before or just after the given dates if \nan exact match cannot be found. C{nearest} will return the indices that \ncorrespond to the closest dates. \n      \n@return: an index (indices) of the netCDF time variable corresponding\nto the given datetime object(s).\n    ";
static PyMethodDef __pyx_mdef_7netCDF4_13date2index = {__Pyx_NAMESTR("date2index"), (PyCFunction)__pyx_pw_7netCDF4_13date2index, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_12date2index)};
static PyObject *__pyx_pw_7netCDF4_13date2index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dates = 0;
  PyObject *__pyx_v_nctime = 0;
  PyObject *__pyx_v_calendar = 0;
  PyObject *__pyx_v_select = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("date2index (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dates,&__pyx_n_s_nctime,&__pyx_n_s_calendar,&__pyx_n_s_select,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)__pyx_n_s_exact);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dates)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nctime)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("date2index", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_calendar);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_select);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "date2index") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dates = values[0];
    __pyx_v_nctime = values[1];
    __pyx_v_calendar = values[2];
    __pyx_v_select = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("date2index", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.date2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_12date2index(__pyx_self, __pyx_v_dates, __pyx_v_nctime, __pyx_v_calendar, __pyx_v_select);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_12date2index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dates, PyObject *__pyx_v_nctime, PyObject *__pyx_v_calendar, PyObject *__pyx_v_select) {
  PyObject *__pyx_v_unit = NULL;
  PyObject *__pyx_v_basedate = NULL;
  PyObject *__pyx_v_tzutc = NULL;
  PyObject *__pyx_v_msg = NULL;
  PyObject *__pyx_v_times = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date2index", 0);
  __Pyx_INCREF(__pyx_v_calendar);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":289
 * to the given datetime object(s).
 *     """
 *     unit = nctime.units.split()[0].lower()             # <<<<<<<<<<<<<<
 *     if calendar == None:
 *         calendar = getattr(nctime, 'calendar', 'standard')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_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 = 289; __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_lower); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_unit = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":290
 *     """
 *     unit = nctime.units.split()[0].lower()
 *     if calendar == None:             # <<<<<<<<<<<<<<
 *         calendar = getattr(nctime, 'calendar', 'standard')
 *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_calendar, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":291
 *     unit = nctime.units.split()[0].lower()
 *     if calendar == None:
 *         calendar = getattr(nctime, 'calendar', 'standard')             # <<<<<<<<<<<<<<
 *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:
 *         # for microsecond and/or millisecond accuracy, convert dates
 */
    __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_nctime, __pyx_n_s_calendar, __pyx_n_s_standard); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_calendar, __pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":292
 *     if calendar == None:
 *         calendar = getattr(nctime, 'calendar', 'standard')
 *     if unit in ['microseconds','milliseconds','microsecond','millisecond']:             # <<<<<<<<<<<<<<
 *         # for microsecond and/or millisecond accuracy, convert dates
 *         # to numerical times, then use netcdftime.time2index.
 */
  __Pyx_INCREF(__pyx_v_unit);
  __pyx_t_2 = __pyx_v_unit;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_microseconds, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_3) {
    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_milliseconds, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_3;
  }
  if (!__pyx_t_5) {
    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_microsecond, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_5;
  }
  if (!__pyx_t_4) {
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_millisecond, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_t_5;
  } else {
    __pyx_t_3 = __pyx_t_4;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":295
 *         # for microsecond and/or millisecond accuracy, convert dates
 *         # to numerical times, then use netcdftime.time2index.
 *         basedate = _dateparse(nctime.units)             # <<<<<<<<<<<<<<
 *         from dateutil.tz import tzutc
 *         # can only use certain calendars.
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_dateparse); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); 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_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_basedate = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":296
 *         # to numerical times, then use netcdftime.time2index.
 *         basedate = _dateparse(nctime.units)
 *         from dateutil.tz import tzutc             # <<<<<<<<<<<<<<
 *         # can only use certain calendars.
 *         if calendar != 'proleptic_gregorian' and not \
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_tzutc);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_tzutc);
    __Pyx_GIVEREF(__pyx_n_s_tzutc);
    __pyx_t_6 = __Pyx_Import(__pyx_n_s_dateutil_tz, __pyx_t_1, -1); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_tzutc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_tzutc = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":298
 *         from dateutil.tz import tzutc
 *         # can only use certain calendars.
 *         if calendar != 'proleptic_gregorian' and not \             # <<<<<<<<<<<<<<
 *            (calendar in ['gregorian','standard'] and \
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 */
    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_calendar, __pyx_n_s_proleptic_gregorian, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":299
 *         # can only use certain calendars.
 *         if calendar != 'proleptic_gregorian' and not \
 *            (calendar in ['gregorian','standard'] and \             # <<<<<<<<<<<<<<
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 *             msg = 'milliseconds/microseconds not supported for this calendar'
 */
      __Pyx_INCREF(__pyx_v_calendar);
      __pyx_t_6 = __pyx_v_calendar;
      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_gregorian, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_3) {
        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_standard, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = __pyx_t_5;
      } else {
        __pyx_t_7 = __pyx_t_3;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_3 = __pyx_t_7;
      if (__pyx_t_3) {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":300
 *         if calendar != 'proleptic_gregorian' and not \
 *            (calendar in ['gregorian','standard'] and \
 *             basedate > gregorian.replace(tzinfo=tzutc())):             # <<<<<<<<<<<<<<
 *             msg = 'milliseconds/microseconds not supported for this calendar'
 *             raise ValueError(msg)
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_gregorian); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_tzutc, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_tzinfo, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyObject_RichCompare(__pyx_v_basedate, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_5 = __pyx_t_7;
      } else {
        __pyx_t_5 = __pyx_t_3;
      }

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":298
 *         from dateutil.tz import tzutc
 *         # can only use certain calendars.
 *         if calendar != 'proleptic_gregorian' and not \             # <<<<<<<<<<<<<<
 *            (calendar in ['gregorian','standard'] and \
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 */
      __pyx_t_3 = (!__pyx_t_5);
      __pyx_t_5 = __pyx_t_3;
    } else {
      __pyx_t_5 = __pyx_t_4;
    }
    if (__pyx_t_5) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":301
 *            (calendar in ['gregorian','standard'] and \
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 *             msg = 'milliseconds/microseconds not supported for this calendar'             # <<<<<<<<<<<<<<
 *             raise ValueError(msg)
 *         times = date2num(dates,nctime.units,calendar=calendar)
 */
      __Pyx_INCREF(__pyx_kp_s_milliseconds_microseconds_not_su);
      __pyx_v_msg = __pyx_kp_s_milliseconds_microseconds_not_su;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":302
 *             basedate > gregorian.replace(tzinfo=tzutc())):
 *             msg = 'milliseconds/microseconds not supported for this calendar'
 *             raise ValueError(msg)             # <<<<<<<<<<<<<<
 *         times = date2num(dates,nctime.units,calendar=calendar)
 *         return netcdftime.time2index(times, nctime, calendar, select)
 */
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_msg);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_msg);
      __Pyx_GIVEREF(__pyx_v_msg);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":303
 *             msg = 'milliseconds/microseconds not supported for this calendar'
 *             raise ValueError(msg)
 *         times = date2num(dates,nctime.units,calendar=calendar)             # <<<<<<<<<<<<<<
 *         return netcdftime.time2index(times, nctime, calendar, select)
 *     else: # if only second accuracy required, can use other calendars.
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_nctime, __pyx_n_s_units); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __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 = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_dates);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dates);
    __Pyx_GIVEREF(__pyx_v_dates);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_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 = 303; __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 = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __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_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_times = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":304
 *             raise ValueError(msg)
 *         times = date2num(dates,nctime.units,calendar=calendar)
 *         return netcdftime.time2index(times, nctime, calendar, select)             # <<<<<<<<<<<<<<
 *     else: # if only second accuracy required, can use other calendars.
 *         return netcdftime.date2index(dates, nctime, calendar, select)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_time2index); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_times);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_times);
    __Pyx_GIVEREF(__pyx_v_times);
    __Pyx_INCREF(__pyx_v_nctime);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_nctime);
    __Pyx_GIVEREF(__pyx_v_nctime);
    __Pyx_INCREF(__pyx_v_calendar);
    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_calendar);
    __Pyx_GIVEREF(__pyx_v_calendar);
    __Pyx_INCREF(__pyx_v_select);
    PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_select);
    __Pyx_GIVEREF(__pyx_v_select);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":306
 *         return netcdftime.time2index(times, nctime, calendar, select)
 *     else: # if only second accuracy required, can use other calendars.
 *         return netcdftime.date2index(dates, nctime, calendar, select)             # <<<<<<<<<<<<<<
 * 
 * def getlibversion():
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdftime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_date2index); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_dates);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_dates);
    __Pyx_GIVEREF(__pyx_v_dates);
    __Pyx_INCREF(__pyx_v_nctime);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_nctime);
    __Pyx_GIVEREF(__pyx_v_nctime);
    __Pyx_INCREF(__pyx_v_calendar);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_calendar);
    __Pyx_GIVEREF(__pyx_v_calendar);
    __Pyx_INCREF(__pyx_v_select);
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_select);
    __Pyx_GIVEREF(__pyx_v_select);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":260
 *         return cdftime.num2date(times)
 * 
 * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
 *     """
 * date2index(dates, nctime, calendar=None, select='exact')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("netCDF4.date2index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_unit);
  __Pyx_XDECREF(__pyx_v_basedate);
  __Pyx_XDECREF(__pyx_v_tzutc);
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XDECREF(__pyx_v_times);
  __Pyx_XDECREF(__pyx_v_calendar);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":308
 *         return netcdftime.date2index(dates, nctime, calendar, select)
 * 
 * def getlibversion():             # <<<<<<<<<<<<<<
 *     """
 * getlibversion()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_15getlibversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_14getlibversion[] = "\ngetlibversion()\n\nreturns a string describing the version of the netcdf library\nused to build the module, and when it was built.\n    ";
static PyMethodDef __pyx_mdef_7netCDF4_15getlibversion = {__Pyx_NAMESTR("getlibversion"), (PyCFunction)__pyx_pw_7netCDF4_15getlibversion, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_14getlibversion)};
static PyObject *__pyx_pw_7netCDF4_15getlibversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getlibversion (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_14getlibversion(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_14getlibversion(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getlibversion", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":315
 * used to build the module, and when it was built.
 *     """
 *     return (<char *>nc_inq_libvers()).decode('ascii')             # <<<<<<<<<<<<<<
 * 
 * class MFDataset(Dataset):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((char *)nc_inq_libvers());
  __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":308
 *         return netcdftime.date2index(dates, nctime, calendar, select)
 * 
 * def getlibversion():             # <<<<<<<<<<<<<<
 *     """
 * getlibversion()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("netCDF4.getlibversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":349
 *     """
 * 
 *     def __init__(self, files, check=False, aggdim=None, exclude=[]):             # <<<<<<<<<<<<<<
 *         """
 * Open a Dataset spanning multiple files, making it look as if it was a
 */

static PyObject *__pyx_pf_7netCDF4_9MFDataset_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)Py_False));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_False));
  __Pyx_GIVEREF(((PyObject *)Py_False));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_exclude);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_exclude);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_exclude);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("netCDF4.MFDataset.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9MFDataset_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_9MFDataset___init__[] = "\nOpen a Dataset spanning multiple files, making it look as if it was a \nsingle file. Variables in the list of files that share the same \ndimension (specified with the keyword C{aggdim}) are aggregated. If\nC{aggdim} is not specified, the unlimited is aggregated.  Currently,\nC{aggdim} must be the leftmost (slowest varying) dimension of each\nof the variables to be aggregated.\n\nAdapted from U{pycdf <http://pysclint.sourceforge.net/pycdf>} by Andre Gosselin.\n\nUsage:\n\nnc = MFDataset(files, check=False, aggdim=None, exclude=[])\n\n@param files: either a sequence of netCDF files or a string with a \nwildcard (converted to a sorted list of files using glob)  The first file \nin the list will become the \"master\" file, defining all the \nvariables with an aggregation dimension which may span \nsubsequent files. Attribute access returns attributes only from \"master\" \nfile. The files are always opened in read-only mode.\n\n@keyword check: True if you want to do consistency checking to ensure the \ncorrect variables structure for all of the netcdf files.  Checking makes \nthe initialization of the MFDataset instance much slower. Default is \nFalse.\n\n@keyword aggdim: The name of the dimension to aggregate over (must\nbe the leftmost dimension of each of the variables to be aggregated).\nIf None (default), aggregate over the unlimited dimension.\n\n@keyword exclude: A list of variable names to exclude from aggregation. \nDefault is an empty list.\n       ";
static PyMethodDef __pyx_mdef_7netCDF4_9MFDataset_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_7netCDF4_9MFDataset_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_9MFDataset___init__)};
static PyObject *__pyx_pw_7netCDF4_9MFDataset_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_files = 0;
  PyObject *__pyx_v_check = 0;
  PyObject *__pyx_v_aggdim = 0;
  PyObject *__pyx_v_exclude = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_files,&__pyx_n_s_check,&__pyx_n_s_aggdim,&__pyx_n_s_exclude,0};
    PyObject* values[5] = {0,0,0,0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[2] = ((PyObject *)((PyObject *)Py_False));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = __pyx_dynamic_args->__pyx_arg_exclude;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_files)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_check);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_aggdim);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exclude);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_files = values[1];
    __pyx_v_check = values[2];
    __pyx_v_aggdim = values[3];
    __pyx_v_exclude = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.MFDataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_9MFDataset___init__(__pyx_self, __pyx_v_self, __pyx_v_files, __pyx_v_check, __pyx_v_aggdim, __pyx_v_exclude);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9MFDataset___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_files, PyObject *__pyx_v_check, PyObject *__pyx_v_aggdim, PyObject *__pyx_v_exclude) {
  PyObject *__pyx_v_msg = NULL;
  PyObject *__pyx_v_master = NULL;
  struct __pyx_obj_7netCDF4_Dataset *__pyx_v_cdfm = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_aggDimId = NULL;
  PyObject *__pyx_v_dimname = NULL;
  PyObject *__pyx_v_dim = NULL;
  PyObject *__pyx_v_aggDimName = NULL;
  PyObject *__pyx_v_masterRecVar = NULL;
  PyObject *__pyx_v_vName = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_dims = NULL;
  PyObject *__pyx_v_shape = NULL;
  PyObject *__pyx_v_dtype = NULL;
  PyObject *__pyx_v_cdf = NULL;
  PyObject *__pyx_v_cdfVLen = NULL;
  PyObject *__pyx_v_cdfRecVar = NULL;
  PyObject *__pyx_v_f = NULL;
  struct __pyx_obj_7netCDF4_Dataset *__pyx_v_part = NULL;
  PyObject *__pyx_v_varInfo = NULL;
  PyObject *__pyx_v_masterDims = NULL;
  PyObject *__pyx_v_masterShape = NULL;
  PyObject *__pyx_v_masterType = NULL;
  PyObject *__pyx_v_extDims = NULL;
  PyObject *__pyx_v_extShape = NULL;
  PyObject *__pyx_v_extType = NULL;
  PyObject *__pyx_v_vInst = NULL;
  PyObject *__pyx_v_varname = NULL;
  PyObject *__pyx_v_var = NULL;
  PyObject *__pyx_v_dset = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  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)(PyObject *);
  Py_ssize_t __pyx_t_11;
  int __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_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_files);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":386
 *         # Open the master file in the base class, so that the CDFMF instance
 *         # can be used like a CDF instance.
 *         if isinstance(files, str):             # <<<<<<<<<<<<<<
 *             if files.startswith('http'):
 *                 msg='cannot using file globbing for remote (OPeNDAP) datasets'
 */
  __pyx_t_1 = PyString_Check(__pyx_v_files); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":387
 *         # can be used like a CDF instance.
 *         if isinstance(files, str):
 *             if files.startswith('http'):             # <<<<<<<<<<<<<<
 *                 msg='cannot using file globbing for remote (OPeNDAP) datasets'
 *                 raise ValueError(msg)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_files, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":388
 *         if isinstance(files, str):
 *             if files.startswith('http'):
 *                 msg='cannot using file globbing for remote (OPeNDAP) datasets'             # <<<<<<<<<<<<<<
 *                 raise ValueError(msg)
 *             else:
 */
      __Pyx_INCREF(__pyx_kp_s_cannot_using_file_globbing_for_r);
      __pyx_v_msg = __pyx_kp_s_cannot_using_file_globbing_for_r;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":389
 *             if files.startswith('http'):
 *                 msg='cannot using file globbing for remote (OPeNDAP) datasets'
 *                 raise ValueError(msg)             # <<<<<<<<<<<<<<
 *             else:
 *                 files = sorted(glob(files))
 */
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_msg);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_msg);
      __Pyx_GIVEREF(__pyx_v_msg);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    /*else*/ {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":391
 *                 raise ValueError(msg)
 *             else:
 *                 files = sorted(glob(files))             # <<<<<<<<<<<<<<
 * 
 *         master = files[0]
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_glob); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 391; __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[1]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_files);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_files);
      __Pyx_GIVEREF(__pyx_v_files);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      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_sorted, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_files, __pyx_t_5);
      __pyx_t_5 = 0;
    }
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":393
 *                 files = sorted(glob(files))
 * 
 *         master = files[0]             # <<<<<<<<<<<<<<
 * 
 *         # Open the master again, this time as a classic CDF instance. This will avoid
 */
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_files, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_master = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":397
 *         # Open the master again, this time as a classic CDF instance. This will avoid
 *         # calling methods of the CDFMF subclass when querying the master file.
 *         cdfm = Dataset(master)             # <<<<<<<<<<<<<<
 *         # copy attributes from master.
 *         for name, value in cdfm.__dict__.items():
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_master);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_master);
  __Pyx_GIVEREF(__pyx_v_master);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_cdfm = ((struct __pyx_obj_7netCDF4_Dataset *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":399
 *         cdfm = Dataset(master)
 *         # copy attributes from master.
 *         for name, value in cdfm.__dict__.items():             # <<<<<<<<<<<<<<
 *             self.__dict__[name] = value
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cdfm), __pyx_n_s_dict); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_7(__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 = 399; __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 = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L8_unpacking_done;
      __pyx_L7_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L8_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":400
 *         # copy attributes from master.
 *         for name, value in cdfm.__dict__.items():
 *             self.__dict__[name] = value             # <<<<<<<<<<<<<<
 * 
 *         # Make sure the master defines a dim with name aggdim,
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); 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);
    if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_name, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":404
 *         # Make sure the master defines a dim with name aggdim,
 *         # or an unlimited dimension.
 *         aggDimId = None             # <<<<<<<<<<<<<<
 *         for dimname,dim in cdfm.dimensions.items():
 *             if aggdim is None:
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_aggDimId = Py_None;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":405
 *         # or an unlimited dimension.
 *         aggDimId = None
 *         for dimname,dim in cdfm.dimensions.items():             # <<<<<<<<<<<<<<
 *             if aggdim is None:
 *                 if dim.isunlimited():
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdfm->dimensions, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_7(__pyx_t_5);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L12_unpacking_done;
      __pyx_L11_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L12_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":406
 *         aggDimId = None
 *         for dimname,dim in cdfm.dimensions.items():
 *             if aggdim is None:             # <<<<<<<<<<<<<<
 *                 if dim.isunlimited():
 *                     aggDimId = dim
 */
    __pyx_t_2 = (__pyx_v_aggdim == Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":407
 *         for dimname,dim in cdfm.dimensions.items():
 *             if aggdim is None:
 *                 if dim.isunlimited():             # <<<<<<<<<<<<<<
 *                     aggDimId = dim
 *                     aggDimName = dimname
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":408
 *             if aggdim is None:
 *                 if dim.isunlimited():
 *                     aggDimId = dim             # <<<<<<<<<<<<<<
 *                     aggDimName = dimname
 *             else:
 */
        __Pyx_INCREF(__pyx_v_dim);
        __Pyx_DECREF_SET(__pyx_v_aggDimId, __pyx_v_dim);

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":409
 *                 if dim.isunlimited():
 *                     aggDimId = dim
 *                     aggDimName = dimname             # <<<<<<<<<<<<<<
 *             else:
 *                 if dimname == aggdim:
 */
        __Pyx_INCREF(__pyx_v_dimname);
        __Pyx_XDECREF_SET(__pyx_v_aggDimName, __pyx_v_dimname);
        goto __pyx_L14;
      }
      __pyx_L14:;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":411
 *                     aggDimName = dimname
 *             else:
 *                 if dimname == aggdim:             # <<<<<<<<<<<<<<
 *                     aggDimId = dim
 *                     aggDimName = dimname
 */
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_dimname, __pyx_v_aggdim, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 411; __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[1]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":412
 *             else:
 *                 if dimname == aggdim:
 *                     aggDimId = dim             # <<<<<<<<<<<<<<
 *                     aggDimName = dimname
 *         if aggDimId is None:
 */
        __Pyx_INCREF(__pyx_v_dim);
        __Pyx_DECREF_SET(__pyx_v_aggDimId, __pyx_v_dim);

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":413
 *                 if dimname == aggdim:
 *                     aggDimId = dim
 *                     aggDimName = dimname             # <<<<<<<<<<<<<<
 *         if aggDimId is None:
 *             raise IOError("master dataset %s does not have a aggregation dimension" % master)
 */
        __Pyx_INCREF(__pyx_v_dimname);
        __Pyx_XDECREF_SET(__pyx_v_aggDimName, __pyx_v_dimname);
        goto __pyx_L15;
      }
      __pyx_L15:;
    }
    __pyx_L13:;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":414
 *                     aggDimId = dim
 *                     aggDimName = dimname
 *         if aggDimId is None:             # <<<<<<<<<<<<<<
 *             raise IOError("master dataset %s does not have a aggregation dimension" % master)
 * 
 */
  __pyx_t_1 = (__pyx_v_aggDimId == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":415
 *                     aggDimName = dimname
 *         if aggDimId is None:
 *             raise IOError("master dataset %s does not have a aggregation dimension" % master)             # <<<<<<<<<<<<<<
 * 
 *         # Get info on all aggregation variables defined in the master.
 */
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_master_dataset_s_does_not_have_a, __pyx_v_master); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyTuple_New(1); 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);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_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[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":419
 *         # Get info on all aggregation variables defined in the master.
 *         # Make sure the master defines at least one aggregation variable.
 *         masterRecVar = {}             # <<<<<<<<<<<<<<
 *         for vName,v in cdfm.variables.items():
 *             # skip variables specified in exclude list.
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_masterRecVar = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":420
 *         # Make sure the master defines at least one aggregation variable.
 *         masterRecVar = {}
 *         for vName,v in cdfm.variables.items():             # <<<<<<<<<<<<<<
 *             # skip variables specified in exclude list.
 *             if vName in exclude: continue
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cdfm->variables, __pyx_n_s_items); 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_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); 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_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_3 = __pyx_t_7(__pyx_t_5);
      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 = 420; __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 != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L19_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L19_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L20_unpacking_done;
      __pyx_L19_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L20_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_vName, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":422
 *         for vName,v in cdfm.variables.items():
 *             # skip variables specified in exclude list.
 *             if vName in exclude: continue             # <<<<<<<<<<<<<<
 *             dims = v.dimensions
 *             shape = v.shape
 */
    __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_v_vName, __pyx_v_exclude, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {
      goto __pyx_L17_continue;
    }

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":423
 *             # skip variables specified in exclude list.
 *             if vName in exclude: continue
 *             dims = v.dimensions             # <<<<<<<<<<<<<<
 *             shape = v.shape
 *             dtype = v.dtype
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_dims, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":424
 *             if vName in exclude: continue
 *             dims = v.dimensions
 *             shape = v.shape             # <<<<<<<<<<<<<<
 *             dtype = v.dtype
 *             # Be carefull: we may deal with a scalar (dimensionless) variable.
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_shape, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":425
 *             dims = v.dimensions
 *             shape = v.shape
 *             dtype = v.dtype             # <<<<<<<<<<<<<<
 *             # Be carefull: we may deal with a scalar (dimensionless) variable.
 *             # Unlimited dimension always occupies index 0.
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_dtype, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":428
 *             # Be carefull: we may deal with a scalar (dimensionless) variable.
 *             # Unlimited dimension always occupies index 0.
 *             if (len(dims) > 0 and aggDimName == dims[0]):             # <<<<<<<<<<<<<<
 *                 masterRecVar[vName] = (dims, shape, dtype)
 *         if len(masterRecVar) == 0:
 */
    __pyx_t_11 = PyObject_Length(__pyx_v_dims); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = (__pyx_t_11 > 0);
    if (__pyx_t_1) {
      if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_dims, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = PyObject_RichCompare(__pyx_v_aggDimName, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_12 = __pyx_t_2;
    } else {
      __pyx_t_12 = __pyx_t_1;
    }
    if (__pyx_t_12) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":429
 *             # Unlimited dimension always occupies index 0.
 *             if (len(dims) > 0 and aggDimName == dims[0]):
 *                 masterRecVar[vName] = (dims, shape, dtype)             # <<<<<<<<<<<<<<
 *         if len(masterRecVar) == 0:
 *             raise IOError("master dataset %s does not have any variables to aggregate" % master)
 */
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_dims);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_dims);
      __Pyx_GIVEREF(__pyx_v_dims);
      __Pyx_INCREF(__pyx_v_shape);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_shape);
      __Pyx_GIVEREF(__pyx_v_shape);
      __Pyx_INCREF(__pyx_v_dtype);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_dtype);
      __Pyx_GIVEREF(__pyx_v_dtype);
      if (unlikely(PyDict_SetItem(__pyx_v_masterRecVar, __pyx_v_vName, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L22;
    }
    __pyx_L22:;
    __pyx_L17_continue:;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":430
 *             if (len(dims) > 0 and aggDimName == dims[0]):
 *                 masterRecVar[vName] = (dims, shape, dtype)
 *         if len(masterRecVar) == 0:             # <<<<<<<<<<<<<<
 *             raise IOError("master dataset %s does not have any variables to aggregate" % master)
 * 
 */
  __pyx_t_6 = PyDict_Size(__pyx_v_masterRecVar); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((__pyx_t_6 == 0) != 0);
  if (__pyx_t_12) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":431
 *                 masterRecVar[vName] = (dims, shape, dtype)
 *         if len(masterRecVar) == 0:
 *             raise IOError("master dataset %s does not have any variables to aggregate" % master)             # <<<<<<<<<<<<<<
 * 
 *         # Create the following:
 */
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_master_dataset_s_does_not_have_a_2, __pyx_v_master); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":439
 *         #             a list of the corresponding Variable instance, one for each
 *         #             cdf file of the file set
 *         cdf = [cdfm]             # <<<<<<<<<<<<<<
 *         self._cdf = cdf        # Store this now, because dim() method needs it
 *         cdfVLen = [len(aggDimId)]
 */
  __pyx_t_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);
  __Pyx_INCREF(((PyObject *)__pyx_v_cdfm));
  PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_cdfm));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_cdfm));
  __pyx_v_cdf = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":440
 *         #             cdf file of the file set
 *         cdf = [cdfm]
 *         self._cdf = cdf        # Store this now, because dim() method needs it             # <<<<<<<<<<<<<<
 *         cdfVLen = [len(aggDimId)]
 *         cdfRecVar = {}
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdf, __pyx_v_cdf) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":441
 *         cdf = [cdfm]
 *         self._cdf = cdf        # Store this now, because dim() method needs it
 *         cdfVLen = [len(aggDimId)]             # <<<<<<<<<<<<<<
 *         cdfRecVar = {}
 *         for v in masterRecVar.keys():
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_aggDimId); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_v_cdfVLen = ((PyObject*)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":442
 *         self._cdf = cdf        # Store this now, because dim() method needs it
 *         cdfVLen = [len(aggDimId)]
 *         cdfRecVar = {}             # <<<<<<<<<<<<<<
 *         for v in masterRecVar.keys():
 *             cdfRecVar[v] = [cdfm.variables[v]]
 */
  __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_cdfRecVar = ((PyObject*)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":443
 *         cdfVLen = [len(aggDimId)]
 *         cdfRecVar = {}
 *         for v in masterRecVar.keys():             # <<<<<<<<<<<<<<
 *             cdfRecVar[v] = [cdfm.variables[v]]
 * 
 */
  __pyx_t_8 = __Pyx_PyDict_Keys(__pyx_v_masterRecVar); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
    __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  for (;;) {
    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_5)) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_8 = __pyx_t_7(__pyx_t_5);
      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 = 443; __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;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":444
 *         cdfRecVar = {}
 *         for v in masterRecVar.keys():
 *             cdfRecVar[v] = [cdfm.variables[v]]             # <<<<<<<<<<<<<<
 * 
 *         # Open each remaining file in read-only mode.
 */
    __pyx_t_8 = PyObject_GetItem(__pyx_v_cdfm->variables, __pyx_v_v); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __pyx_t_8 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_cdfRecVar, __pyx_v_v, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":449
 *         # Make sure each file defines the same aggregation variables as the master
 *         # and that the variables are defined in the same way (name, shape and type)
 *         for f in files[1:]:             # <<<<<<<<<<<<<<
 *             part = Dataset(f)
 *             varInfo = part.variables
 */
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_files, 1, 0, NULL, NULL, &__pyx_slice__9, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (!__pyx_t_7 && 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[1]; __pyx_lineno = 449; __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[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_3)) {
      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[1]; __pyx_lineno = 449; __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[1]; __pyx_lineno = 449; __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[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":450
 *         # and that the variables are defined in the same way (name, shape and type)
 *         for f in files[1:]:
 *             part = Dataset(f)             # <<<<<<<<<<<<<<
 *             varInfo = part.variables
 *             for v in masterRecVar.keys():
 */
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_f);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_f);
    __Pyx_GIVEREF(__pyx_v_f);
    __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 450; __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_part, ((struct __pyx_obj_7netCDF4_Dataset *)__pyx_t_8));
    __pyx_t_8 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":451
 *         for f in files[1:]:
 *             part = Dataset(f)
 *             varInfo = part.variables             # <<<<<<<<<<<<<<
 *             for v in masterRecVar.keys():
 *                 if check:
 */
    __pyx_t_8 = __pyx_v_part->variables;
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_XDECREF_SET(__pyx_v_varInfo, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":452
 *             part = Dataset(f)
 *             varInfo = part.variables
 *             for v in masterRecVar.keys():             # <<<<<<<<<<<<<<
 *                 if check:
 *                     # Make sure master rec var is also defined here.
 */
    __pyx_t_8 = __Pyx_PyDict_Keys(__pyx_v_masterRecVar); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (PyList_CheckExact(__pyx_t_8) || PyTuple_CheckExact(__pyx_t_8)) {
      __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_13 = Py_TYPE(__pyx_t_5)->tp_iternext;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    for (;;) {
      if (!__pyx_t_13 && PyList_CheckExact(__pyx_t_5)) {
        if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_8); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_13 && PyTuple_CheckExact(__pyx_t_5)) {
        if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_8); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_8 = __pyx_t_13(__pyx_t_5);
        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 = 452; __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;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":453
 *             varInfo = part.variables
 *             for v in masterRecVar.keys():
 *                 if check:             # <<<<<<<<<<<<<<
 *                     # Make sure master rec var is also defined here.
 *                     if v not in varInfo.keys():
 */
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_check); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_12) {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":455
 *                 if check:
 *                     # Make sure master rec var is also defined here.
 *                     if v not in varInfo.keys():             # <<<<<<<<<<<<<<
 *                         raise IOError("aggregation variable %s not defined in %s" % (v, f))
 * 
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_varInfo, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_12 = (__Pyx_PySequence_Contains(__pyx_v_v, __pyx_t_4, Py_NE)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_1 = (__pyx_t_12 != 0);
        if (__pyx_t_1) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":456
 *                     # Make sure master rec var is also defined here.
 *                     if v not in varInfo.keys():
 *                         raise IOError("aggregation variable %s not defined in %s" % (v, f))             # <<<<<<<<<<<<<<
 * 
 *                     #if not vInst.dimensions[0] != aggDimName:
 */
          __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_v);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_v);
          __Pyx_GIVEREF(__pyx_v_v);
          __Pyx_INCREF(__pyx_v_f);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_f);
          __Pyx_GIVEREF(__pyx_v_f);
          __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_aggregation_variable_s_not_defin, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_8);
          __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":460
 *                     #if not vInst.dimensions[0] != aggDimName:
 * 
 *                     masterDims, masterShape, masterType = masterRecVar[v][:3]             # <<<<<<<<<<<<<<
 *                     extDims, extShape, extType = varInfo[v][:3]
 *                     extDims = varInfo[v].dimensions
 */
        __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_masterRecVar, __pyx_v_v); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_8, 0, 3, NULL, NULL, &__pyx_slice__10, 0, 1, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        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 != 3)) {
            if (size > 3) __Pyx_RaiseTooManyValuesError(3);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
            __pyx_t_14 = PyTuple_GET_ITEM(sequence, 2); 
          } else {
            __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_14 = PyList_GET_ITEM(sequence, 2); 
          }
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_14);
          #else
          __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_14 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_14);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_15 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_10 = Py_TYPE(__pyx_t_15)->tp_iternext;
          index = 0; __pyx_t_8 = __pyx_t_10(__pyx_t_15); if (unlikely(!__pyx_t_8)) goto __pyx_L32_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          index = 1; __pyx_t_9 = __pyx_t_10(__pyx_t_15); if (unlikely(!__pyx_t_9)) goto __pyx_L32_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_9);
          index = 2; __pyx_t_14 = __pyx_t_10(__pyx_t_15); if (unlikely(!__pyx_t_14)) goto __pyx_L32_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_14);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_15), 3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_10 = NULL;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          goto __pyx_L33_unpacking_done;
          __pyx_L32_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_10 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_L33_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_masterDims, __pyx_t_8);
        __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_masterShape, __pyx_t_9);
        __pyx_t_9 = 0;
        __Pyx_XDECREF_SET(__pyx_v_masterType, __pyx_t_14);
        __pyx_t_14 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":461
 * 
 *                     masterDims, masterShape, masterType = masterRecVar[v][:3]
 *                     extDims, extShape, extType = varInfo[v][:3]             # <<<<<<<<<<<<<<
 *                     extDims = varInfo[v].dimensions
 *                     extShape = varInfo[v].shape
 */
        __pyx_t_4 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_14 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 3, NULL, NULL, &__pyx_slice__11, 0, 1, 1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_14))) || (PyList_CheckExact(__pyx_t_14))) {
          PyObject* sequence = __pyx_t_14;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 3)) {
            if (size > 3) __Pyx_RaiseTooManyValuesError(3);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); 
          } else {
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
          }
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_8);
          #else
          __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          #endif
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_15 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_10 = Py_TYPE(__pyx_t_15)->tp_iternext;
          index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_15); if (unlikely(!__pyx_t_4)) goto __pyx_L34_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          index = 1; __pyx_t_9 = __pyx_t_10(__pyx_t_15); if (unlikely(!__pyx_t_9)) goto __pyx_L34_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_9);
          index = 2; __pyx_t_8 = __pyx_t_10(__pyx_t_15); if (unlikely(!__pyx_t_8)) goto __pyx_L34_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_15), 3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_10 = 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_10 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_L35_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_extDims, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_XDECREF_SET(__pyx_v_extShape, __pyx_t_9);
        __pyx_t_9 = 0;
        __Pyx_XDECREF_SET(__pyx_v_extType, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":462
 *                     masterDims, masterShape, masterType = masterRecVar[v][:3]
 *                     extDims, extShape, extType = varInfo[v][:3]
 *                     extDims = varInfo[v].dimensions             # <<<<<<<<<<<<<<
 *                     extShape = varInfo[v].shape
 *                     extType = varInfo[v].dtype
 */
        __pyx_t_14 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF_SET(__pyx_v_extDims, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":463
 *                     extDims, extShape, extType = varInfo[v][:3]
 *                     extDims = varInfo[v].dimensions
 *                     extShape = varInfo[v].shape             # <<<<<<<<<<<<<<
 *                     extType = varInfo[v].dtype
 *                     # Check that dimension names are identical.
 */
        __pyx_t_8 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_shape); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF_SET(__pyx_v_extShape, __pyx_t_14);
        __pyx_t_14 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":464
 *                     extDims = varInfo[v].dimensions
 *                     extShape = varInfo[v].shape
 *                     extType = varInfo[v].dtype             # <<<<<<<<<<<<<<
 *                     # Check that dimension names are identical.
 *                     if masterDims != extDims:
 */
        __pyx_t_14 = PyObject_GetItem(__pyx_v_varInfo, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF_SET(__pyx_v_extType, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":466
 *                     extType = varInfo[v].dtype
 *                     # Check that dimension names are identical.
 *                     if masterDims != extDims:             # <<<<<<<<<<<<<<
 *                         raise IOError("variable %s : dimensions mismatch between "
 *                                        "master %s (%s) and extension %s (%s)" %
 */
        __pyx_t_8 = PyObject_RichCompare(__pyx_v_masterDims, __pyx_v_extDims, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 466; __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[1]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (__pyx_t_1) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":469
 *                         raise IOError("variable %s : dimensions mismatch between "
 *                                        "master %s (%s) and extension %s (%s)" %
 *                                        (v, master, masterDims, f, extDims))             # <<<<<<<<<<<<<<
 * 
 *                     # Check that the ranks are identical, and the dimension lengths are
 */
          __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_v);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_v);
          __Pyx_GIVEREF(__pyx_v_v);
          __Pyx_INCREF(__pyx_v_master);
          PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_master);
          __Pyx_GIVEREF(__pyx_v_master);
          __Pyx_INCREF(__pyx_v_masterDims);
          PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_masterDims);
          __Pyx_GIVEREF(__pyx_v_masterDims);
          __Pyx_INCREF(__pyx_v_f);
          PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_f);
          __Pyx_GIVEREF(__pyx_v_f);
          __Pyx_INCREF(__pyx_v_extDims);
          PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_v_extDims);
          __Pyx_GIVEREF(__pyx_v_extDims);

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":468
 *                     if masterDims != extDims:
 *                         raise IOError("variable %s : dimensions mismatch between "
 *                                        "master %s (%s) and extension %s (%s)" %             # <<<<<<<<<<<<<<
 *                                        (v, master, masterDims, f, extDims))
 * 
 */
          __pyx_t_14 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_dimensions_mismatch_b, __pyx_t_8); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":467
 *                     # Check that dimension names are identical.
 *                     if masterDims != extDims:
 *                         raise IOError("variable %s : dimensions mismatch between "             # <<<<<<<<<<<<<<
 *                                        "master %s (%s) and extension %s (%s)" %
 *                                        (v, master, masterDims, f, extDims))
 */
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_14);
          __pyx_t_14 = 0;
          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_Raise(__pyx_t_14, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":474
 *                     # identical (except for that of the unlimited dimension, which of
 *                     # course may vary.
 *                     if len(masterShape) != len(extShape):             # <<<<<<<<<<<<<<
 *                         raise IOError("variable %s : rank mismatch between "
 *                                        "master %s (%s) and extension %s (%s)" %
 */
        __pyx_t_16 = PyObject_Length(__pyx_v_masterShape); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_17 = PyObject_Length(__pyx_v_extShape); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_1 = ((__pyx_t_16 != __pyx_t_17) != 0);
        if (__pyx_t_1) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":477
 *                         raise IOError("variable %s : rank mismatch between "
 *                                        "master %s (%s) and extension %s (%s)" %
 *                                        (v, master, len(masterShape), f, len(extShape)))             # <<<<<<<<<<<<<<
 *                     if masterShape[1:] != extShape[1:]:
 *                         raise IOError("variable %s : shape mismatch between "
 */
          __pyx_t_17 = PyObject_Length(__pyx_v_masterShape); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_14 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_17 = PyObject_Length(__pyx_v_extShape); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_17); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9 = PyTuple_New(5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_INCREF(__pyx_v_v);
          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_v);
          __Pyx_GIVEREF(__pyx_v_v);
          __Pyx_INCREF(__pyx_v_master);
          PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_master);
          __Pyx_GIVEREF(__pyx_v_master);
          PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_14);
          __Pyx_INCREF(__pyx_v_f);
          PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_v_f);
          __Pyx_GIVEREF(__pyx_v_f);
          PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_8);
          __pyx_t_14 = 0;
          __pyx_t_8 = 0;

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":476
 *                     if len(masterShape) != len(extShape):
 *                         raise IOError("variable %s : rank mismatch between "
 *                                        "master %s (%s) and extension %s (%s)" %             # <<<<<<<<<<<<<<
 *                                        (v, master, len(masterShape), f, len(extShape)))
 *                     if masterShape[1:] != extShape[1:]:
 */
          __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_rank_mismatch_between, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":475
 *                     # course may vary.
 *                     if len(masterShape) != len(extShape):
 *                         raise IOError("variable %s : rank mismatch between "             # <<<<<<<<<<<<<<
 *                                        "master %s (%s) and extension %s (%s)" %
 *                                        (v, master, len(masterShape), f, len(extShape)))
 */
          __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 475; __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 = 0;
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_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[1]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":478
 *                                        "master %s (%s) and extension %s (%s)" %
 *                                        (v, master, len(masterShape), f, len(extShape)))
 *                     if masterShape[1:] != extShape[1:]:             # <<<<<<<<<<<<<<
 *                         raise IOError("variable %s : shape mismatch between "
 *                                        "master %s (%s) and extension %s (%s)" %
 */
        __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_masterShape, 1, 0, NULL, NULL, &__pyx_slice__12, 1, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_extShape, 1, 0, NULL, NULL, &__pyx_slice__13, 1, 0, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_14 = PyObject_RichCompare(__pyx_t_8, __pyx_t_9, Py_NE); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (__pyx_t_1) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":481
 *                         raise IOError("variable %s : shape mismatch between "
 *                                        "master %s (%s) and extension %s (%s)" %
 *                                        (v, master, masterShape, f, extShape))             # <<<<<<<<<<<<<<
 * 
 *                     # Check that the data types are identical.
 */
          __pyx_t_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_INCREF(__pyx_v_v);
          PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_v);
          __Pyx_GIVEREF(__pyx_v_v);
          __Pyx_INCREF(__pyx_v_master);
          PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_master);
          __Pyx_GIVEREF(__pyx_v_master);
          __Pyx_INCREF(__pyx_v_masterShape);
          PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_v_masterShape);
          __Pyx_GIVEREF(__pyx_v_masterShape);
          __Pyx_INCREF(__pyx_v_f);
          PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_v_f);
          __Pyx_GIVEREF(__pyx_v_f);
          __Pyx_INCREF(__pyx_v_extShape);
          PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_v_extShape);
          __Pyx_GIVEREF(__pyx_v_extShape);

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":480
 *                     if masterShape[1:] != extShape[1:]:
 *                         raise IOError("variable %s : shape mismatch between "
 *                                        "master %s (%s) and extension %s (%s)" %             # <<<<<<<<<<<<<<
 *                                        (v, master, masterShape, f, extShape))
 * 
 */
          __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_shape_mismatch_betwee, __pyx_t_14); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":479
 *                                        (v, master, len(masterShape), f, len(extShape)))
 *                     if masterShape[1:] != extShape[1:]:
 *                         raise IOError("variable %s : shape mismatch between "             # <<<<<<<<<<<<<<
 *                                        "master %s (%s) and extension %s (%s)" %
 *                                        (v, master, masterShape, f, extShape))
 */
          __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_14);
          PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9);
          __Pyx_GIVEREF(__pyx_t_9);
          __pyx_t_9 = 0;
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_Raise(__pyx_t_9, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":484
 * 
 *                     # Check that the data types are identical.
 *                     if masterType != extType:             # <<<<<<<<<<<<<<
 *                         raise IOError("variable %s : data type mismatch between "
 *                                        "master %s (%s) and extension %s (%s)" %
 */
        __pyx_t_9 = PyObject_RichCompare(__pyx_v_masterType, __pyx_v_extType, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (__pyx_t_1) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":487
 *                         raise IOError("variable %s : data type mismatch between "
 *                                        "master %s (%s) and extension %s (%s)" %
 *                                        (v, master, masterType, f, extType))             # <<<<<<<<<<<<<<
 * 
 *                     # Everythig ok.
 */
          __pyx_t_9 = PyTuple_New(5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_INCREF(__pyx_v_v);
          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_v);
          __Pyx_GIVEREF(__pyx_v_v);
          __Pyx_INCREF(__pyx_v_master);
          PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_master);
          __Pyx_GIVEREF(__pyx_v_master);
          __Pyx_INCREF(__pyx_v_masterType);
          PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_masterType);
          __Pyx_GIVEREF(__pyx_v_masterType);
          __Pyx_INCREF(__pyx_v_f);
          PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_v_f);
          __Pyx_GIVEREF(__pyx_v_f);
          __Pyx_INCREF(__pyx_v_extType);
          PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_v_extType);
          __Pyx_GIVEREF(__pyx_v_extType);

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":486
 *                     if masterType != extType:
 *                         raise IOError("variable %s : data type mismatch between "
 *                                        "master %s (%s) and extension %s (%s)" %             # <<<<<<<<<<<<<<
 *                                        (v, master, masterType, f, extType))
 * 
 */
          __pyx_t_14 = __Pyx_PyString_Format(__pyx_kp_s_variable_s_data_type_mismatch_be, __pyx_t_9); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":485
 *                     # Check that the data types are identical.
 *                     if masterType != extType:
 *                         raise IOError("variable %s : data type mismatch between "             # <<<<<<<<<<<<<<
 *                                        "master %s (%s) and extension %s (%s)" %
 *                                        (v, master, masterType, f, extType))
 */
          __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_9);
          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_14);
          __Pyx_GIVEREF(__pyx_t_14);
          __pyx_t_14 = 0;
          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_Raise(__pyx_t_14, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":490
 * 
 *                     # Everythig ok.
 *                     vInst = part.variables[v]             # <<<<<<<<<<<<<<
 *                     cdfRecVar[v].append(vInst)
 *                 else:
 */
        __pyx_t_14 = PyObject_GetItem(__pyx_v_part->variables, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_XDECREF_SET(__pyx_v_vInst, __pyx_t_14);
        __pyx_t_14 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":491
 *                     # Everythig ok.
 *                     vInst = part.variables[v]
 *                     cdfRecVar[v].append(vInst)             # <<<<<<<<<<<<<<
 *                 else:
 *                     # No making sure of anything -- assume this is ok..
 */
        __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_v_cdfRecVar, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_18 = __Pyx_PyObject_Append(__pyx_t_14, __pyx_v_vInst); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        goto __pyx_L30;
      }
      /*else*/ {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":494
 *                 else:
 *                     # No making sure of anything -- assume this is ok..
 *                     vInst = part.variables[v]             # <<<<<<<<<<<<<<
 *                     cdfRecVar[v].append(vInst)
 * 
 */
        __pyx_t_14 = PyObject_GetItem(__pyx_v_part->variables, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_XDECREF_SET(__pyx_v_vInst, __pyx_t_14);
        __pyx_t_14 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":495
 *                     # No making sure of anything -- assume this is ok..
 *                     vInst = part.variables[v]
 *                     cdfRecVar[v].append(vInst)             # <<<<<<<<<<<<<<
 * 
 *             cdf.append(part)
 */
        __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_v_cdfRecVar, __pyx_v_v); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_18 = __Pyx_PyObject_Append(__pyx_t_14, __pyx_v_vInst); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __pyx_L30:;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":497
 *                     cdfRecVar[v].append(vInst)
 * 
 *             cdf.append(part)             # <<<<<<<<<<<<<<
 *             cdfVLen.append(len(part.dimensions[aggDimName]))
 * 
 */
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_cdf, ((PyObject *)__pyx_v_part)); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":498
 * 
 *             cdf.append(part)
 *             cdfVLen.append(len(part.dimensions[aggDimName]))             # <<<<<<<<<<<<<<
 * 
 *         # Attach attributes to the MFDataset instance.
 */
    if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = PyObject_GetItem(__pyx_v_part->dimensions, __pyx_v_aggDimName); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_cdfVLen, __pyx_t_5); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":502
 *         # Attach attributes to the MFDataset instance.
 *         # A local __setattr__() method is required for them.
 *         self._files = files            # list of cdf file names in the set             # <<<<<<<<<<<<<<
 *         self._cdfVLen = cdfVLen              # list of unlimited lengths
 *         self._cdfTLen = sum(cdfVLen) # total length
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_files_2, __pyx_v_files) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":503
 *         # A local __setattr__() method is required for them.
 *         self._files = files            # list of cdf file names in the set
 *         self._cdfVLen = cdfVLen              # list of unlimited lengths             # <<<<<<<<<<<<<<
 *         self._cdfTLen = sum(cdfVLen) # total length
 *         self._cdfRecVar = cdfRecVar          # dictionary of Variable instances for all
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfVLen, __pyx_v_cdfVLen) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":504
 *         self._files = files            # list of cdf file names in the set
 *         self._cdfVLen = cdfVLen              # list of unlimited lengths
 *         self._cdfTLen = sum(cdfVLen) # total length             # <<<<<<<<<<<<<<
 *         self._cdfRecVar = cdfRecVar          # dictionary of Variable instances for all
 *                                              # the aggregation variables
 */
  __pyx_t_3 = PyTuple_New(1); 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_INCREF(__pyx_v_cdfVLen);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_cdfVLen);
  __Pyx_GIVEREF(__pyx_v_cdfVLen);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_3, NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfTLen, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":505
 *         self._cdfVLen = cdfVLen              # list of unlimited lengths
 *         self._cdfTLen = sum(cdfVLen) # total length
 *         self._cdfRecVar = cdfRecVar          # dictionary of Variable instances for all             # <<<<<<<<<<<<<<
 *                                              # the aggregation variables
 *         self._dims = cdfm.dimensions
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cdfRecVar, __pyx_v_cdfRecVar) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":507
 *         self._cdfRecVar = cdfRecVar          # dictionary of Variable instances for all
 *                                              # the aggregation variables
 *         self._dims = cdfm.dimensions             # <<<<<<<<<<<<<<
 *         self._grps = cdfm.groups
 *         for dimname, dim in self._dims.items():
 */
  __pyx_t_5 = __pyx_v_cdfm->dimensions;
  __Pyx_INCREF(__pyx_t_5);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dims, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":508
 *                                              # the aggregation variables
 *         self._dims = cdfm.dimensions
 *         self._grps = cdfm.groups             # <<<<<<<<<<<<<<
 *         for dimname, dim in self._dims.items():
 *             if dimname == aggDimName:
 */
  __pyx_t_5 = __pyx_v_cdfm->groups;
  __Pyx_INCREF(__pyx_t_5);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grps, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":509
 *         self._dims = cdfm.dimensions
 *         self._grps = cdfm.groups
 *         for dimname, dim in self._dims.items():             # <<<<<<<<<<<<<<
 *             if dimname == aggDimName:
 *                 self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dims); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (!__pyx_t_7 && 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[1]; __pyx_lineno = 509; __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[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_3)) {
      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[1]; __pyx_lineno = 509; __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[1]; __pyx_lineno = 509; __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[1]; __pyx_lineno = 509; __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 = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_14 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext;
      index = 0; __pyx_t_14 = __pyx_t_10(__pyx_t_8); if (unlikely(!__pyx_t_14)) goto __pyx_L42_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_14);
      index = 1; __pyx_t_9 = __pyx_t_10(__pyx_t_8); if (unlikely(!__pyx_t_9)) goto __pyx_L42_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L43_unpacking_done;
      __pyx_L42_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L43_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_14);
    __pyx_t_14 = 0;
    __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":510
 *         self._grps = cdfm.groups
 *         for dimname, dim in self._dims.items():
 *             if dimname == aggDimName:             # <<<<<<<<<<<<<<
 *                 self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)
 *         self._vars = cdfm.variables
 */
    if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_dimname, __pyx_v_aggDimName, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 510; __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[1]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":511
 *         for dimname, dim in self._dims.items():
 *             if dimname == aggDimName:
 *                 self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)             # <<<<<<<<<<<<<<
 *         self._vars = cdfm.variables
 *         for varname,var in self._vars.items():
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Dimension); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfVLen); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfTLen); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_dimname);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_dimname);
      __Pyx_GIVEREF(__pyx_v_dimname);
      __Pyx_INCREF(__pyx_v_dim);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_dim);
      __Pyx_GIVEREF(__pyx_v_dim);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_14);
      __pyx_t_9 = 0;
      __pyx_t_14 = 0;
      __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __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_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dims); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_v_dimname, __pyx_t_14) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      goto __pyx_L44;
    }
    __pyx_L44:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":512
 *             if dimname == aggDimName:
 *                 self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)
 *         self._vars = cdfm.variables             # <<<<<<<<<<<<<<
 *         for varname,var in self._vars.items():
 *             if varname in self._cdfRecVar.keys():
 */
  __pyx_t_3 = __pyx_v_cdfm->variables;
  __Pyx_INCREF(__pyx_t_3);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_vars, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":513
 *                 self._dims[dimname] = _Dimension(dimname, dim, self._cdfVLen, self._cdfTLen)
 *         self._vars = cdfm.variables
 *         for varname,var in self._vars.items():             # <<<<<<<<<<<<<<
 *             if varname in self._cdfRecVar.keys():
 *                 self._vars[varname] = _Variable(self, varname, var, aggDimName)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vars); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_items); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_14 = __pyx_t_3; __Pyx_INCREF(__pyx_t_14); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_7 = Py_TYPE(__pyx_t_14)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_14)) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_14)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_14)) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_14)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_3 = __pyx_t_7(__pyx_t_14);
      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 = 513; __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 != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L47_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L47_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L48_unpacking_done;
      __pyx_L47_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L48_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_varname, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":514
 *         self._vars = cdfm.variables
 *         for varname,var in self._vars.items():
 *             if varname in self._cdfRecVar.keys():             # <<<<<<<<<<<<<<
 *                 self._vars[varname] = _Variable(self, varname, var, aggDimName)
 *         self._file_format = []
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdfRecVar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __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_PySequence_Contains(__pyx_v_varname, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_12 = (__pyx_t_1 != 0);
    if (__pyx_t_12) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":515
 *         for varname,var in self._vars.items():
 *             if varname in self._cdfRecVar.keys():
 *                 self._vars[varname] = _Variable(self, varname, var, aggDimName)             # <<<<<<<<<<<<<<
 *         self._file_format = []
 *         for dset in self._cdf:
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Variable); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(!__pyx_v_aggDimName)) { __Pyx_RaiseUnboundLocalError("aggDimName"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
      __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_self);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self);
      __Pyx_GIVEREF(__pyx_v_self);
      __Pyx_INCREF(__pyx_v_varname);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_varname);
      __Pyx_GIVEREF(__pyx_v_varname);
      __Pyx_INCREF(__pyx_v_var);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_var);
      __Pyx_GIVEREF(__pyx_v_var);
      __Pyx_INCREF(__pyx_v_aggDimName);
      PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_aggDimName);
      __Pyx_GIVEREF(__pyx_v_aggDimName);
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vars); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_varname, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L49;
    }
    __pyx_L49:;
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":516
 *             if varname in self._cdfRecVar.keys():
 *                 self._vars[varname] = _Variable(self, varname, var, aggDimName)
 *         self._file_format = []             # <<<<<<<<<<<<<<
 *         for dset in self._cdf:
 *             if dset.file_format == 'NETCDF4':
 */
  __pyx_t_14 = PyList_New(0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_14);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_format, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":517
 *                 self._vars[varname] = _Variable(self, varname, var, aggDimName)
 *         self._file_format = []
 *         for dset in self._cdf:             # <<<<<<<<<<<<<<
 *             if dset.file_format == 'NETCDF4':
 *                 raise ValueError('MFNetCDF4 only works with NETCDF3_CLASSIC, NETCDF3_64BIT and NETCDF4_CLASSIC formatted files, not NETCDF4')
 */
  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_14);
  if (PyList_CheckExact(__pyx_t_14) || PyTuple_CheckExact(__pyx_t_14)) {
    __pyx_t_8 = __pyx_t_14; __Pyx_INCREF(__pyx_t_8); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = Py_TYPE(__pyx_t_8)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  for (;;) {
    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_8)) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_14 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_14); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_14 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_8)) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_14); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_14 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_14 = __pyx_t_7(__pyx_t_8);
      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 = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_14);
    }
    __Pyx_XDECREF_SET(__pyx_v_dset, __pyx_t_14);
    __pyx_t_14 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":518
 *         self._file_format = []
 *         for dset in self._cdf:
 *             if dset.file_format == '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_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_file_format_2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_14, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (__pyx_t_12) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":519
 *         for dset in self._cdf:
 *             if dset.file_format == '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_14 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_Raise(__pyx_t_14, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":520
 *             if dset.file_format == '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)             # <<<<<<<<<<<<<<
 * 
 *     def __setattr__(self, name, value):
 */
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_format); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_file_format_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_18 = __Pyx_PyObject_Append(__pyx_t_14, __pyx_t_5); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":349
 *     """
 * 
 *     def __init__(self, files, check=False, aggdim=None, exclude=[]):             # <<<<<<<<<<<<<<
 *         """
 * Open a Dataset spanning multiple files, making it look as if it was a
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __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;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":522
 *             self._file_format.append(dset.file_format)
 * 
 *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
 *         """override base class attribute creation"""
 *         self.__dict__[name] = value
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9MFDataset_3__setattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_9MFDataset_2__setattr__[] = "override base class attribute creation";
static PyMethodDef __pyx_mdef_7netCDF4_9MFDataset_3__setattr__ = {__Pyx_NAMESTR("__setattr__"), (PyCFunction)__pyx_pw_7netCDF4_9MFDataset_3__setattr__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__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;}
      }
    } 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);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":524
 *     def __setattr__(self, name, value):
 *         """override base class attribute creation"""
 *         self.__dict__[name] = value             # <<<<<<<<<<<<<<
 * 
 *     def __getattribute__(self, name):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":522
 *             self._file_format.append(dset.file_format)
 * 
 *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
 *         """override base class attribute creation"""
 *         self.__dict__[name] = value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.MFDataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":526
 *         self.__dict__[name] = value
 * 
 *     def __getattribute__(self, name):             # <<<<<<<<<<<<<<
 *         if name in ['variables','dimensions','file_format','groups']:
 *             if name == 'dimensions': return self._dims
 */

/* 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__ = {__Pyx_NAMESTR("__getattribute__"), (PyCFunction)__pyx_pw_7netCDF4_9MFDataset_5__getattribute__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_9MFDataset_5__getattribute__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattribute__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getattribute__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattribute__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_name = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getattribute__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.MFDataset.__getattribute__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_9MFDataset_4__getattribute__(__pyx_self, __pyx_v_self, __pyx_v_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9MFDataset_4__getattribute__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  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("__getattribute__", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":527
 * 
 *     def __getattribute__(self, name):
 *         if name in ['variables','dimensions','file_format','groups']:             # <<<<<<<<<<<<<<
 *             if name == 'dimensions': return self._dims
 *             if name == 'variables': return self._vars
 */
  __Pyx_INCREF(__pyx_v_name);
  __pyx_t_1 = __pyx_v_name;
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_variables, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_2) {
    __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;}
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  if (!__pyx_t_4) {
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_file_format_2, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_4;
  }
  if (!__pyx_t_3) {
    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_groups, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __pyx_t_4;
  } else {
    __pyx_t_2 = __pyx_t_3;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":528
 *     def __getattribute__(self, name):
 *         if name in ['variables','dimensions','file_format','groups']:
 *             if name == 'dimensions': return self._dims             # <<<<<<<<<<<<<<
 *             if name == 'variables': return self._vars
 *             if name == 'file_format': return self._file_format
 */
    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dimensions, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 528; __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 = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
    }

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":529
 *         if name in ['variables','dimensions','file_format','groups']:
 *             if name == 'dimensions': return self._dims
 *             if name == 'variables': return self._vars             # <<<<<<<<<<<<<<
 *             if name == 'file_format': return self._file_format
 *             if name == 'groups': return self._grps
 */
    __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 = 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_vars); 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;
    }

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":530
 *             if name == 'dimensions': return self._dims
 *             if name == 'variables': return self._vars
 *             if name == 'file_format': return self._file_format             # <<<<<<<<<<<<<<
 *             if name == 'groups': return self._grps
 *         else:
 */
    __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 = 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_file_format); 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;
    }

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":531
 *             if name == 'variables': return self._vars
 *             if name == 'file_format': return self._file_format
 *             if name == 'groups': return self._grps             # <<<<<<<<<<<<<<
 *         else:
 *             return Dataset.__getattribute__(self, name)
 */
    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_groups, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 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_grps); 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;
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":533
 *             if name == 'groups': return self._grps
 *         else:
 *             return Dataset.__getattribute__(self, name)             # <<<<<<<<<<<<<<
 * 
 *     def ncattrs(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)), __pyx_n_s_getattribute); 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_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 533; __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_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":526
 *         self.__dict__[name] = value
 * 
 *     def __getattribute__(self, name):             # <<<<<<<<<<<<<<
 *         if name in ['variables','dimensions','file_format','groups']:
 *             if name == 'dimensions': return self._dims
 */

  /* 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_6);
  __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;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":535
 *             return Dataset.__getattribute__(self, name)
 * 
 *     def ncattrs(self):             # <<<<<<<<<<<<<<
 *         return self._cdf[0].__dict__.keys()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9MFDataset_7ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_9MFDataset_7ncattrs = {__Pyx_NAMESTR("ncattrs"), (PyCFunction)__pyx_pw_7netCDF4_9MFDataset_7ncattrs, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_9MFDataset_7ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ncattrs (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9MFDataset_6ncattrs(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9MFDataset_6ncattrs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ncattrs", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":536
 * 
 *     def ncattrs(self):
 *         return self._cdf[0].__dict__.keys()             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __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 = 536; __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[1]; __pyx_lineno = 536; __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_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":535
 *             return Dataset.__getattribute__(self, name)
 * 
 *     def ncattrs(self):             # <<<<<<<<<<<<<<
 *         return self._cdf[0].__dict__.keys()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("netCDF4.MFDataset.ncattrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":538
 *         return self._cdf[0].__dict__.keys()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         for dset in self._cdf:
 *             dset.close()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9MFDataset_9close(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_9MFDataset_9close = {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_7netCDF4_9MFDataset_9close, METH_O, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":539
 * 
 *     def close(self):
 *         for dset in self._cdf:             # <<<<<<<<<<<<<<
 *             dset.close()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cdf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (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 = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (!__pyx_t_4 && 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 = 539; __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 = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
      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 = 539; __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 = 539; __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 = 539; __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;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":540
 *     def close(self):
 *         for dset in self._cdf:
 *             dset.close()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_close); 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_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 540; __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_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":538
 *         return self._cdf[0].__dict__.keys()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         for dset in self._cdf:
 *             dset.close()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_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;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":542
 *             dset.close()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         ncdump = ['%r\n' % type(self)]
 *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9MFDataset_11__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_9MFDataset_11__str__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_7netCDF4_9MFDataset_11__str__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_9MFDataset_11__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9MFDataset_10__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9MFDataset_10__str__(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;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":543
 * 
 *     def __str__(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 = 543; __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 = 543; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":544
 *     def __str__(self):
 *         ncdump = ['%r\n' % type(self)]
 *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])             # <<<<<<<<<<<<<<
 *         varnames = tuple([str(varname) for varname in self.variables.keys()])
 *         grpnames = ()
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 544; __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 = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 544; __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_Call(__pyx_t_3, __pyx_empty_tuple, NULL); 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_3); __pyx_t_3 = 0;
  if (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 = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (!__pyx_t_5 && 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 = 544; __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 = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      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 = 544; __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 = 544; __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 = 544; __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 = 544; __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 = 544; __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 = 544; __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 = 544; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":545
 *         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_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_6)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __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 = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_6)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __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 = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_6);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __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 = 545; __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_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __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_6 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_varnames = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":546
 *         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 file format):\n' % self.file_format)
 */
  __Pyx_INCREF(__pyx_empty_tuple);
  __pyx_v_grpnames = __pyx_empty_tuple;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":547
 *         varnames = tuple([str(varname) for varname in self.variables.keys()])
 *         grpnames = ()
 *         if self.path == '/':             # <<<<<<<<<<<<<<
 *             ncdump.append('root group (%s file format):\n' % self.file_format)
 *         else:
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_kp_s__15, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_7) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":548
 *         grpnames = ()
 *         if self.path == '/':
 *             ncdump.append('root group (%s file format):\n' % self.file_format)             # <<<<<<<<<<<<<<
 *         else:
 *             ncdump.append('group %s:\n' % self.path)
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_format_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_root_group_s_file_format, __pyx_t_6); 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_6); __pyx_t_6 = 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 = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":550
 *             ncdump.append('root group (%s file format):\n' % self.file_format)
 *         else:
 *             ncdump.append('group %s:\n' % self.path)             # <<<<<<<<<<<<<<
 *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\
 *                 self.ncattrs()]
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_group_s, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_L7:;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":551
 *         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_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":552
 *             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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ncattrs); 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_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (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 = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (!__pyx_t_5 && 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 = 552; __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 = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      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 = 552; __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 = 552; __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 = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":551
 *         else:
 *             ncdump.append('group %s:\n' % self.path)
 *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\             # <<<<<<<<<<<<<<
 *                 self.ncattrs()]
 *         ncdump = ncdump + attrs
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); 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_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_name); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 551; __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(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_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_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 551; __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;
  __pyx_v_attrs = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":553
 *         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_6 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF_SET(__pyx_v_ncdump, ((PyObject*)__pyx_t_6));
  __pyx_t_6 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":554
 *                 self.ncattrs()]
 *         ncdump = ncdump + attrs
 *         ncdump.append('    dimensions = %s\n' % str(dimnames))             # <<<<<<<<<<<<<<
 *         ncdump.append('    variables = %s\n' % str(varnames))
 *         ncdump.append('    groups = %s\n' % str(grpnames))
 */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_dimnames);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_dimnames);
  __Pyx_GIVEREF(__pyx_v_dimnames);
  __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 = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_dimensions_s, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":555
 *         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_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_varnames);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_varnames);
  __Pyx_GIVEREF(__pyx_v_varnames);
  __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 = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_variables_s, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_6); 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_6); __pyx_t_6 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":556
 *         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_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_grpnames);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_grpnames);
  __Pyx_GIVEREF(__pyx_v_grpnames);
  __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 = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_groups_s, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":557
 *         ncdump.append('    variables = %s\n' % str(varnames))
 *         ncdump.append('    groups = %s\n' % str(grpnames))
 *         return ''.join(ncdump)             # <<<<<<<<<<<<<<
 * 
 * class _Dimension(object):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_v_ncdump); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":542
 *             dset.close()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         ncdump = ['%r\n' % type(self)]
 *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("netCDF4.MFDataset.__str__", __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;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":560
 * 
 * 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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_7netCDF4_10_Dimension_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_10_Dimension_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_dimname = 0;
  CYTHON_UNUSED PyObject *__pyx_v_dim = 0;
  PyObject *__pyx_v_dimlens = 0;
  PyObject *__pyx_v_dimtotlen = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_dimname,&__pyx_n_s_dim,&__pyx_n_s_dimlens,&__pyx_n_s_dimtotlen,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimname)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 560; __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 = 560; __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 = 560; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimtotlen)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 560; __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 = 560; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_self = values[0];
    __pyx_v_dimname = values[1];
    __pyx_v_dim = values[2];
    __pyx_v_dimlens = values[3];
    __pyx_v_dimtotlen = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4._Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_10_Dimension___init__(__pyx_self, __pyx_v_self, __pyx_v_dimname, __pyx_v_dim, __pyx_v_dimlens, __pyx_v_dimtotlen);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_10_Dimension___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dimname, CYTHON_UNUSED PyObject *__pyx_v_dim, PyObject *__pyx_v_dimlens, PyObject *__pyx_v_dimtotlen) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":561
 * class _Dimension(object):
 *     def __init__(self, dimname, dim, dimlens, dimtotlen):
 *         self.dimlens = dimlens             # <<<<<<<<<<<<<<
 *         self.dimtotlen = dimtotlen
 *         self._name = dimname
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dimlens, __pyx_v_dimlens) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":562
 *     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 = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":563
 *         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 = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":560
 * 
 * class _Dimension(object):
 *     def __init__(self, dimname, dim, dimlens, dimtotlen):             # <<<<<<<<<<<<<<
 *         self.dimlens = dimlens
 *         self.dimtotlen = dimtotlen
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("netCDF4._Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":564
 *         self.dimtotlen = dimtotlen
 *         self._name = dimname
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.dimtotlen
 *     def isunlimited(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_10_Dimension_3__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_10_Dimension_3__len__ = {__Pyx_NAMESTR("__len__"), (PyCFunction)__pyx_pw_7netCDF4_10_Dimension_3__len__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_10_Dimension_3__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_10_Dimension_2__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_10_Dimension_2__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":565
 *         self._name = dimname
 *     def __len__(self):
 *         return self.dimtotlen             # <<<<<<<<<<<<<<
 *     def isunlimited(self):
 *         return True
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimtotlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":564
 *         self.dimtotlen = dimtotlen
 *         self._name = dimname
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.dimtotlen
 *     def isunlimited(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4._Dimension.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":566
 *     def __len__(self):
 *         return self.dimtotlen
 *     def isunlimited(self):             # <<<<<<<<<<<<<<
 *         return True
 *     def __str__(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 = {__Pyx_NAMESTR("isunlimited"), (PyCFunction)__pyx_pw_7netCDF4_10_Dimension_5isunlimited, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_10_Dimension_5isunlimited(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isunlimited (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_10_Dimension_4isunlimited(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_10_Dimension_4isunlimited(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isunlimited", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":567
 *         return self.dimtotlen
 *     def isunlimited(self):
 *         return True             # <<<<<<<<<<<<<<
 *     def __str__(self):
 *         if self.isunlimited():
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":566
 *     def __len__(self):
 *         return self.dimtotlen
 *     def isunlimited(self):             # <<<<<<<<<<<<<<
 *         return True
 *     def __str__(self):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":568
 *     def isunlimited(self):
 *         return True
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         if self.isunlimited():
 *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_10_Dimension_7__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_10_Dimension_7__str__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_7netCDF4_10_Dimension_7__str__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_10_Dimension_7__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_10_Dimension_6__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_10_Dimension_6__str__(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;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  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("__str__", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":569
 *         return True
 *     def __str__(self):
 *         if self.isunlimited():             # <<<<<<<<<<<<<<
 *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_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[1]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":570
 *     def __str__(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_2 = PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); 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_t_4 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __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[1]; __pyx_lineno = 570; __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_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_1 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_name_s_size_s, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":572
 *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
 *         else:
 *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))             # <<<<<<<<<<<<<<
 * 
 * class _Variable(object):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 572; __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_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_name_s_size_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 572; __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_6, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 572; __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;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":568
 *     def isunlimited(self):
 *         return True
 *     def __str__(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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("netCDF4._Dimension.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":575
 * 
 * class _Variable(object):
 *     def __init__(self, dset, varname, var, recdimname):             # <<<<<<<<<<<<<<
 *         self.dimensions = var.dimensions
 *         self._dset = dset
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9_Variable_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_7netCDF4_9_Variable_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_9_Variable_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_dset = 0;
  PyObject *__pyx_v_varname = 0;
  PyObject *__pyx_v_var = 0;
  PyObject *__pyx_v_recdimname = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_dset,&__pyx_n_s_varname,&__pyx_n_s_var,&__pyx_n_s_recdimname,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 575; __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 = 575; __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 = 575; __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 = 575; __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 = 575; __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 = 575; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4._Variable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_9_Variable___init__(__pyx_self, __pyx_v_self, __pyx_v_dset, __pyx_v_varname, __pyx_v_var, __pyx_v_recdimname);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9_Variable___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dset, PyObject *__pyx_v_varname, PyObject *__pyx_v_var, PyObject *__pyx_v_recdimname) {
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  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_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":576
 * 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 = 576; __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 = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":577
 *     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 = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":578
 *         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 = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":579
 *         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 = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":580
 *         self._grp = dset
 *         self._mastervar = var
 *         self._recVar = dset._cdfRecVar[varname]             # <<<<<<<<<<<<<<
 *         self._recdimname = recdimname
 *         self._recLen = dset._cdfVLen
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dset, __pyx_n_s_cdfRecVar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 580; __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 = 580; __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 = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":581
 *         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 = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":582
 *         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 = 582; __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 = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":583
 *         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 = 583; __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 = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":584
 *         self._recLen = dset._cdfVLen
 *         self.dtype = var.dtype
 *         self._name = var._name             # <<<<<<<<<<<<<<
 *         # copy attributes from master.
 *         for name, value in var.__dict__.items():
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 584; __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 = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":586
 *         self._name = var._name
 *         # copy attributes from master.
 *         for name, value in var.__dict__.items():             # <<<<<<<<<<<<<<
 *             self.__dict__[name] = value
 *     def typecode(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__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 = 586; __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 = 586; __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 = 586; __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 = 586; __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 = 586; __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_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_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_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 = 586; __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 = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":587
 *         # 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 = 587; __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 = 587; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":575
 * 
 * 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_5);
  __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;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":588
 *         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 = {__Pyx_NAMESTR("typecode"), (PyCFunction)__pyx_pw_7netCDF4_9_Variable_3typecode, METH_O, __Pyx_DOCSTR(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);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":589
 *             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 = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":588
 *         for name, value in var.__dict__.items():
 *             self.__dict__[name] = value
 *     def typecode(self):             # <<<<<<<<<<<<<<
 *         return self.dtype
 *     def ncattrs(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4._Variable.typecode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":590
 *     def typecode(self):
 *         return self.dtype
 *     def ncattrs(self):             # <<<<<<<<<<<<<<
 *         return self._mastervar.__dict__.keys()
 *     def __getattr__(self,name):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9_Variable_5ncattrs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_5ncattrs = {__Pyx_NAMESTR("ncattrs"), (PyCFunction)__pyx_pw_7netCDF4_9_Variable_5ncattrs, METH_O, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ncattrs", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":591
 *         return self.dtype
 *     def ncattrs(self):
 *         return self._mastervar.__dict__.keys()             # <<<<<<<<<<<<<<
 *     def __getattr__(self,name):
 *         if name == 'shape': return self._shape()
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mastervar); 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __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_keys); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 591; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":590
 *     def typecode(self):
 *         return self.dtype
 *     def ncattrs(self):             # <<<<<<<<<<<<<<
 *         return self._mastervar.__dict__.keys()
 *     def __getattr__(self,name):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("netCDF4._Variable.ncattrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":592
 *     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__ = {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pw_7netCDF4_9_Variable_7__getattr__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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 = 592; __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 = 592; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_name = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 592; __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;
  Py_ssize_t __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":593
 *         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 = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {
    __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 = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 593; __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;
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":594
 *     def __getattr__(self,name):
 *         if name == 'shape': return self._shape()
 *         if name == 'ndim': return len(self._shape())             # <<<<<<<<<<<<<<
 *         try:
 *             return self.__dict__[name]
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_ndim, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 594; __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 = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":595
 *         if name == 'shape': return self._shape()
 *         if name == 'ndim': return len(self._shape())
 *         try:             # <<<<<<<<<<<<<<
 *             return self.__dict__[name]
 *         except:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":596
 *         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 = 596; __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 = 596; __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_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;
    goto __pyx_L12_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":597
 *         try:
 *             return self.__dict__[name]
 *         except:             # <<<<<<<<<<<<<<
 *             raise AttributeError(name)
 *     def __str__(self):
 */
    /*except:*/ {
      __Pyx_AddTraceback("netCDF4._Variable.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_8);

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":598
 *             return self.__dict__[name]
 *         except:
 *             raise AttributeError(name)             # <<<<<<<<<<<<<<
 *     def __str__(self):
 *         ncdump_var = ['%r\n' % type(self)]
 */
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 598; __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 = 598; __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 = 598; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_exception_handled;
    }
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L9_try_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    __pyx_L12_try_end:;
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":592
 *     def ncattrs(self):
 *         return self._mastervar.__dict__.keys()
 *     def __getattr__(self,name):             # <<<<<<<<<<<<<<
 *         if name == 'shape': return self._shape()
 *         if name == 'ndim': return len(self._shape())
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __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;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":599
 *         except:
 *             raise AttributeError(name)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         ncdump_var = ['%r\n' % type(self)]
 *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9_Variable_9__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_9__str__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_7netCDF4_9_Variable_9__str__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_9_Variable_9__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9_Variable_8__str__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9_Variable_8__str__(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;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":600
 *             raise AttributeError(name)
 *     def __str__(self):
 *         ncdump_var = ['%r\n' % type(self)]             # <<<<<<<<<<<<<<
 *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
 *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\
 */
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r, ((PyObject *)Py_TYPE(__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 600; __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 = 600; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":601
 *     def __str__(self):
 *         ncdump_var = ['%r\n' % type(self)]
 *         dimnames = tuple([str(dimname) for dimname in self.dimensions])             # <<<<<<<<<<<<<<
 *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\
 *                 self.ncattrs()]
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 601; __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 = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (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 = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (!__pyx_t_5 && 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 = 601; __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 = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      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 = 601; __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 = 601; __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 = 601; __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 = 601; __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 = 601; __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 = 601; __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 = 601; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":602
 *         ncdump_var = ['%r\n' % type(self)]
 *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
 *         attrs = ['    %s: %s\n' % (name,self.__dict__[name]) for name in\             # <<<<<<<<<<<<<<
 *                 self.ncattrs()]
 *         ncdump_var.append('%s %s%s\n' %\
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":603
 *         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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
    __pyx_t_2 = __pyx_t_6; __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_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_2);
      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 = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":602
 *         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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyObject_GetItem(__pyx_t_6, __pyx_v_name); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_6, 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_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 602; __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_3);
  __pyx_t_3 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":605
 *                 self.ncattrs()]
 *         ncdump_var.append('%s %s%s\n' %\
 *         (self.dtype,self._name,dimnames))             # <<<<<<<<<<<<<<
 *         ncdump_var = ncdump_var + attrs
 *         unlimdims = []
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __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 = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(3); 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);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __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_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":604
 *         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_2 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":606
 *         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_2 = PyNumber_Add(__pyx_v_ncdump_var, __pyx_v_attrs); 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_DECREF_SET(__pyx_v_ncdump_var, ((PyObject*)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":607
 *         (self.dtype,self._name,dimnames))
 *         ncdump_var = ncdump_var + attrs
 *         unlimdims = []             # <<<<<<<<<<<<<<
 *         for dimname in self.dimensions:
 *             dim = _find_dim(self._grp, dimname)
 */
  __pyx_t_2 = PyList_New(0); 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_v_unlimdims = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":608
 *         ncdump_var = ncdump_var + attrs
 *         unlimdims = []
 *         for dimname in self.dimensions:             # <<<<<<<<<<<<<<
 *             dim = _find_dim(self._grp, dimname)
 *             if dim.isunlimited():
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (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[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_5 && 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[1]; __pyx_lineno = 608; __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[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
      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[1]; __pyx_lineno = 608; __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[1]; __pyx_lineno = 608; __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[1]; __pyx_lineno = 608; __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;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":609
 *         unlimdims = []
 *         for dimname in self.dimensions:
 *             dim = _find_dim(self._grp, dimname)             # <<<<<<<<<<<<<<
 *             if dim.isunlimited():
 *                 unlimdims.append(str(dimname))
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 609; __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 = 609; __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_dimname);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_dimname);
    __Pyx_GIVEREF(__pyx_v_dimname);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 609; __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_6); __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":610
 *         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 = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_8) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":611
 *             dim = _find_dim(self._grp, dimname)
 *             if dim.isunlimited():
 *                 unlimdims.append(str(dimname))             # <<<<<<<<<<<<<<
 *         ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims)))
 *         ncdump_var.append('current size = %s\n' % repr(self.shape))
 */
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 611; __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 = 611; __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 = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L9;
    }
    __pyx_L9:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":612
 *             if dim.isunlimited():
 *                 unlimdims.append(str(dimname))
 *         ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims)))             # <<<<<<<<<<<<<<
 *         ncdump_var.append('current size = %s\n' % repr(self.shape))
 *         return ''.join(ncdump_var)
 */
  __pyx_t_1 = PyList_AsTuple(__pyx_v_unlimdims); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 612; __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 = 612; __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 = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":613
 *                 unlimdims.append(str(dimname))
 *         ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims)))
 *         ncdump_var.append('current size = %s\n' % repr(self.shape))             # <<<<<<<<<<<<<<
 *         return ''.join(ncdump_var)
 *     def __len__(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 613; __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 = 613; __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 = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":614
 *         ncdump_var.append('unlimited dimensions = %s\n' % repr(tuple(unlimdims)))
 *         ncdump_var.append('current size = %s\n' % repr(self.shape))
 *         return ''.join(ncdump_var)             # <<<<<<<<<<<<<<
 *     def __len__(self):
 *         return self._shape()[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_v_ncdump_var); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":599
 *         except:
 *             raise AttributeError(name)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         ncdump_var = ['%r\n' % type(self)]
 *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("netCDF4._Variable.__str__", __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;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":615
 *         ncdump_var.append('current size = %s\n' % repr(self.shape))
 *         return ''.join(ncdump_var)
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape()[0]
 *     def _shape(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9_Variable_11__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_11__len__ = {__Pyx_NAMESTR("__len__"), (PyCFunction)__pyx_pw_7netCDF4_9_Variable_11__len__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_9_Variable_11__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9_Variable_10__len__(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9_Variable_10__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":616
 *         return ''.join(ncdump_var)
 *     def __len__(self):
 *         return self._shape()[0]             # <<<<<<<<<<<<<<
 *     def _shape(self):
 *         recdimlen = len(self._dset.dimensions[self._recdimname])
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 616; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":615
 *         ncdump_var.append('current size = %s\n' % repr(self.shape))
 *         return ''.join(ncdump_var)
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape()[0]
 *     def _shape(self):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("netCDF4._Variable.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":617
 *     def __len__(self):
 *         return self._shape()[0]
 *     def _shape(self):             # <<<<<<<<<<<<<<
 *         recdimlen = len(self._dset.dimensions[self._recdimname])
 *         return (recdimlen,) + self._mastervar.shape[1:]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9_Variable_13_shape(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_13_shape = {__Pyx_NAMESTR("_shape"), (PyCFunction)__pyx_pw_7netCDF4_9_Variable_13_shape, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_9_Variable_13_shape(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_shape (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9_Variable_12_shape(__pyx_self, ((PyObject *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9_Variable_12_shape(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_v_recdimlen;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_shape", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":618
 *         return self._shape()[0]
 *     def _shape(self):
 *         recdimlen = len(self._dset.dimensions[self._recdimname])             # <<<<<<<<<<<<<<
 *         return (recdimlen,) + self._mastervar.shape[1:]
 *     def set_auto_maskandscale(self,val):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dset_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 618; __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 = 618; __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 = 618; __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 = 618; __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 = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_recdimlen = __pyx_t_4;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":619
 *     def _shape(self):
 *         recdimlen = len(self._dset.dimensions[self._recdimname])
 *         return (recdimlen,) + self._mastervar.shape[1:]             # <<<<<<<<<<<<<<
 *     def set_auto_maskandscale(self,val):
 *         for v in self._recVar:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_recdimlen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __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 = 619; __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 = 619; __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 = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_2, 1, 0, NULL, NULL, &__pyx_slice__17, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __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 = 619; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":617
 *     def __len__(self):
 *         return self._shape()[0]
 *     def _shape(self):             # <<<<<<<<<<<<<<
 *         recdimlen = len(self._dset.dimensions[self._recdimname])
 *         return (recdimlen,) + self._mastervar.shape[1:]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("netCDF4._Variable._shape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":620
 *         recdimlen = len(self._dset.dimensions[self._recdimname])
 *         return (recdimlen,) + self._mastervar.shape[1:]
 *     def set_auto_maskandscale(self,val):             # <<<<<<<<<<<<<<
 *         for v in self._recVar:
 *             v.set_auto_maskandscale(val)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9_Variable_15set_auto_maskandscale(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_15set_auto_maskandscale = {__Pyx_NAMESTR("set_auto_maskandscale"), (PyCFunction)__pyx_pw_7netCDF4_9_Variable_15set_auto_maskandscale, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_9_Variable_15set_auto_maskandscale(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_val = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_auto_maskandscale (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_val,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_auto_maskandscale", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_auto_maskandscale") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_val = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_auto_maskandscale", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4._Variable.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_9_Variable_14set_auto_maskandscale(__pyx_self, __pyx_v_self, __pyx_v_val);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9_Variable_14set_auto_maskandscale(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_auto_maskandscale", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":621
 *         return (recdimlen,) + self._mastervar.shape[1:]
 *     def set_auto_maskandscale(self,val):
 *         for v in self._recVar:             # <<<<<<<<<<<<<<
 *             v.set_auto_maskandscale(val)
 *     def __getitem__(self, elem):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (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 = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (!__pyx_t_4 && 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 = 621; __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 = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
      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 = 621; __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 = 621; __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 = 621; __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;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":622
 *     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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_val);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_val);
    __Pyx_GIVEREF(__pyx_v_val);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 622; __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_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":620
 *         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_AddTraceback("netCDF4._Variable.set_auto_maskandscale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":623
 *         for v in self._recVar:
 *             v.set_auto_maskandscale(val)
 *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
 *         """Get records from a concatenated set of variables."""
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9_Variable_17__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_9_Variable_16__getitem__[] = "Get records from a concatenated set of variables.";
static PyMethodDef __pyx_mdef_7netCDF4_9_Variable_17__getitem__ = {__Pyx_NAMESTR("__getitem__"), (PyCFunction)__pyx_pw_7netCDF4_9_Variable_17__getitem__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_9_Variable_16__getitem__)};
static PyObject *__pyx_pw_7netCDF4_9_Variable_17__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_elem = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_elem,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elem)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 623; __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 = 623; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_elem = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4._Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_9_Variable_16__getitem__(__pyx_self, __pyx_v_self, __pyx_v_elem);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9_Variable_16__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_elem) {
  PyObject *__pyx_v_start = NULL;
  PyObject *__pyx_v_count = NULL;
  PyObject *__pyx_v_stride = NULL;
  PyObject *__pyx_v_put_ind = NULL;
  PyObject *__pyx_v_datashape = NULL;
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_v_squeeze = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_strt = NULL;
  PyObject *__pyx_v_cnt = NULL;
  PyObject *__pyx_v_strd = NULL;
  Py_ssize_t __pyx_v_nv;
  PyObject *__pyx_v_ind = NULL;
  PyObject *__pyx_v_sta = NULL;
  PyObject *__pyx_v_step = NULL;
  PyObject *__pyx_v_stop = NULL;
  PyObject *__pyx_v_idx = NULL;
  PyObject *__pyx_v_vid = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_lst = NULL;
  PyObject *__pyx_v_newSlice = NULL;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_lstArr = NULL;
  int __pyx_v_ismasked;
  PyObject *__pyx_v_dat = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_fill_value = NULL;
  PyObject *__pyx_v_numv = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  PyObject *(*__pyx_t_18)(PyObject *);
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_t_23;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":632
 *         # 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_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_elem);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_elem);
  __Pyx_GIVEREF(__pyx_v_elem);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 632; __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;
  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 != 4)) {
      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __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_1 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 3); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[4] = {&__pyx_t_3,&__pyx_t_1,&__pyx_t_4,&__pyx_t_5};
      for (i=0; i < 4; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[4] = {&__pyx_t_3,&__pyx_t_1,&__pyx_t_4,&__pyx_t_5};
    __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
    for (index=0; index < 4; index++) {
      PyObject* item = __pyx_t_7(__pyx_t_6); if (unlikely(!item)) goto __pyx_L3_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":631
 *         # 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_3;
  __pyx_t_3 = 0;
  __pyx_v_count = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_stride = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_put_ind = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":633
 *         start, count, stride, put_ind =\
 *         _StartCountStride(elem, self.shape)
 *         datashape = _out_array_shape(count)             # <<<<<<<<<<<<<<
 *         data = ma.empty(datashape, dtype=self.dtype)
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 633; __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[1]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_count);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_count);
  __Pyx_GIVEREF(__pyx_v_count);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 633; __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_v_datashape = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":634
 *         _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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 634; __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(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_datashape);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_datashape);
  __Pyx_GIVEREF(__pyx_v_datashape);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __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 = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 634; __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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":640
 *         # 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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 640; __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;
  __pyx_v_squeeze = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":641
 *         # 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_2 = __pyx_int_0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, -1, NULL, NULL, &__pyx_slice__19, 0, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_4)) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_4)) {
      if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_1 = __pyx_t_9(__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 = 641; __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_INCREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":642
 *         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 = PyObject_RichCompare(__pyx_v_n, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_10) {
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(Py_Ellipsis);
      PyTuple_SET_ITEM(__pyx_t_1, 0, Py_Ellipsis);
      __Pyx_GIVEREF(Py_Ellipsis);
      __Pyx_INCREF(__pyx_v_i);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      __pyx_t_5 = PyObject_GetItem(__pyx_v_put_ind, __pyx_t_1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __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_GetAttrStr(__pyx_t_5, __pyx_n_s_ravel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __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_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_12 = __pyx_t_11;
    } else {
      __pyx_t_12 = __pyx_t_10;
    }
    if (__pyx_t_12) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":643
 *         for i,n in enumerate(put_ind.shape[:-1]):
 *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
 *                 squeeze[i] = 0             # <<<<<<<<<<<<<<
 * 
 *         # Reshape the arrays so we can iterate over them.
 */
      if (unlikely(PyObject_SetItem(__pyx_v_squeeze, __pyx_v_i, __pyx_int_0) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L7;
    }
    __pyx_L7:;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":646
 * 
 *         # 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __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 = 646; __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[1]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_12) {
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_5 = __pyx_int_1;
  } else {
    __pyx_t_5 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 646; __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_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 646; __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_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 646; __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_v_strt = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":647
 *         # 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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); 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_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_12) {
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_2 = __pyx_int_1;
  } else {
    __pyx_t_2 = __pyx_t_5;
    __pyx_t_5 = 0;
  }
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__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 = 647; __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 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_cnt = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":648
 *         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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_12) {
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_4 = __pyx_int_1;
  } else {
    __pyx_t_4 = __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 = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __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_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __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_v_strd = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":649
 *         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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __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 = 649; __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[1]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_12) {
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_5 = __pyx_int_1;
  } else {
    __pyx_t_5 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 649; __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_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 649; __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_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 649; __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_DECREF_SET(__pyx_v_put_ind, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":653
 *         # 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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); 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_8 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_8 == -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_v_nv = __pyx_t_8;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":654
 *         # 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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); 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_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_strt);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_strt);
  __Pyx_GIVEREF(__pyx_v_strt);
  __Pyx_INCREF(__pyx_v_cnt);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_cnt);
  __Pyx_GIVEREF(__pyx_v_cnt);
  __Pyx_INCREF(__pyx_v_strd);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_strd);
  __Pyx_GIVEREF(__pyx_v_strd);
  __Pyx_INCREF(__pyx_v_put_ind);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_put_ind);
  __Pyx_GIVEREF(__pyx_v_put_ind);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 654; __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_5); __pyx_t_5 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_5)) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_5)) {
      if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_9(__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[1]; __pyx_lineno = 654; __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 != 4)) {
        if (size > 4) __Pyx_RaiseTooManyValuesError(4);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 654; __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_1 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 3); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 3); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      #else
      {
        Py_ssize_t i;
        PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_1,&__pyx_t_3,&__pyx_t_6};
        for (i=0; i < 4; i++) {
          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(item);
          *(temps[i]) = item;
        }
      }
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_1,&__pyx_t_3,&__pyx_t_6};
      __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = Py_TYPE(__pyx_t_13)->tp_iternext;
      for (index=0; index < 4; index++) {
        PyObject* item = __pyx_t_7(__pyx_t_13); if (unlikely(!item)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(item);
        *(temps[index]) = item;
      }
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_13), 4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = 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_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L11_unpacking_done:;
    }
    __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_count, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_stride, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_ind, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":656
 *         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_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyList_CheckExact(__pyx_v_count) || PyTuple_CheckExact(__pyx_v_count)) {
      __pyx_t_6 = __pyx_v_count; __Pyx_INCREF(__pyx_t_6); __pyx_t_14 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_14 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_count); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_15 = Py_TYPE(__pyx_t_6)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_6)) {
        if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_14); __Pyx_INCREF(__pyx_t_3); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_6)) {
        if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_14); __Pyx_INCREF(__pyx_t_3); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_3 = __pyx_t_15(__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 = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_DECREF_SET(__pyx_v_cnt, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Absolute(__pyx_v_cnt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __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_DECREF_SET(__pyx_v_count, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":657
 *             # 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 = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_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 = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_stride);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stride);
    __Pyx_GIVEREF(__pyx_v_stride);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_any); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_12) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":658
 *             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_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":661
 *             # Start, stop and step along 1st dimension, eg the unlimited
 *             # dimension.
 *             sta = start[0]             # <<<<<<<<<<<<<<
 *             step = stride[0]
 *             stop = sta + count[0] * step
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_start, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_sta, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":662
 *             # dimension.
 *             sta = start[0]
 *             step = stride[0]             # <<<<<<<<<<<<<<
 *             stop = sta + count[0] * step
 * 
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_stride, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_step, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":663
 *             sta = start[0]
 *             step = stride[0]
 *             stop = sta + count[0] * step             # <<<<<<<<<<<<<<
 * 
 *             # Build a list representing the concatenated list of all records in
 */
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_count, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_v_step); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 663; __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_v_sta, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_stop, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":670
 *             #  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_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_idx, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":671
 *             #  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_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_vid, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":672
 *             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_2 = PyInt_FromSsize_t(__pyx_v_nv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __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[1]; __pyx_lineno = 672; __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_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_14 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_14 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_15 = Py_TYPE(__pyx_t_3)->tp_iternext;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_3)) {
        if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_2); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_3)) {
        if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_2); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_2 = __pyx_t_15(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":673
 *             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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_v_n); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":674
 *             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_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_k);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_k);
      __Pyx_GIVEREF(__pyx_v_k);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_16 = __Pyx_PyList_Extend(__pyx_v_idx, __pyx_t_2); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":675
 *                 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_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_n);
      PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_n);
      __Pyx_GIVEREF(__pyx_v_n);
      { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_k); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_temp);
        __Pyx_DECREF(__pyx_t_2);
        __pyx_t_2 = __pyx_temp;
      }
      __pyx_t_16 = __Pyx_PyList_Extend(__pyx_v_vid, __pyx_t_2); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 675; __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;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":679
 *             # Merge the two lists to get a list of 2-elem lists.
 *             # Slice this list along the first dimension.
 *             lst = list(zip(idx, vid)).__getitem__(slice(sta, stop, step))             # <<<<<<<<<<<<<<
 * 
 *             # Rebuild the slicing expression for dimensions 1 and ssq.
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_idx);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_idx);
    __Pyx_GIVEREF(__pyx_v_idx);
    __Pyx_INCREF(__pyx_v_vid);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_vid);
    __Pyx_GIVEREF(__pyx_v_vid);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getitem); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_sta);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_sta);
    __Pyx_GIVEREF(__pyx_v_sta);
    __Pyx_INCREF(__pyx_v_stop);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_stop);
    __Pyx_GIVEREF(__pyx_v_stop);
    __Pyx_INCREF(__pyx_v_step);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_step);
    __Pyx_GIVEREF(__pyx_v_step);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_t_6, NULL); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __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_t_2, __pyx_t_6, NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_lst, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":682
 * 
 *             # 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_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __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 = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_newSlice, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":683
 *             # 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_14 = PyObject_Length(__pyx_v_start); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_int_1);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_14 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_14 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_15 = Py_TYPE(__pyx_t_3)->tp_iternext;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_3)) {
        if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_3)) {
        if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_6 = __pyx_t_15(__pyx_t_3);
        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 = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":684
 *             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_6 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_13 = PyNumber_Multiply(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_13); 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);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_13);
      __pyx_t_6 = 0;
      __pyx_t_4 = 0;
      __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_13);
      __pyx_t_13 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":685
 *             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_16 = __Pyx_PyList_Append(__pyx_v_newSlice, __pyx_v_s); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":689
 *             # 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_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_lstArr, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":690
 *             # 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;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":691
 *             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_3 = PyInt_FromSsize_t(__pyx_v_nv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_13 = __pyx_t_3; __Pyx_INCREF(__pyx_t_13); __pyx_t_14 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_14 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_15 = Py_TYPE(__pyx_t_13)->tp_iternext;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_13)) {
        if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_13)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_3); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_13)) {
        if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_13)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_14); __Pyx_INCREF(__pyx_t_3); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_13, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_3 = __pyx_t_15(__pyx_t_13);
        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 = 691; __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;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":693
 *             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_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      if (PyList_CheckExact(__pyx_v_lst) || PyTuple_CheckExact(__pyx_v_lst)) {
        __pyx_t_2 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_2); __pyx_t_17 = 0;
        __pyx_t_18 = NULL;
      } else {
        __pyx_t_17 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_18 = Py_TYPE(__pyx_t_2)->tp_iternext;
      }
      for (;;) {
        if (!__pyx_t_18 && PyList_CheckExact(__pyx_t_2)) {
          if (__pyx_t_17 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_17); __Pyx_INCREF(__pyx_t_4); __pyx_t_17++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_18 && PyTuple_CheckExact(__pyx_t_2)) {
          if (__pyx_t_17 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_17); __Pyx_INCREF(__pyx_t_4); __pyx_t_17++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_4 = __pyx_t_18(__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 = 693; __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 = 693; __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_1 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          #else
          __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_19 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_19);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_7 = Py_TYPE(__pyx_t_19)->tp_iternext;
          index = 0; __pyx_t_6 = __pyx_t_7(__pyx_t_19); if (unlikely(!__pyx_t_6)) goto __pyx_L23_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          index = 1; __pyx_t_1 = __pyx_t_7(__pyx_t_19); if (unlikely(!__pyx_t_1)) goto __pyx_L23_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_1);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_19), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_7 = NULL;
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          goto __pyx_L24_unpacking_done;
          __pyx_L23_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          __pyx_t_7 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_L24_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
        __pyx_t_6 = 0;
        __Pyx_XDECREF_SET(__pyx_v_numv, __pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_t_4 = PyObject_RichCompare(__pyx_v_numv, __pyx_v_n, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_12) {
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_v_i))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L25;
        }
        __pyx_L25:;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_idx, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":694
 *                 # 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_12 = (__pyx_v_idx != Py_None) && (PyList_GET_SIZE(__pyx_v_idx) != 0);
      if (__pyx_t_12) {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":696
 *                 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_3 = __Pyx_GetItemInt_List(__pyx_v_idx, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_idx, -1, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_int_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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 696; __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_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_step);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_step);
        __Pyx_GIVEREF(__pyx_v_step);
        __pyx_t_3 = 0;
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_t_2, NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(__Pyx_SetItemInt(__pyx_v_newSlice, 0, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":699
 *                     # 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_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Variable)), __pyx_n_s_getitem); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PyObject_GetItem(__pyx_t_2, __pyx_v_n); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyList_AsTuple(__pyx_v_newSlice); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 699; __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_2);
        __Pyx_GIVEREF(__pyx_t_2);
        __pyx_t_3 = 0;
        __pyx_t_2 = 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 = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_dat, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":700
 *                     # 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 = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isMA); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __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[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_dat);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_dat);
        __Pyx_GIVEREF(__pyx_v_dat);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_12) {
          __pyx_t_10 = (!(__pyx_v_ismasked != 0));
          __pyx_t_11 = __pyx_t_10;
        } else {
          __pyx_t_11 = __pyx_t_12;
        }
        if (__pyx_t_11) {

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":701
 *                     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;

          /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":702
 *                     if ma.isMA(dat) and not ismasked:
 *                         ismasked=True
 *                         fill_value = dat.fill_value             # <<<<<<<<<<<<<<
 *                     lstArr.append(dat)
 *             if ismasked:
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dat, __pyx_n_s_fill_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_XDECREF_SET(__pyx_v_fill_value, __pyx_t_4);
          __pyx_t_4 = 0;
          goto __pyx_L27;
        }
        __pyx_L27:;

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":703
 *                         ismasked=True
 *                         fill_value = dat.fill_value
 *                     lstArr.append(dat)             # <<<<<<<<<<<<<<
 *             if ismasked:
 *                 lstArr = ma.concatenate(lstArr)
 */
        __pyx_t_16 = __Pyx_PyObject_Append(__pyx_v_lstArr, __pyx_v_dat); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L26;
      }
      __pyx_L26:;
    }
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":704
 *                         fill_value = dat.fill_value
 *                     lstArr.append(dat)
 *             if ismasked:             # <<<<<<<<<<<<<<
 *                 lstArr = ma.concatenate(lstArr)
 *             else:
 */
    __pyx_t_11 = (__pyx_v_ismasked != 0);
    if (__pyx_t_11) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":705
 *                     lstArr.append(dat)
 *             if ismasked:
 *                 lstArr = ma.concatenate(lstArr)             # <<<<<<<<<<<<<<
 *             else:
 *                 lstArr = numpy.concatenate(lstArr)
 */
      __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_concatenate); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_INCREF(__pyx_v_lstArr);
      PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_lstArr);
      __Pyx_GIVEREF(__pyx_v_lstArr);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF_SET(__pyx_v_lstArr, __pyx_t_2);
      __pyx_t_2 = 0;
      goto __pyx_L28;
    }
    /*else*/ {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":707
 *                 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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_concatenate); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __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 = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_lstArr);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lstArr);
      __Pyx_GIVEREF(__pyx_v_lstArr);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_lstArr, __pyx_t_4);
      __pyx_t_4 = 0;
    }
    __pyx_L28:;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":708
 *             else:
 *                 lstArr = numpy.concatenate(lstArr)
 *             if lstArr.dtype != data.dtype: data = data.astype(lstArr.dtype)             # <<<<<<<<<<<<<<
 *             # sometimes there are legitimate singleton dimensions, in which
 *             # case the array shapes won't conform. If so, a ValueError will
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (__pyx_t_11) {
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 708; __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_t_13, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 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_L29;
    }
    __pyx_L29:;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":712
 *             # 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_20, &__pyx_t_21, &__pyx_t_22);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_22);
      /*try:*/ {

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":713
 *             # result, and no squeeze will be done.
 *             try:
 *                 data[tuple(ind)] = lstArr.squeeze()             # <<<<<<<<<<<<<<
 *             except ValueError:
 *                 data[tuple(ind)] = lstArr
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_lstArr, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L30_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L30_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 = 713; __pyx_clineno = __LINE__; goto __pyx_L30_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L30_error;}
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_13, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L30_error;}
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
      __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
      goto __pyx_L37_try_end;
      __pyx_L30_error:;
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":714
 *             try:
 *                 data[tuple(ind)] = lstArr.squeeze()
 *             except ValueError:             # <<<<<<<<<<<<<<
 *                 data[tuple(ind)] = lstArr
 * 
 */
      __pyx_t_23 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
      if (__pyx_t_23) {
        __Pyx_AddTraceback("netCDF4._Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_13, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L32_except_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_GOTREF(__pyx_t_2);

        /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":715
 *                 data[tuple(ind)] = lstArr.squeeze()
 *             except ValueError:
 *                 data[tuple(ind)] = lstArr             # <<<<<<<<<<<<<<
 * 
 *         # Remove extra singleton dimensions.
 */
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L32_except_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_ind);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ind);
        __Pyx_GIVEREF(__pyx_v_ind);
        __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L32_except_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_3, __pyx_v_lstArr) < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L32_except_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L31_exception_handled;
      }
      goto __pyx_L32_except_error;
      __pyx_L32_except_error:;
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_22);
      __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
      goto __pyx_L1_error;
      __pyx_L31_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_22);
      __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
      __pyx_L37_try_end:;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":718
 * 
 *         # Remove extra singleton dimensions.
 *         data = data[tuple(squeeze)]             # <<<<<<<<<<<<<<
 * 
 *         # if no masked elements, return numpy array.
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_squeeze);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_squeeze);
  __Pyx_GIVEREF(__pyx_v_squeeze);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_GetItem(__pyx_v_data, __pyx_t_2); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":721
 * 
 *         # if no masked elements, return numpy array.
 *         if ma.isMA(data) and not data.mask.any():             # <<<<<<<<<<<<<<
 *            data = data.filled()
 * 
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isMA); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (__pyx_t_11) {
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_any); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_10 = (!__pyx_t_12);
    __pyx_t_12 = __pyx_t_10;
  } else {
    __pyx_t_12 = __pyx_t_11;
  }
  if (__pyx_t_12) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":722
 *         # if no masked elements, return numpy array.
 *         if ma.isMA(data) and not data.mask.any():
 *            data = data.filled()             # <<<<<<<<<<<<<<
 * 
 *         return data
 */
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_filled); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L40;
  }
  __pyx_L40:;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":724
 *            data = data.filled()
 * 
 *         return data             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_data);
  __pyx_r = __pyx_v_data;
  goto __pyx_L0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":623
 *         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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("netCDF4._Variable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XDECREF(__pyx_v_count);
  __Pyx_XDECREF(__pyx_v_stride);
  __Pyx_XDECREF(__pyx_v_put_ind);
  __Pyx_XDECREF(__pyx_v_datashape);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_squeeze);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_strt);
  __Pyx_XDECREF(__pyx_v_cnt);
  __Pyx_XDECREF(__pyx_v_strd);
  __Pyx_XDECREF(__pyx_v_ind);
  __Pyx_XDECREF(__pyx_v_sta);
  __Pyx_XDECREF(__pyx_v_step);
  __Pyx_XDECREF(__pyx_v_stop);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_vid);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_lst);
  __Pyx_XDECREF(__pyx_v_newSlice);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_lstArr);
  __Pyx_XDECREF(__pyx_v_dat);
  __Pyx_XDECREF(__pyx_v_fill_value);
  __Pyx_XDECREF(__pyx_v_numv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":763
 *     """
 * 
 *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
 *         """
 * Create a time Variable with units consistent across a multifile
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_6MFTime_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_6MFTime___init__[] = "\nCreate a time Variable with units consistent across a multifile \ndataset.\n\n@param time: Time variable from a MFDataset. \n\n@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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_7netCDF4_6MFTime_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_6MFTime___init__)};
static PyObject *__pyx_pw_7netCDF4_6MFTime_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_time = 0;
  PyObject *__pyx_v_units = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_time,&__pyx_n_s_units,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_time)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __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 = 763; __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 = 763; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.MFTime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_6MFTime___init__(__pyx_self, __pyx_v_self, __pyx_v_time, __pyx_v_units);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_6MFTime___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_time, PyObject *__pyx_v_units) {
  PyObject *__pyx_v_datetime = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_v_ref_date = NULL;
  PyObject *__pyx_v_ref_num = NULL;
  PyObject *__pyx_v_i0 = NULL;
  PyObject *__pyx_v_i1 = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_num = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  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_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":773
 * 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 = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":774
 *         """
 *         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 = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":777
 * 
 *         # copy attributes from master time variable.
 *         for name, value in time.__dict__.items():             # <<<<<<<<<<<<<<
 *             self.__dict__[name] = value
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 777; __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[1]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (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 = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (!__pyx_t_4 && 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 = 777; __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 = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
      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 = 777; __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 = 777; __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 = 777; __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 = 777; __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 = 777; __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 = 777; __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 = 777; __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_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_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_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 = 777; __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 = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":778
 *         # copy attributes from master time variable.
 *         for name, value in time.__dict__.items():
 *             self.__dict__[name] = value             # <<<<<<<<<<<<<<
 * 
 *         # make sure calendar attribute present in all files.
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 778; __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 = 778; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":781
 * 
 *         # 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__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 = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":782
 *         # make sure calendar attribute present in all files.
 *         for t in self._recVar:
 *             if not hasattr(t,'calendar'):             # <<<<<<<<<<<<<<
 *                 raise ValueError('MFTime requires that the time variable in all files have a calendar attribute')
 * 
 */
    __pyx_t_9 = PyObject_HasAttr(__pyx_v_t, __pyx_n_s_calendar); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_10 = ((!(__pyx_t_9 != 0)) != 0);
    if (__pyx_t_10) {

      /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":783
 *         for t in self._recVar:
 *             if not hasattr(t,'calendar'):
 *                 raise ValueError('MFTime requires that the time variable in all files have a calendar attribute')             # <<<<<<<<<<<<<<
 * 
 *         # Check that calendar is the same in all files.
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __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 = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":786
 * 
 *         # Check that calendar is the same in all files.
 *         if len(set([t.calendar for t in self._recVar])) > 1:             # <<<<<<<<<<<<<<
 *             raise ValueError('MFTime requires that the same time calendar is used by all files.')
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = Py_TYPE(__pyx_t_6)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_6)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_6)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_6);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_calendar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __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 = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_3 = PySet_Size(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((__pyx_t_3 > 1) != 0);
  if (__pyx_t_10) {

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":787
 *         # 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_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":790
 * 
 *         # 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 = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_10) {
    __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 = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __pyx_t_1;
    __pyx_t_1 = 0;
  } else {
    __Pyx_INCREF(__pyx_v_units);
    __pyx_t_6 = __pyx_v_units;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_units, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":793
 * 
 *         # 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 = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 793; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":794
 *         # Reference date to compute the difference between different time units.
 *         ref_date = datetime.datetime(1900,1,1)
 *         ref_num = date2num(ref_date, self.units, self.calendar)             # <<<<<<<<<<<<<<
 * 
 *         # Create delta vector: delta = ref_num(ref_date) - num(ref_date)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_units); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __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 = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_ref_date);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ref_date);
  __Pyx_GIVEREF(__pyx_v_ref_date);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_6 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __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_5); __pyx_t_5 = 0;
  __pyx_v_ref_num = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":798
 *         # 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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_time, __pyx_n_s_dtype); 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_t_6 = PyTuple_New(2); 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);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, 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_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_MFTime__delta, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":800
 *         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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":801
 * 
 *         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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recVar); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
    __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = Py_TYPE(__pyx_t_5)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_5)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_5)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_4(__pyx_t_5);
      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 = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":802
 *         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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_recLen); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyObject_GetItem(__pyx_t_6, __pyx_v_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":803
 *         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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_date2num); 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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_units); 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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calendar); 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);
    __pyx_t_11 = PyTuple_New(3); 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_INCREF(__pyx_v_ref_date);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_ref_date);
    __Pyx_GIVEREF(__pyx_v_ref_date);
    PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); 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);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF_SET(__pyx_v_num, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":804
 *             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_7 = PyNumber_InPlaceAdd(__pyx_v_i1, __pyx_v_n); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF_SET(__pyx_v_i1, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":805
 *             num = date2num(ref_date, v.units, self.calendar)
 *             i1 += n
 *             self.__delta[i0:i1] = ref_num - num             # <<<<<<<<<<<<<<
 *             i0 += n
 * 
 */
    __pyx_t_7 = PyNumber_Subtract(__pyx_v_ref_num, __pyx_v_num); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __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 = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    if (__Pyx_PyObject_SetSlice(__pyx_t_11, __pyx_t_7, 0, 0, &__pyx_v_i0, &__pyx_v_i1, NULL, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":806
 *             i1 += n
 *             self.__delta[i0:i1] = ref_num - num
 *             i0 += n             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_i0, __pyx_v_n); 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_DECREF_SET(__pyx_v_i0, __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":763
 *     """
 * 
 *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
 *         """
 * Create a time Variable with units consistent across a multifile
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("netCDF4.MFTime.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_ref_date);
  __Pyx_XDECREF(__pyx_v_ref_num);
  __Pyx_XDECREF(__pyx_v_i0);
  __Pyx_XDECREF(__pyx_v_i1);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_num);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":809
 * 
 * 
 *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
 *         return self.__time[elem] + self.__delta[elem]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_6MFTime_3__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_6MFTime_3__getitem__ = {__Pyx_NAMESTR("__getitem__"), (PyCFunction)__pyx_pw_7netCDF4_6MFTime_3__getitem__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_6MFTime_3__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_elem = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_elem,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_elem)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 809; __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 = 809; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_elem = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.MFTime.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_6MFTime_2__getitem__(__pyx_self, __pyx_v_self, __pyx_v_elem);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_6MFTime_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_elem) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":810
 * 
 *     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 = 810; __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 = 810; __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 = 810; __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 = 810; __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 = 810; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":809
 * 
 * 
 *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
 *         return self.__time[elem] + self.__delta[elem]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("netCDF4.MFTime.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":837
 * # check for required version of netcdf-4 and hdf5.
 * 
 * def _gethdf5libversion():             # <<<<<<<<<<<<<<
 *     majorvers = H5_VERS_MAJOR
 *     minorvers = H5_VERS_MINOR
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_17_gethdf5libversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_17_gethdf5libversion = {__Pyx_NAMESTR("_gethdf5libversion"), (PyCFunction)__pyx_pw_7netCDF4_17_gethdf5libversion, METH_NOARGS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_17_gethdf5libversion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_gethdf5libversion (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_16_gethdf5libversion(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_16_gethdf5libversion(CYTHON_UNUSED PyObject *__pyx_self) {
  int __pyx_v_majorvers;
  int __pyx_v_minorvers;
  int __pyx_v_releasevers;
  PyObject *__pyx_v_patchstring = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_gethdf5libversion", 0);

  /* "netCDF4.pyx":838
 * 
 * def _gethdf5libversion():
 *     majorvers = H5_VERS_MAJOR             # <<<<<<<<<<<<<<
 *     minorvers = H5_VERS_MINOR
 *     releasevers = H5_VERS_RELEASE
 */
  __pyx_v_majorvers = H5_VERS_MAJOR;

  /* "netCDF4.pyx":839
 * def _gethdf5libversion():
 *     majorvers = H5_VERS_MAJOR
 *     minorvers = H5_VERS_MINOR             # <<<<<<<<<<<<<<
 *     releasevers = H5_VERS_RELEASE
 *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
 */
  __pyx_v_minorvers = H5_VERS_MINOR;

  /* "netCDF4.pyx":840
 *     majorvers = H5_VERS_MAJOR
 *     minorvers = H5_VERS_MINOR
 *     releasevers = H5_VERS_RELEASE             # <<<<<<<<<<<<<<
 *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
 *     if not patchstring:
 */
  __pyx_v_releasevers = H5_VERS_RELEASE;

  /* "netCDF4.pyx":841
 *     minorvers = H5_VERS_MINOR
 *     releasevers = H5_VERS_RELEASE
 *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')             # <<<<<<<<<<<<<<
 *     if not patchstring:
 *        return '%d.%d.%d' % (majorvers,minorvers,releasevers)
 */
  __pyx_t_1 = __Pyx_decode_c_string(H5_VERS_SUBRELEASE, 0, strlen(H5_VERS_SUBRELEASE), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_patchstring = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":842
 *     releasevers = H5_VERS_RELEASE
 *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
 *     if not patchstring:             # <<<<<<<<<<<<<<
 *        return '%d.%d.%d' % (majorvers,minorvers,releasevers)
 *     else:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_patchstring); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":843
 *     patchstring = H5_VERS_SUBRELEASE.decode('ascii')
 *     if not patchstring:
 *        return '%d.%d.%d' % (majorvers,minorvers,releasevers)             # <<<<<<<<<<<<<<
 *     else:
 *        return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_majorvers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __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 = 843; __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 = 843; __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 = 843; __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 = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "netCDF4.pyx":845
 *        return '%d.%d.%d' % (majorvers,minorvers,releasevers)
 *     else:
 *        return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)             # <<<<<<<<<<<<<<
 * 
 * __netcdf4libversion__ = getlibversion().split()[0]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_majorvers); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __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 = 845; __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 = 845; __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 = 845; __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 = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":837
 * # check for required version of netcdf-4 and hdf5.
 * 
 * def _gethdf5libversion():             # <<<<<<<<<<<<<<
 *     majorvers = H5_VERS_MAJOR
 *     minorvers = H5_VERS_MINOR
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("netCDF4._gethdf5libversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_patchstring);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":907
 * # internal C functions.
 * 
 * cdef _get_att_names(int grpid, int varid):             # <<<<<<<<<<<<<<
 *     # Private function to get all the attribute names in a group
 *     cdef int ierr, numatts, n
 */

static PyObject *__pyx_f_7netCDF4__get_att_names(int __pyx_v_grpid, int __pyx_v_varid) {
  int __pyx_v_ierr;
  int __pyx_v_numatts;
  int __pyx_v_n;
  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
  PyObject *__pyx_v_attslist = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_att_names", 0);

  /* "netCDF4.pyx":911
 *     cdef int ierr, numatts, n
 *     cdef char namstring[NC_MAX_NAME+1]
 *     if varid == NC_GLOBAL:             # <<<<<<<<<<<<<<
 *         ierr = nc_inq_natts(grpid, &numatts)
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_varid == NC_GLOBAL) != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":912
 *     cdef char namstring[NC_MAX_NAME+1]
 *     if varid == NC_GLOBAL:
 *         ierr = nc_inq_natts(grpid, &numatts)             # <<<<<<<<<<<<<<
 *     else:
 *         ierr = nc_inq_varnatts(grpid, varid, &numatts)
 */
    __pyx_v_ierr = nc_inq_natts(__pyx_v_grpid, (&__pyx_v_numatts));
    goto __pyx_L3;
  }
  /*else*/ {

    /* "netCDF4.pyx":914
 *         ierr = nc_inq_natts(grpid, &numatts)
 *     else:
 *         ierr = nc_inq_varnatts(grpid, varid, &numatts)             # <<<<<<<<<<<<<<
 *     if ierr != NC_NOERR:
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
    __pyx_v_ierr = nc_inq_varnatts(__pyx_v_grpid, __pyx_v_varid, (&__pyx_v_numatts));
  }
  __pyx_L3:;

  /* "netCDF4.pyx":915
 *     else:
 *         ierr = nc_inq_varnatts(grpid, varid, &numatts)
 *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     attslist = []
 */
  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":916
 *         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 = 916; __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 = 916; __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 = 916; __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 = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":917
 *     if ierr != NC_NOERR:
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     attslist = []             # <<<<<<<<<<<<<<
 *     for n from 0 <= n < numatts:
 *         ierr = nc_inq_attname(grpid, varid, n, namstring)
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __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":918
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     attslist = []
 *     for n from 0 <= n < numatts:             # <<<<<<<<<<<<<<
 *         ierr = nc_inq_attname(grpid, varid, n, namstring)
 *         if ierr != NC_NOERR:
 */
  __pyx_t_5 = __pyx_v_numatts;
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_5; __pyx_v_n++) {

    /* "netCDF4.pyx":919
 *     attslist = []
 *     for n from 0 <= n < numatts:
 *         ierr = nc_inq_attname(grpid, varid, n, namstring)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
    __pyx_v_ierr = nc_inq_attname(__pyx_v_grpid, __pyx_v_varid, __pyx_v_n, __pyx_v_namstring);

    /* "netCDF4.pyx":920
 *     for n from 0 <= n < numatts:
 *         ierr = nc_inq_attname(grpid, varid, n, namstring)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         attslist.append(namstring.decode(default_encoding,unicode_error))
 */
    __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_1) {

      /* "netCDF4.pyx":921
 *         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 = 921; __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 = 921; __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 = 921; __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 = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":922
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         attslist.append(namstring.decode(default_encoding,unicode_error))             # <<<<<<<<<<<<<<
 *     return attslist
 * 
 */
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __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);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __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_7); __pyx_t_7 = 0;
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_attslist, __pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }

  /* "netCDF4.pyx":923
 *             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":907
 * # internal C functions.
 * 
 * cdef _get_att_names(int grpid, int varid):             # <<<<<<<<<<<<<<
 *     # Private function to get all the attribute names in a group
 *     cdef int ierr, numatts, n
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("netCDF4._get_att_names", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_attslist);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":925
 *     return attslist
 * 
 * cdef _get_att(grp, int varid, name):             # <<<<<<<<<<<<<<
 *     # Private function to get an attribute value given its name
 *     cdef int ierr, n
 */

static PyObject *__pyx_f_7netCDF4__get_att(PyObject *__pyx_v_grp, int __pyx_v_varid, PyObject *__pyx_v_name) {
  int __pyx_v_ierr;
  size_t __pyx_v_att_len;
  char *__pyx_v_attname;
  char *__pyx_v_stratt;
  nc_type __pyx_v_att_type;
  PyArrayObject *__pyx_v_value_arr = 0;
  PyObject *__pyx_v_bytestr = NULL;
  PyObject *__pyx_v_pstring = NULL;
  PyObject *__pyx_v_type_att = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_att", 0);

  /* "netCDF4.pyx":933
 *     cdef nc_type att_type
 *     cdef ndarray value_arr
 *     bytestr = _strencode(name)             # <<<<<<<<<<<<<<
 *     attname = bytestr
 *     ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
 */
  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytestr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":934
 *     cdef ndarray value_arr
 *     bytestr = _strencode(name)
 *     attname = bytestr             # <<<<<<<<<<<<<<
 *     ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
 *     if ierr != NC_NOERR:
 */
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_attname = __pyx_t_2;

  /* "netCDF4.pyx":935
 *     bytestr = _strencode(name)
 *     attname = bytestr
 *     ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)             # <<<<<<<<<<<<<<
 *     if ierr != NC_NOERR:
 *         raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __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 = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ierr = nc_inq_att(__pyx_t_3, __pyx_v_varid, __pyx_v_attname, (&__pyx_v_att_type), (&__pyx_v_att_len));

  /* "netCDF4.pyx":936
 *     attname = bytestr
 *     ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
 *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *         raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     # attribute is a character or string ...
 */
  __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_4) {

    /* "netCDF4.pyx":937
 *     ierr = nc_inq_att(grp._grpid, varid, attname, &att_type, &att_len)
 *     if ierr != NC_NOERR:
 *         raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *     # attribute is a character or string ...
 *     if att_type == NC_CHAR:
 */
    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __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 = 937; __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 = 937; __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 = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":952
 *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
 *         return pstring
 *     elif att_type == NC_STRING:             # <<<<<<<<<<<<<<
 *         if att_len == 1:
 *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
 */
  switch (__pyx_v_att_type) {

    /* "netCDF4.pyx":939
 *         raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     # attribute is a character or string ...
 *     if att_type == NC_CHAR:             # <<<<<<<<<<<<<<
 *         value_arr = numpy.empty(att_len,'S1')
 *         ierr = nc_get_att_text(grp._grpid, varid, attname, <char *>value_arr.data)
 */
    case NC_CHAR:

    /* "netCDF4.pyx":940
 *     # attribute is a character or string ...
 *     if att_type == NC_CHAR:
 *         value_arr = numpy.empty(att_len,'S1')             # <<<<<<<<<<<<<<
 *         ierr = nc_get_att_text(grp._grpid, varid, attname, <char *>value_arr.data)
 *         if ierr != NC_NOERR:
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __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_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyTuple_New(2); 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);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_S1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_S1);
    __Pyx_GIVEREF(__pyx_n_s_S1);
    __pyx_t_1 = 0;
    __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 = 940; __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_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 = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "netCDF4.pyx":941
 *     if att_type == NC_CHAR:
 *         value_arr = numpy.empty(att_len,'S1')
 *         ierr = nc_get_att_text(grp._grpid, varid, attname, <char *>value_arr.data)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __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 = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_ierr = nc_get_att_text(__pyx_t_3, __pyx_v_varid, __pyx_v_attname, ((char *)__pyx_v_value_arr->data));

    /* "netCDF4.pyx":942
 *         value_arr = numpy.empty(att_len,'S1')
 *         ierr = nc_get_att_text(grp._grpid, varid, attname, <char *>value_arr.data)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         if name == '_FillValue' and python3:
 */
    __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_4) {

      /* "netCDF4.pyx":943
 *         ierr = nc_get_att_text(grp._grpid, varid, attname, <char *>value_arr.data)
 *         if ierr != NC_NOERR:
 *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *         if name == '_FillValue' and python3:
 *             # make sure _FillValue for character arrays is a byte on python 3
 */
      __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __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 = 943; __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 = 943; __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 = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":944
 *         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_4 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_FillValue, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_4;
    }
    if (__pyx_t_8) {

      /* "netCDF4.pyx":947
 *             # 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 = 947; __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 = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_pstring = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "netCDF4.pyx":950
 *         else:
 *             pstring =\
 *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')             # <<<<<<<<<<<<<<
 *         return pstring
 *     elif att_type == NC_STRING:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_tostring); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __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_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __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 = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_1 = 0;
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_replace); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_pstring = __pyx_t_5;
      __pyx_t_5 = 0;
    }
    __pyx_L5:;

    /* "netCDF4.pyx":951
 *             pstring =\
 *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
 *         return pstring             # <<<<<<<<<<<<<<
 *     elif att_type == NC_STRING:
 *         if att_len == 1:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_pstring);
    __pyx_r = __pyx_v_pstring;
    goto __pyx_L0;
    break;

    /* "netCDF4.pyx":952
 *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
 *         return pstring
 *     elif att_type == NC_STRING:             # <<<<<<<<<<<<<<
 *         if att_len == 1:
 *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
 */
    case NC_STRING:

    /* "netCDF4.pyx":953
 *         return pstring
 *     elif att_type == NC_STRING:
 *         if att_len == 1:             # <<<<<<<<<<<<<<
 *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
 *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
 */
    __pyx_t_8 = ((__pyx_v_att_len == 1) != 0);
    if (__pyx_t_8) {

      /* "netCDF4.pyx":954
 *     elif att_type == NC_STRING:
 *         if att_len == 1:
 *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)             # <<<<<<<<<<<<<<
 *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
 *             return pstring
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_ierr = nc_get_att_string(__pyx_t_3, __pyx_v_varid, __pyx_v_attname, (&__pyx_v_stratt));

      /* "netCDF4.pyx":955
 *         if att_len == 1:
 *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
 *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')             # <<<<<<<<<<<<<<
 *             return pstring
 *         else:
 */
      __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_stratt); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __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 = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PyTuple_New(2); 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);
      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);
      __pyx_t_5 = 0;
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_replace); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_pstring = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "netCDF4.pyx":956
 *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
 *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')
 *             return pstring             # <<<<<<<<<<<<<<
 *         else:
 *             raise KeyError('vlen string array attributes not supported')
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_pstring);
      __pyx_r = __pyx_v_pstring;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "netCDF4.pyx":958
 *             return pstring
 *         else:
 *             raise KeyError('vlen string array attributes not supported')             # <<<<<<<<<<<<<<
 *     else:
 *     # a regular numeric or compound type.
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __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 = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    break;
    default:

    /* "netCDF4.pyx":961
 *     else:
 *     # a regular numeric or compound type.
 *         if att_type == NC_LONG:             # <<<<<<<<<<<<<<
 *             att_type = NC_INT
 *         try:
 */
    __pyx_t_8 = ((__pyx_v_att_type == NC_LONG) != 0);
    if (__pyx_t_8) {

      /* "netCDF4.pyx":962
 *     # 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_L7;
    }
    __pyx_L7:;

    /* "netCDF4.pyx":963
 *         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_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":964
 *             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 = 964; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_att_type, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L8_error;};
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_v_type_att = __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_L15_try_end;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "netCDF4.pyx":965
 *         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_1, &__pyx_t_6, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_9);

        /* "netCDF4.pyx":967
 *         except KeyError:
 *             # check if it's a compound
 *             try:             # <<<<<<<<<<<<<<
 *                 type_att = _read_compound(grp, att_type)
 *             except:
 */
        {
          __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":968
 *             # check if it's a compound
 *             try:
 *                 type_att = _read_compound(grp, att_type)             # <<<<<<<<<<<<<<
 *             except:
 *                 raise KeyError('attribute %s has unsupported datatype' % attname)
 */
            __pyx_t_5 = __pyx_f_7netCDF4__read_compound(__pyx_v_grp, __pyx_v_att_type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_XDECREF_SET(__pyx_v_type_att, __pyx_t_5);
            __pyx_t_5 = 0;
          }
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          goto __pyx_L25_try_end;
          __pyx_L18_error:;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "netCDF4.pyx":969
 *             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_16, &__pyx_t_17) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_GOTREF(__pyx_t_17);

            /* "netCDF4.pyx":970
 *                 type_att = _read_compound(grp, att_type)
 *             except:
 *                 raise KeyError('attribute %s has unsupported datatype' % attname)             # <<<<<<<<<<<<<<
 *         value_arr = numpy.empty(att_len,type_att)
 *         ierr = nc_get_att(grp._grpid, varid, attname, value_arr.data)
 */
            __pyx_t_18 = __Pyx_PyBytes_FromString(__pyx_v_attname); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L20_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 = 970; __pyx_clineno = __LINE__; goto __pyx_L20_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 = 970; __pyx_clineno = __LINE__; goto __pyx_L20_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 = 970; __pyx_clineno = __LINE__; goto __pyx_L20_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 = 970; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            goto __pyx_L19_exception_handled;
          }
          __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_L10_except_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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L9_exception_handled;
      }
      goto __pyx_L10_except_error;
      __pyx_L10_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_L9_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_L15_try_end:;
    }

    /* "netCDF4.pyx":971
 *             except:
 *                 raise KeyError('attribute %s has unsupported datatype' % attname)
 *         value_arr = numpy.empty(att_len,type_att)             # <<<<<<<<<<<<<<
 *         ierr = nc_get_att(grp._grpid, varid, attname, value_arr.data)
 *         if ierr != NC_NOERR:
 */
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyInt_FromSize_t(__pyx_v_att_len); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_type_att);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_type_att);
    __Pyx_GIVEREF(__pyx_v_type_att);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_9);
    __pyx_t_9 = 0;

    /* "netCDF4.pyx":972
 *                 raise KeyError('attribute %s has unsupported datatype' % attname)
 *         value_arr = numpy.empty(att_len,type_att)
 *         ierr = nc_get_att(grp._grpid, varid, attname, value_arr.data)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_ierr = nc_get_att(__pyx_t_3, __pyx_v_varid, __pyx_v_attname, __pyx_v_value_arr->data);

    /* "netCDF4.pyx":973
 *         value_arr = numpy.empty(att_len,type_att)
 *         ierr = nc_get_att(grp._grpid, varid, attname, value_arr.data)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         if value_arr.shape == ():
 */
    __pyx_t_8 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_8) {

      /* "netCDF4.pyx":974
 *         ierr = nc_get_att(grp._grpid, varid, attname, value_arr.data)
 *         if ierr != NC_NOERR:
 *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *         if value_arr.shape == ():
 *             # return a scalar for a scalar array
 */
      __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
      __pyx_t_9 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":975
 *         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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_shape); 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_1 = PyObject_RichCompare(__pyx_t_9, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_8) {

      /* "netCDF4.pyx":977
 *         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_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      goto __pyx_L0;
    }

    /* "netCDF4.pyx":978
 *             # 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_8 = ((__pyx_v_att_len == 1) != 0);
    if (__pyx_t_8) {

      /* "netCDF4.pyx":980
 *         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_9 = __Pyx_GetItemInt(((PyObject *)__pyx_v_value_arr), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "netCDF4.pyx":982
 *             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":925
 *     return attslist
 * 
 * cdef _get_att(grp, int varid, name):             # <<<<<<<<<<<<<<
 *     # Private function to get an attribute value given its name
 *     cdef int ierr, n
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("netCDF4._get_att", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_value_arr);
  __Pyx_XDECREF(__pyx_v_bytestr);
  __Pyx_XDECREF(__pyx_v_pstring);
  __Pyx_XDECREF(__pyx_v_type_att);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":984
 *             return value_arr
 * 
 * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
 *     # Private function to set the netCDF file format
 *     if format == 'NETCDF4':
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_19_set_default_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7netCDF4_19_set_default_format = {__Pyx_NAMESTR("_set_default_format"), (PyCFunction)__pyx_pw_7netCDF4_19_set_default_format, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_7netCDF4_19_set_default_format(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_format = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_set_default_format (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_format,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_n_s_NETCDF4);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_set_default_format") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_format = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_set_default_format", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4._set_default_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_18_set_default_format(__pyx_self, __pyx_v_format);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_18_set_default_format(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set_default_format", 0);

  /* "netCDF4.pyx":986
 * def _set_default_format(object format='NETCDF4'):
 *     # Private function to set the netCDF file format
 *     if format == 'NETCDF4':             # <<<<<<<<<<<<<<
 *         nc_set_default_format(NC_FORMAT_NETCDF4, NULL)
 *     elif format == 'NETCDF4_CLASSIC':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_format, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":987
 *     # 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":988
 *     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 = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":989
 *         nc_set_default_format(NC_FORMAT_NETCDF4, NULL)
 *     elif format == 'NETCDF4_CLASSIC':
 *         nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL)             # <<<<<<<<<<<<<<
 *     elif format == 'NETCDF3_64BIT':
 *         nc_set_default_format(NC_FORMAT_64BIT, NULL)
 */
    nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL);
    goto __pyx_L3;
  }

  /* "netCDF4.pyx":990
 *     elif format == 'NETCDF4_CLASSIC':
 *         nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL)
 *     elif format == 'NETCDF3_64BIT':             # <<<<<<<<<<<<<<
 *         nc_set_default_format(NC_FORMAT_64BIT, NULL)
 *     elif format == 'NETCDF3_CLASSIC':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_format, __pyx_n_s_NETCDF3_64BIT, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":991
 *         nc_set_default_format(NC_FORMAT_NETCDF4_CLASSIC, NULL)
 *     elif format == 'NETCDF3_64BIT':
 *         nc_set_default_format(NC_FORMAT_64BIT, NULL)             # <<<<<<<<<<<<<<
 *     elif format == 'NETCDF3_CLASSIC':
 *         nc_set_default_format(NC_FORMAT_CLASSIC, NULL)
 */
    nc_set_default_format(NC_FORMAT_64BIT, NULL);
    goto __pyx_L3;
  }

  /* "netCDF4.pyx":992
 *     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 = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":993
 *         nc_set_default_format(NC_FORMAT_64BIT, NULL)
 *     elif format == 'NETCDF3_CLASSIC':
 *         nc_set_default_format(NC_FORMAT_CLASSIC, NULL)             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'" % format)
 */
    nc_set_default_format(NC_FORMAT_CLASSIC, NULL);
    goto __pyx_L3;
  }
  /*else*/ {

    /* "netCDF4.pyx":995
 *         nc_set_default_format(NC_FORMAT_CLASSIC, NULL)
 *     else:
 *         raise ValueError("format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'" % format)             # <<<<<<<<<<<<<<
 * 
 * cdef _get_format(int grpid):
 */
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_format_must_be_NETCDF4_NETCDF4_C, __pyx_v_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __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 = 995; __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 = 995; __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 = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "netCDF4.pyx":984
 *             return value_arr
 * 
 * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
 *     # Private function to set the netCDF file format
 *     if format == 'NETCDF4':
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("netCDF4._set_default_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":997
 *         raise ValueError("format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'" % format)
 * 
 * cdef _get_format(int grpid):             # <<<<<<<<<<<<<<
 *     # Private function to get the netCDF file format
 *     cdef int ierr, formatp
 */

static PyObject *__pyx_f_7netCDF4__get_format(int __pyx_v_grpid) {
  int __pyx_v_ierr;
  int __pyx_v_formatp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_format", 0);

  /* "netCDF4.pyx":1000
 *     # Private function to get the netCDF file format
 *     cdef int ierr, formatp
 *     ierr = nc_inq_format(grpid, &formatp)             # <<<<<<<<<<<<<<
 *     if ierr != NC_NOERR:
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_inq_format(__pyx_v_grpid, (&__pyx_v_formatp));

  /* "netCDF4.pyx":1001
 *     cdef int ierr, formatp
 *     ierr = nc_inq_format(grpid, &formatp)
 *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     if formatp == NC_FORMAT_NETCDF4:
 */
  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":1002
 *     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 = 1002; __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 = 1002; __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 = 1002; __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 = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1009
 *     elif formatp == NC_FORMAT_64BIT:
 *         return 'NETCDF3_64BIT'
 *     elif formatp == NC_FORMAT_CLASSIC:             # <<<<<<<<<<<<<<
 *         return 'NETCDF3_CLASSIC'
 * 
 */
  switch (__pyx_v_formatp) {

    /* "netCDF4.pyx":1003
 *     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":1004
 *         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":1005
 *     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":1006
 *         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":1007
 *     elif formatp == NC_FORMAT_NETCDF4_CLASSIC:
 *         return 'NETCDF4_CLASSIC'
 *     elif formatp == NC_FORMAT_64BIT:             # <<<<<<<<<<<<<<
 *         return 'NETCDF3_64BIT'
 *     elif formatp == NC_FORMAT_CLASSIC:
 */
    case NC_FORMAT_64BIT:

    /* "netCDF4.pyx":1008
 *         return 'NETCDF4_CLASSIC'
 *     elif formatp == NC_FORMAT_64BIT:
 *         return 'NETCDF3_64BIT'             # <<<<<<<<<<<<<<
 *     elif formatp == NC_FORMAT_CLASSIC:
 *         return 'NETCDF3_CLASSIC'
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_NETCDF3_64BIT);
    __pyx_r = __pyx_n_s_NETCDF3_64BIT;
    goto __pyx_L0;
    break;

    /* "netCDF4.pyx":1009
 *     elif formatp == NC_FORMAT_64BIT:
 *         return 'NETCDF3_64BIT'
 *     elif formatp == NC_FORMAT_CLASSIC:             # <<<<<<<<<<<<<<
 *         return 'NETCDF3_CLASSIC'
 * 
 */
    case NC_FORMAT_CLASSIC:

    /* "netCDF4.pyx":1010
 *         return 'NETCDF3_64BIT'
 *     elif formatp == NC_FORMAT_CLASSIC:
 *         return 'NETCDF3_CLASSIC'             # <<<<<<<<<<<<<<
 * 
 * cdef _get_full_format(int grpid):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_NETCDF3_CLASSIC);
    __pyx_r = __pyx_n_s_NETCDF3_CLASSIC;
    goto __pyx_L0;
    break;
    default: break;
  }

  /* "netCDF4.pyx":997
 *         raise ValueError("format must be 'NETCDF4', 'NETCDF4_CLASSIC', 'NETCDF3_64BIT', or 'NETCDF3_CLASSIC', got '%s'" % format)
 * 
 * cdef _get_format(int grpid):             # <<<<<<<<<<<<<<
 *     # Private function to get the netCDF file format
 *     cdef int ierr, formatp
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("netCDF4._get_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1012
 *         return 'NETCDF3_CLASSIC'
 * 
 * cdef _get_full_format(int grpid):             # <<<<<<<<<<<<<<
 *     # Private function to get the underlying disk format
 *     cdef int ierr, formatp, modep
 */

static PyObject *__pyx_f_7netCDF4__get_full_format(CYTHON_UNUSED int __pyx_v_grpid) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_full_format", 0);

  /* "netCDF4.pyx":1034
 *             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":1012
 *         return 'NETCDF3_CLASSIC'
 * 
 * cdef _get_full_format(int grpid):             # <<<<<<<<<<<<<<
 *     # Private function to get the underlying disk format
 *     cdef int ierr, formatp, modep
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1036
 *         return 'UNDEFINED'
 * 
 * cdef _set_att(grp, int varid, name, value):             # <<<<<<<<<<<<<<
 *     # Private function to set an attribute name/value pair
 *     cdef int i, ierr, lenarr, n
 */

static PyObject *__pyx_f_7netCDF4__set_att(PyObject *__pyx_v_grp, int __pyx_v_varid, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  int __pyx_v_ierr;
  int __pyx_v_lenarr;
  char *__pyx_v_attname;
  char *__pyx_v_datstring;
  PyArrayObject *__pyx_v_value_arr = 0;
  PyObject *__pyx_v_bytestr = NULL;
  PyObject *__pyx_v_fmt = NULL;
  PyObject *__pyx_v_is_netcdf3 = NULL;
  PyObject *__pyx_v_dats = NULL;
  PyObject *__pyx_v_value_arr1 = NULL;
  PyObject *__pyx_v_xtype = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  nc_type __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set_att", 0);

  /* "netCDF4.pyx":1042
 *     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 = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytestr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":1043
 *     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 = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_attname = __pyx_t_2;

  /* "netCDF4.pyx":1045
 *     attname = bytestr
 *     # put attribute value into a numpy array.
 *     value_arr = numpy.array(value)             # <<<<<<<<<<<<<<
 *     # if array is 64 bit integers or
 *     # if 64-bit datatype not supported, cast to 32 bit integers.
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __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(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __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;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_value_arr = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "netCDF4.pyx":1048
 *     # 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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __pyx_f_7netCDF4__get_format(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_fmt = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "netCDF4.pyx":1049
 *     # 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 = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_6) {
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_fmt, __pyx_n_s_NETCDF4_CLASSIC, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_v_is_netcdf3 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "netCDF4.pyx":1050
 *     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_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __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_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__30, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_i8, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_n_s_i8, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_7) {

      /* "netCDF4.pyx":1051
 *     is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC'
 *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\
 *        is_netcdf3):             # <<<<<<<<<<<<<<
 *         value_arr = value_arr.astype('i4')
 *     # if array contains strings, write a text attribute.
 */
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_is_netcdf3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_9 = __pyx_t_8;
    } else {
      __pyx_t_9 = __pyx_t_7;
    }
    __pyx_t_7 = __pyx_t_9;
  } else {
    __pyx_t_7 = __pyx_t_6;
  }
  if (__pyx_t_7) {

    /* "netCDF4.pyx":1052
 *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\
 *        is_netcdf3):
 *         value_arr = value_arr.astype('i4')             # <<<<<<<<<<<<<<
 *     # if array contains strings, write a text attribute.
 *     if value_arr.dtype.char in ['S','U']:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__31, NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF_SET(__pyx_v_value_arr, ((PyArrayObject *)__pyx_t_1));
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":1054
 *         value_arr = value_arr.astype('i4')
 *     # if array contains strings, write a text attribute.
 *     if value_arr.dtype.char in ['S','U']:             # <<<<<<<<<<<<<<
 *         if not value_arr.shape:
 *             dats = _strencode(value_arr.item())
 */
  __pyx_t_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 = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_char); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_7) {
    __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_9 = __pyx_t_6;
  } else {
    __pyx_t_9 = __pyx_t_7;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = (__pyx_t_9 != 0);
  if (__pyx_t_7) {

    /* "netCDF4.pyx":1055
 *     # 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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); 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_3); __pyx_t_3 = 0;
    __pyx_t_9 = ((!__pyx_t_7) != 0);
    if (__pyx_t_9) {

      /* "netCDF4.pyx":1056
 *     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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_item); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_f_7netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_dats = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "netCDF4.pyx":1058
 *             dats = _strencode(value_arr.item())
 *         else:
 *             value_arr1 = value_arr.ravel()             # <<<<<<<<<<<<<<
 *             dats = _strencode(''.join(value_arr1.tolist()))
 *         lenarr = len(dats)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_ravel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_value_arr1 = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "netCDF4.pyx":1059
 *         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 = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __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_Join(__pyx_kp_s__16, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_f_7netCDF4__strencode(__pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_dats = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L5:;

    /* "netCDF4.pyx":1060
 *             value_arr1 = value_arr.ravel()
 *             dats = _strencode(''.join(value_arr1.tolist()))
 *         lenarr = len(dats)             # <<<<<<<<<<<<<<
 *         datstring = dats
 *         ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
 */
    __pyx_t_10 = PyObject_Length(__pyx_v_dats); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_lenarr = __pyx_t_10;

    /* "netCDF4.pyx":1061
 *             dats = _strencode(''.join(value_arr1.tolist()))
 *         lenarr = len(dats)
 *         datstring = dats             # <<<<<<<<<<<<<<
 *         ierr = nc_put_att_text(grp._grpid, varid, attname, lenarr, datstring)
 *         if ierr != NC_NOERR:
 */
    __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_dats); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_datstring = __pyx_t_2;

    /* "netCDF4.pyx":1062
 *         lenarr = len(dats)
 *         datstring = dats
 *         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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_ierr = nc_put_att_text(__pyx_t_5, __pyx_v_varid, __pyx_v_attname, __pyx_v_lenarr, __pyx_v_datstring);

    /* "netCDF4.pyx":1063
 *         datstring = dats
 *         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_9 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_9) {

      /* "netCDF4.pyx":1064
 *         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_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 = 1064; __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 = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_1, 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_AttributeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "netCDF4.pyx":1067
 *     # 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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_kind); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_V, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_9) {

      /* "netCDF4.pyx":1068
 *     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 = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __pyx_f_7netCDF4__find_cmptype(__pyx_v_grp, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_xtype = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L7;
    }

    /* "netCDF4.pyx":1069
 *         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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_str); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __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_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__32, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __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_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_t_3, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = (__pyx_t_9 != 0);
    if (__pyx_t_7) {

      /* "netCDF4.pyx":1070
 *             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 = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value_arr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_str); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __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_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__33, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __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(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __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_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_1 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_illegal_data_type_for_attribute, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_3, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    /*else*/ {

      /* "netCDF4.pyx":1072
 *             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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __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 = 1072; __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 = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__34, 1, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __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_3, __pyx_t_4); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __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_v_xtype = __pyx_t_1;
      __pyx_t_1 = 0;
    }
    __pyx_L7:;

    /* "netCDF4.pyx":1073
 *         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":1074
 *             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 = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __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 = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_ierr = nc_put_att(__pyx_t_5, __pyx_v_varid, __pyx_v_attname, __pyx_t_11, __pyx_v_lenarr, __pyx_v_value_arr->data);

    /* "netCDF4.pyx":1075
 *         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_7 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_7) {

      /* "netCDF4.pyx":1076
 *         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 = 1076; __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 = 1076; __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 = 1076; __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 = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  __pyx_L4:;

  /* "netCDF4.pyx":1036
 *         return 'UNDEFINED'
 * 
 * cdef _set_att(grp, int varid, name, value):             # <<<<<<<<<<<<<<
 *     # Private function to set an attribute name/value pair
 *     cdef int i, ierr, lenarr, n
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("netCDF4._set_att", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_value_arr);
  __Pyx_XDECREF(__pyx_v_bytestr);
  __Pyx_XDECREF(__pyx_v_fmt);
  __Pyx_XDECREF(__pyx_v_is_netcdf3);
  __Pyx_XDECREF(__pyx_v_dats);
  __Pyx_XDECREF(__pyx_v_value_arr1);
  __Pyx_XDECREF(__pyx_v_xtype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1078
 *             raise AttributeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 * cdef _get_types(group):             # <<<<<<<<<<<<<<
 *     # Private function to create L{CompoundType} or L{VLType} instances for all the
 *     # compound or VLEN types in a L{Group} or L{Dataset}.
 */

static PyObject *__pyx_f_7netCDF4__get_types(PyObject *__pyx_v_group) {
  int __pyx_v_ierr;
  int __pyx_v_ntypes;
  int __pyx_v_classp;
  int __pyx_v_n;
  nc_type __pyx_v_xtype;
  nc_type __pyx_v_typeids[NC_MAX_VARS];
  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
  PyObject *__pyx_v_cmptypes = NULL;
  PyObject *__pyx_v_vltypes = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_cmptype = NULL;
  PyObject *__pyx_v_vltype = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  char *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_types", 0);

  /* "netCDF4.pyx":1086
 *     cdef char namstring[NC_MAX_NAME+1]
 *     # get the number of user defined types in this group.
 *     ierr = nc_inq_typeids(group._grpid, &ntypes, typeids)             # <<<<<<<<<<<<<<
 *     if ierr != NC_NOERR:
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __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 = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ierr = nc_inq_typeids(__pyx_t_2, (&__pyx_v_ntypes), __pyx_v_typeids);

  /* "netCDF4.pyx":1087
 *     # get the number of user defined types in this group.
 *     ierr = nc_inq_typeids(group._grpid, &ntypes, typeids)
 *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     # create empty dictionary for CompoundType instances.
 */
  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":1088
 *     ierr = nc_inq_typeids(group._grpid, &ntypes, typeids)
 *     if ierr != NC_NOERR:
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *     # create empty dictionary for CompoundType instances.
 *     cmptypes = OrderedDict()
 */
    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __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 = 1088; __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 = 1088; __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 = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1090
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     # create empty dictionary for CompoundType instances.
 *     cmptypes = OrderedDict()             # <<<<<<<<<<<<<<
 *     vltypes = OrderedDict()
 *     if ntypes > 0:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); 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_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, 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_cmptypes = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "netCDF4.pyx":1091
 *     # 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 = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, 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_5); __pyx_t_5 = 0;
  __pyx_v_vltypes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":1092
 *     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":1093
 *     vltypes = OrderedDict()
 *     if ntypes > 0:
 *         for n from 0 <= n < ntypes:             # <<<<<<<<<<<<<<
 *             xtype = typeids[n]
 *             ierr = nc_inq_user_type(group._grpid, xtype, namstring,
 */
    __pyx_t_2 = __pyx_v_ntypes;
    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {

      /* "netCDF4.pyx":1094
 *     if ntypes > 0:
 *         for n from 0 <= n < ntypes:
 *             xtype = typeids[n]             # <<<<<<<<<<<<<<
 *             ierr = nc_inq_user_type(group._grpid, xtype, namstring,
 *                                     NULL,NULL,NULL,&classp)
 */
      __pyx_v_xtype = (__pyx_v_typeids[__pyx_v_n]);

      /* "netCDF4.pyx":1095
 *         for n from 0 <= n < ntypes:
 *             xtype = typeids[n]
 *             ierr = nc_inq_user_type(group._grpid, xtype, namstring,             # <<<<<<<<<<<<<<
 *                                     NULL,NULL,NULL,&classp)
 *             if ierr != NC_NOERR:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __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 = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "netCDF4.pyx":1096
 *             xtype = typeids[n]
 *             ierr = nc_inq_user_type(group._grpid, xtype, namstring,
 *                                     NULL,NULL,NULL,&classp)             # <<<<<<<<<<<<<<
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
      __pyx_v_ierr = nc_inq_user_type(__pyx_t_6, __pyx_v_xtype, __pyx_v_namstring, NULL, NULL, NULL, (&__pyx_v_classp));

      /* "netCDF4.pyx":1097
 *             ierr = nc_inq_user_type(group._grpid, xtype, namstring,
 *                                     NULL,NULL,NULL,&classp)
 *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             if classp == NC_COMPOUND: # a compound
 */
      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_3) {

        /* "netCDF4.pyx":1098
 *                                     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 = 1098; __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 = 1098; __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 = 1098; __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 = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":1109
 *                     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":1099
 *             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":1100
 *                 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_1 = __Pyx_PyBytes_FromString(__pyx_v_namstring); 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __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 = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_7);
        __pyx_t_1 = 0;
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __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_8); __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "netCDF4.pyx":1103
 *                 # 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_9, &__pyx_t_10, &__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_11);
          /*try:*/ {

            /* "netCDF4.pyx":1104
 *                 # create a CompoundType instance from it.
 *                 try:
 *                     cmptype = _read_compound(group, xtype)             # <<<<<<<<<<<<<<
 *                 except KeyError:
 *                     #print 'WARNING: unsupported compound type, skipping...'
 */
            __pyx_t_7 = __pyx_f_7netCDF4__read_compound(__pyx_v_group, __pyx_v_xtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_XDECREF_SET(__pyx_v_cmptype, __pyx_t_7);
            __pyx_t_7 = 0;
          }
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          goto __pyx_L15_try_end;
          __pyx_L8_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "netCDF4.pyx":1105
 *                 try:
 *                     cmptype = _read_compound(group, xtype)
 *                 except KeyError:             # <<<<<<<<<<<<<<
 *                     #print 'WARNING: unsupported compound type, skipping...'
 *                     continue
 */
          __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
          if (__pyx_t_6) {
            __Pyx_AddTraceback("netCDF4._get_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_GOTREF(__pyx_t_5);

            /* "netCDF4.pyx":1107
 *                 except KeyError:
 *                     #print 'WARNING: unsupported compound type, skipping...'
 *                     continue             # <<<<<<<<<<<<<<
 *                 cmptypes[name] = cmptype
 *             elif classp == NC_VLEN: # a vlen
 */
            goto __pyx_L17_except_continue;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            goto __pyx_L9_exception_handled;
            __pyx_L17_except_continue:;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            goto __pyx_L14_try_continue;
          }
          goto __pyx_L10_except_error;
          __pyx_L10_except_error:;
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
          goto __pyx_L1_error;
          __pyx_L14_try_continue:;
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
          goto __pyx_L5_continue;
          __pyx_L9_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
          __pyx_L15_try_end:;
        }

        /* "netCDF4.pyx":1108
 *                     #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 = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;

        /* "netCDF4.pyx":1109
 *                     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":1110
 *                 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_5 = __Pyx_PyBytes_FromString(__pyx_v_namstring); 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_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __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 = 1110; __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 = 1110; __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 = 1110; __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_7);
        __Pyx_GIVEREF(__pyx_t_7);
        __pyx_t_5 = 0;
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __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_1); __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "netCDF4.pyx":1113
 *                 # 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_11, &__pyx_t_10, &__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_9);
          /*try:*/ {

            /* "netCDF4.pyx":1114
 *                 # create a VLType instance from it.
 *                 try:
 *                     vltype = _read_vlen(group, xtype)             # <<<<<<<<<<<<<<
 *                 except KeyError:
 *                     #print 'WARNING: unsupported VLEN type, skipping...'
 */
            __pyx_t_7 = __pyx_f_7netCDF4__read_vlen(__pyx_v_group, __pyx_v_xtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_XDECREF_SET(__pyx_v_vltype, __pyx_t_7);
            __pyx_t_7 = 0;
          }
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L25_try_end;
          __pyx_L18_error:;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "netCDF4.pyx":1115
 *                 try:
 *                     vltype = _read_vlen(group, xtype)
 *                 except KeyError:             # <<<<<<<<<<<<<<
 *                     #print 'WARNING: unsupported VLEN type, skipping...'
 *                     continue
 */
          __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
          if (__pyx_t_6) {
            __Pyx_AddTraceback("netCDF4._get_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GOTREF(__pyx_t_8);

            /* "netCDF4.pyx":1117
 *                 except KeyError:
 *                     #print 'WARNING: unsupported VLEN type, skipping...'
 *                     continue             # <<<<<<<<<<<<<<
 *                 vltypes[name] = vltype
 *                 pass
 */
            goto __pyx_L27_except_continue;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            goto __pyx_L19_exception_handled;
            __pyx_L27_except_continue:;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            goto __pyx_L24_try_continue;
          }
          goto __pyx_L20_except_error;
          __pyx_L20_except_error:;
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
          goto __pyx_L1_error;
          __pyx_L24_try_continue:;
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
          goto __pyx_L5_continue;
          __pyx_L19_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
          __pyx_L25_try_end:;
        }

        /* "netCDF4.pyx":1118
 *                     #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 = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        break;
        default: break;
      }
      __pyx_L5_continue:;
    }
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "netCDF4.pyx":1120
 *                 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 = 1120; __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.pyx":1078
 *             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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("netCDF4._get_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cmptypes);
  __Pyx_XDECREF(__pyx_v_vltypes);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_cmptype);
  __Pyx_XDECREF(__pyx_v_vltype);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1122
 *     return cmptypes, vltypes
 * 
 * cdef _get_dims(group):             # <<<<<<<<<<<<<<
 *     # Private function to create L{Dimension} instances for all the
 *     # dimensions in a L{Group} or Dataset
 */

static PyObject *__pyx_f_7netCDF4__get_dims(PyObject *__pyx_v_group) {
  int __pyx_v_ierr;
  int __pyx_v_numdims;
  int __pyx_v_n;
  int __pyx_v_dimids[NC_MAX_DIMS];
  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
  PyObject *__pyx_v_dimensions = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  char *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_dims", 0);

  /* "netCDF4.pyx":1129
 *     cdef char namstring[NC_MAX_NAME+1]
 *     # get number of dimensions in this Group.
 *     ierr = nc_inq_ndims(group._grpid, &numdims)             # <<<<<<<<<<<<<<
 *     if ierr != NC_NOERR:
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __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 = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ierr = nc_inq_ndims(__pyx_t_2, (&__pyx_v_numdims));

  /* "netCDF4.pyx":1130
 *     # get number of dimensions in this Group.
 *     ierr = nc_inq_ndims(group._grpid, &numdims)
 *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     # create empty dictionary for dimensions.
 */
  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":1131
 *     ierr = nc_inq_ndims(group._grpid, &numdims)
 *     if ierr != NC_NOERR:
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *     # create empty dictionary for dimensions.
 *     dimensions = OrderedDict()
 */
    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __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 = 1131; __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 = 1131; __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 = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1133
 *         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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_dimensions = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "netCDF4.pyx":1134
 *     # create empty dictionary for dimensions.
 *     dimensions = OrderedDict()
 *     if numdims > 0:             # <<<<<<<<<<<<<<
 *         if group.data_model == 'NETCDF4':
 *             ierr = nc_inq_dimids(group._grpid, &numdims, dimids, 0)
 */
  __pyx_t_3 = ((__pyx_v_numdims > 0) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":1135
 *     dimensions = OrderedDict()
 *     if numdims > 0:
 *         if group.data_model == 'NETCDF4':             # <<<<<<<<<<<<<<
 *             ierr = nc_inq_dimids(group._grpid, &numdims, dimids, 0)
 *             if ierr != NC_NOERR:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_data_model); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_3) {

      /* "netCDF4.pyx":1136
 *     if numdims > 0:
 *         if group.data_model == 'NETCDF4':
 *             ierr = nc_inq_dimids(group._grpid, &numdims, dimids, 0)             # <<<<<<<<<<<<<<
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_ierr = nc_inq_dimids(__pyx_t_2, (&__pyx_v_numdims), __pyx_v_dimids, 0);

      /* "netCDF4.pyx":1137
 *         if group.data_model == 'NETCDF4':
 *             ierr = nc_inq_dimids(group._grpid, &numdims, dimids, 0)
 *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         else:
 */
      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_3) {

        /* "netCDF4.pyx":1138
 *             ierr = nc_inq_dimids(group._grpid, &numdims, dimids, 0)
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *         else:
 *             for n from 0 <= n < numdims:
 */
        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
        __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __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 = 1138; __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_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __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 = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      goto __pyx_L5;
    }
    /*else*/ {

      /* "netCDF4.pyx":1140
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         else:
 *             for n from 0 <= n < numdims:             # <<<<<<<<<<<<<<
 *                 dimids[n] = n
 *         for n from 0 <= n < numdims:
 */
      __pyx_t_2 = __pyx_v_numdims;
      for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {

        /* "netCDF4.pyx":1141
 *         else:
 *             for n from 0 <= n < numdims:
 *                 dimids[n] = n             # <<<<<<<<<<<<<<
 *         for n from 0 <= n < numdims:
 *             ierr = nc_inq_dimname(group._grpid, dimids[n], namstring)
 */
        (__pyx_v_dimids[__pyx_v_n]) = __pyx_v_n;
      }
    }
    __pyx_L5:;

    /* "netCDF4.pyx":1142
 *             for n from 0 <= n < numdims:
 *                 dimids[n] = n
 *         for n from 0 <= n < numdims:             # <<<<<<<<<<<<<<
 *             ierr = nc_inq_dimname(group._grpid, dimids[n], namstring)
 *             if ierr != NC_NOERR:
 */
    __pyx_t_2 = __pyx_v_numdims;
    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {

      /* "netCDF4.pyx":1143
 *                 dimids[n] = n
 *         for n from 0 <= n < numdims:
 *             ierr = nc_inq_dimname(group._grpid, dimids[n], namstring)             # <<<<<<<<<<<<<<
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1143; __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 = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_ierr = nc_inq_dimname(__pyx_t_6, (__pyx_v_dimids[__pyx_v_n]), __pyx_v_namstring);

      /* "netCDF4.pyx":1144
 *         for n from 0 <= n < numdims:
 *             ierr = nc_inq_dimname(group._grpid, dimids[n], namstring)
 *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             name = namstring.decode(default_encoding,unicode_error)
 */
      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_3) {

        /* "netCDF4.pyx":1145
 *             ierr = nc_inq_dimname(group._grpid, dimids[n], namstring)
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *             name = namstring.decode(default_encoding,unicode_error)
 *             dimensions[name] = Dimension(group, name, id=dimids[n])
 */
        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
        __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __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 = 1145; __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_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; __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 = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":1146
 *             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_PyBytes_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __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_default_encoding); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __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 = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      __pyx_t_5 = 0;
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __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_8); __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "netCDF4.pyx":1147
 *                 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_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __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_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_n])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_id, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dimension)), __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_dimensions, __pyx_v_name, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "netCDF4.pyx":1148
 *             name = namstring.decode(default_encoding,unicode_error)
 *             dimensions[name] = Dimension(group, name, id=dimids[n])
 *     return dimensions             # <<<<<<<<<<<<<<
 * 
 * cdef _get_grps(group):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dimensions);
  __pyx_r = __pyx_v_dimensions;
  goto __pyx_L0;

  /* "netCDF4.pyx":1122
 *     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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("netCDF4._get_dims", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dimensions);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1150
 *     return dimensions
 * 
 * cdef _get_grps(group):             # <<<<<<<<<<<<<<
 *     # Private function to create L{Group} instances for all the
 *     # groups in a L{Group} or Dataset
 */

static PyObject *__pyx_f_7netCDF4__get_grps(PyObject *__pyx_v_group) {
  int __pyx_v_ierr;
  int __pyx_v_numgrps;
  int __pyx_v_n;
  int *__pyx_v_grpids;
  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
  PyObject *__pyx_v_groups = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  char *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_grps", 0);

  /* "netCDF4.pyx":1157
 *     cdef char namstring[NC_MAX_NAME+1]
 *     # get number of groups in this Group.
 *     ierr = nc_inq_grps(group._grpid, &numgrps, NULL)             # <<<<<<<<<<<<<<
 *     if ierr != NC_NOERR:
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __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 = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ierr = nc_inq_grps(__pyx_t_2, (&__pyx_v_numgrps), NULL);

  /* "netCDF4.pyx":1158
 *     # get number of groups in this Group.
 *     ierr = nc_inq_grps(group._grpid, &numgrps, NULL)
 *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     # create dictionary containing L{Group} instances for groups in this group
 */
  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":1159
 *     ierr = nc_inq_grps(group._grpid, &numgrps, NULL)
 *     if ierr != NC_NOERR:
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *     # create dictionary containing L{Group} instances for groups in this group
 *     groups = OrderedDict()
 */
    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1159; __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 = 1159; __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 = 1159; __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 = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1161
 *         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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_groups = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "netCDF4.pyx":1162
 *     # create dictionary containing L{Group} instances for groups in this group
 *     groups = OrderedDict()
 *     if numgrps > 0:             # <<<<<<<<<<<<<<
 *         grpids = <int *>malloc(sizeof(int) * numgrps)
 *         ierr = nc_inq_grps(group._grpid, NULL, grpids)
 */
  __pyx_t_3 = ((__pyx_v_numgrps > 0) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":1163
 *     groups = OrderedDict()
 *     if numgrps > 0:
 *         grpids = <int *>malloc(sizeof(int) * numgrps)             # <<<<<<<<<<<<<<
 *         ierr = nc_inq_grps(group._grpid, NULL, grpids)
 *         if ierr != NC_NOERR:
 */
    __pyx_v_grpids = ((int *)malloc(((sizeof(int)) * __pyx_v_numgrps)));

    /* "netCDF4.pyx":1164
 *     if numgrps > 0:
 *         grpids = <int *>malloc(sizeof(int) * numgrps)
 *         ierr = nc_inq_grps(group._grpid, NULL, grpids)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); 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_t_2 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_ierr = nc_inq_grps(__pyx_t_2, NULL, __pyx_v_grpids);

    /* "netCDF4.pyx":1165
 *         grpids = <int *>malloc(sizeof(int) * numgrps)
 *         ierr = nc_inq_grps(group._grpid, NULL, grpids)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         for n from 0 <= n < numgrps:
 */
    __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_3) {

      /* "netCDF4.pyx":1166
 *         ierr = nc_inq_grps(group._grpid, NULL, grpids)
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *         for n from 0 <= n < numgrps:
 *              ierr = nc_inq_grpname(grpids[n], namstring)
 */
      __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
      __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __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 = 1166; __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_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __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 = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":1167
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         for n from 0 <= n < numgrps:             # <<<<<<<<<<<<<<
 *              ierr = nc_inq_grpname(grpids[n], namstring)
 *              if ierr != NC_NOERR:
 */
    __pyx_t_2 = __pyx_v_numgrps;
    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {

      /* "netCDF4.pyx":1168
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         for n from 0 <= n < numgrps:
 *              ierr = nc_inq_grpname(grpids[n], namstring)             # <<<<<<<<<<<<<<
 *              if ierr != NC_NOERR:
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
      __pyx_v_ierr = nc_inq_grpname((__pyx_v_grpids[__pyx_v_n]), __pyx_v_namstring);

      /* "netCDF4.pyx":1169
 *         for n from 0 <= n < numgrps:
 *              ierr = nc_inq_grpname(grpids[n], namstring)
 *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *              name = namstring.decode(default_encoding,unicode_error)
 */
      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_3) {

        /* "netCDF4.pyx":1170
 *              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_5 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); 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_1 = PyTuple_New(1); 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_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_RuntimeError, __pyx_t_1, NULL); 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_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 = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":1171
 *              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_PyBytes_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); 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_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 = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); 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_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __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);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_5 = 0;
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "netCDF4.pyx":1172
 *                  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_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __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_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_grpids[__pyx_v_n])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_id, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Group)), __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __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_7); __pyx_t_7 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_groups, __pyx_v_name, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "netCDF4.pyx":1173
 *              name = namstring.decode(default_encoding,unicode_error)
 *              groups[name] = Group(group, name, id=grpids[n])
 *         free(grpids)             # <<<<<<<<<<<<<<
 *     return groups
 * 
 */
    free(__pyx_v_grpids);
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "netCDF4.pyx":1174
 *              groups[name] = Group(group, name, id=grpids[n])
 *         free(grpids)
 *     return groups             # <<<<<<<<<<<<<<
 * 
 * cdef _get_vars(group):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_groups);
  __pyx_r = __pyx_v_groups;
  goto __pyx_L0;

  /* "netCDF4.pyx":1150
 *     return dimensions
 * 
 * cdef _get_grps(group):             # <<<<<<<<<<<<<<
 *     # Private function to create L{Group} instances for all the
 *     # groups in a L{Group} or Dataset
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_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":1176
 *     return groups
 * 
 * cdef _get_vars(group):             # <<<<<<<<<<<<<<
 *     # Private function to create L{Variable} instances for all the
 *     # variables in a L{Group} or Dataset
 */

static PyObject *__pyx_f_7netCDF4__get_vars(PyObject *__pyx_v_group) {
  int __pyx_v_ierr;
  int __pyx_v_numvars;
  int __pyx_v_n;
  int __pyx_v_nn;
  int __pyx_v_numdims;
  int __pyx_v_varid;
  int __pyx_v_classp;
  int *__pyx_v_varids;
  int __pyx_v_dimids[NC_MAX_DIMS];
  nc_type __pyx_v_xtype;
  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
  char __pyx_v_namstring_cmp[(NC_MAX_NAME + 1)];
  PyObject *__pyx_v_variables = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_datatype = NULL;
  PyObject *__pyx_v_dimensions = NULL;
  PyObject *__pyx_v_grp = NULL;
  int __pyx_v_found;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  char *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  PyObject *(*__pyx_t_18)(PyObject *);
  PyObject *(*__pyx_t_19)(PyObject *);
  int __pyx_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_vars", 0);

  /* "netCDF4.pyx":1187
 *     cdef char namstring_cmp[NC_MAX_NAME+1]
 *     # get number of variables in this Group.
 *     ierr = nc_inq_nvars(group._grpid, &numvars)             # <<<<<<<<<<<<<<
 *     if ierr != NC_NOERR:
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __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 = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ierr = nc_inq_nvars(__pyx_t_2, (&__pyx_v_numvars));

  /* "netCDF4.pyx":1188
 *     # get number of variables in this Group.
 *     ierr = nc_inq_nvars(group._grpid, &numvars)
 *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     # create empty dictionary for variables.
 */
  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":1189
 *     ierr = nc_inq_nvars(group._grpid, &numvars)
 *     if ierr != NC_NOERR:
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *     # create empty dictionary for variables.
 *     variables = OrderedDict()
 */
    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1189; __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 = 1189; __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 = 1189; __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 = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1191
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     # create empty dictionary for variables.
 *     variables = OrderedDict()             # <<<<<<<<<<<<<<
 *     if numvars > 0:
 *         # get variable ids.
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_variables = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "netCDF4.pyx":1192
 *     # create empty dictionary for variables.
 *     variables = OrderedDict()
 *     if numvars > 0:             # <<<<<<<<<<<<<<
 *         # get variable ids.
 *         varids = <int *>malloc(sizeof(int) * numvars)
 */
  __pyx_t_3 = ((__pyx_v_numvars > 0) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":1194
 *     if numvars > 0:
 *         # get variable ids.
 *         varids = <int *>malloc(sizeof(int) * numvars)             # <<<<<<<<<<<<<<
 *         if group.data_model == 'NETCDF4':
 *             ierr = nc_inq_varids(group._grpid, &numvars, varids)
 */
    __pyx_v_varids = ((int *)malloc(((sizeof(int)) * __pyx_v_numvars)));

    /* "netCDF4.pyx":1195
 *         # get variable ids.
 *         varids = <int *>malloc(sizeof(int) * numvars)
 *         if group.data_model == 'NETCDF4':             # <<<<<<<<<<<<<<
 *             ierr = nc_inq_varids(group._grpid, &numvars, varids)
 *             if ierr != NC_NOERR:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_data_model); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_3) {

      /* "netCDF4.pyx":1196
 *         varids = <int *>malloc(sizeof(int) * numvars)
 *         if group.data_model == 'NETCDF4':
 *             ierr = nc_inq_varids(group._grpid, &numvars, varids)             # <<<<<<<<<<<<<<
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_ierr = nc_inq_varids(__pyx_t_2, (&__pyx_v_numvars), __pyx_v_varids);

      /* "netCDF4.pyx":1197
 *         if group.data_model == 'NETCDF4':
 *             ierr = nc_inq_varids(group._grpid, &numvars, varids)
 *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         else:
 */
      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_3) {

        /* "netCDF4.pyx":1198
 *             ierr = nc_inq_varids(group._grpid, &numvars, varids)
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *         else:
 *             for n from 0 <= n < numvars:
 */
        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
        __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; __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 = 1198; __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_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; __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 = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      goto __pyx_L5;
    }
    /*else*/ {

      /* "netCDF4.pyx":1200
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         else:
 *             for n from 0 <= n < numvars:             # <<<<<<<<<<<<<<
 *                 varids[n] = n
 *         # loop over variables.
 */
      __pyx_t_2 = __pyx_v_numvars;
      for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {

        /* "netCDF4.pyx":1201
 *         else:
 *             for n from 0 <= n < numvars:
 *                 varids[n] = n             # <<<<<<<<<<<<<<
 *         # loop over variables.
 *         for n from 0 <= n < numvars:
 */
        (__pyx_v_varids[__pyx_v_n]) = __pyx_v_n;
      }
    }
    __pyx_L5:;

    /* "netCDF4.pyx":1203
 *                 varids[n] = n
 *         # loop over variables.
 *         for n from 0 <= n < numvars:             # <<<<<<<<<<<<<<
 *              varid = varids[n]
 *              # get variable name.
 */
    __pyx_t_2 = __pyx_v_numvars;
    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {

      /* "netCDF4.pyx":1204
 *         # loop over variables.
 *         for n from 0 <= n < numvars:
 *              varid = varids[n]             # <<<<<<<<<<<<<<
 *              # get variable name.
 *              ierr = nc_inq_varname(group._grpid, varid, namstring)
 */
      __pyx_v_varid = (__pyx_v_varids[__pyx_v_n]);

      /* "netCDF4.pyx":1206
 *              varid = varids[n]
 *              # get variable name.
 *              ierr = nc_inq_varname(group._grpid, varid, namstring)             # <<<<<<<<<<<<<<
 *              if ierr != NC_NOERR:
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); 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_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 = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_ierr = nc_inq_varname(__pyx_t_6, __pyx_v_varid, __pyx_v_namstring);

      /* "netCDF4.pyx":1207
 *              # get variable name.
 *              ierr = nc_inq_varname(group._grpid, varid, namstring)
 *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *              name = namstring.decode(default_encoding,unicode_error)
 */
      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_3) {

        /* "netCDF4.pyx":1208
 *              ierr = nc_inq_varname(group._grpid, varid, namstring)
 *              if ierr != NC_NOERR:
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *              name = namstring.decode(default_encoding,unicode_error)
 *              if ierr != NC_NOERR:
 */
        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
        __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); 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_t_1 = PyTuple_New(1); 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_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_RuntimeError, __pyx_t_1, NULL); 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_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 = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":1209
 *              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_PyBytes_FromString(__pyx_v_namstring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __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_default_encoding); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __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 = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      __pyx_t_5 = 0;
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __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_8); __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "netCDF4.pyx":1210
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *              name = namstring.decode(default_encoding,unicode_error)
 *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *              # get variable type.
 */
      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_3) {

        /* "netCDF4.pyx":1211
 *              name = namstring.decode(default_encoding,unicode_error)
 *              if ierr != NC_NOERR:
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *              # get variable type.
 *              ierr = nc_inq_vartype(group._grpid, varid, &xtype)
 */
        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
        __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __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 = 1211; __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 = 1211; __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 = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":1213
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *              # get variable type.
 *              ierr = nc_inq_vartype(group._grpid, varid, &xtype)             # <<<<<<<<<<<<<<
 *              if ierr != NC_NOERR:
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_ierr = nc_inq_vartype(__pyx_t_6, __pyx_v_varid, (&__pyx_v_xtype));

      /* "netCDF4.pyx":1214
 *              # get variable type.
 *              ierr = nc_inq_vartype(group._grpid, varid, &xtype)
 *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *              # check to see if it is a supported user-defined type.
 */
      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_3) {

        /* "netCDF4.pyx":1215
 *              ierr = nc_inq_vartype(group._grpid, varid, &xtype)
 *              if ierr != NC_NOERR:
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *              # check to see if it is a supported user-defined type.
 *              try:
 */
        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
        __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __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 = 1215; __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 = 1215; __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 = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":1217
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *              # check to see if it is a supported user-defined type.
 *              try:             # <<<<<<<<<<<<<<
 *                  datatype = _nctonptype[xtype]
 *              except KeyError:
 */
      {
        __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        /*try:*/ {

          /* "netCDF4.pyx":1218
 *              # check to see if it is a supported user-defined type.
 *              try:
 *                  datatype = _nctonptype[xtype]             # <<<<<<<<<<<<<<
 *              except KeyError:
 *                  if xtype == NC_STRING:
 */
          __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, __pyx_v_xtype, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L14_error;};
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF_SET(__pyx_v_datatype, __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;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L21_try_end;
        __pyx_L14_error:;
        __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_8); __pyx_t_8 = 0;

        /* "netCDF4.pyx":1219
 *              try:
 *                  datatype = _nctonptype[xtype]
 *              except KeyError:             # <<<<<<<<<<<<<<
 *                  if xtype == NC_STRING:
 *                      datatype = str
 */
        __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
        if (__pyx_t_6) {
          __Pyx_AddTraceback("netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_1);

          /* "netCDF4.pyx":1220
 *                  datatype = _nctonptype[xtype]
 *              except KeyError:
 *                  if xtype == NC_STRING:             # <<<<<<<<<<<<<<
 *                      datatype = str
 *                  else:
 */
          __pyx_t_3 = ((__pyx_v_xtype == NC_STRING) != 0);
          if (__pyx_t_3) {

            /* "netCDF4.pyx":1221
 *              except KeyError:
 *                  if xtype == NC_STRING:
 *                      datatype = str             # <<<<<<<<<<<<<<
 *                  else:
 *                      ierr = nc_inq_user_type(group._grpid, xtype, namstring_cmp,
 */
            __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
            __Pyx_XDECREF_SET(__pyx_v_datatype, ((PyObject *)((PyObject*)(&PyString_Type))));
            goto __pyx_L24;
          }
          /*else*/ {

            /* "netCDF4.pyx":1223
 *                      datatype = str
 *                  else:
 *                      ierr = nc_inq_user_type(group._grpid, xtype, namstring_cmp,             # <<<<<<<<<<<<<<
 *                                              NULL, NULL, NULL, &classp)
 *                      if classp == NC_COMPOUND: # a compound type
 */
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L16_except_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 = 1223; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "netCDF4.pyx":1224
 *                  else:
 *                      ierr = nc_inq_user_type(group._grpid, xtype, namstring_cmp,
 *                                              NULL, NULL, NULL, &classp)             # <<<<<<<<<<<<<<
 *                      if classp == NC_COMPOUND: # a compound type
 *                          # create CompoundType instance describing this compound type.
 */
            __pyx_v_ierr = nc_inq_user_type(__pyx_t_6, __pyx_v_xtype, __pyx_v_namstring_cmp, NULL, NULL, NULL, (&__pyx_v_classp));

            /* "netCDF4.pyx":1232
 *                              #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
 *                              continue
 *                      elif classp == NC_VLEN: # a compound type             # <<<<<<<<<<<<<<
 *                          # create VLType instance describing this compound type.
 *                          try:
 */
            switch (__pyx_v_classp) {

              /* "netCDF4.pyx":1225
 *                      ierr = nc_inq_user_type(group._grpid, xtype, namstring_cmp,
 *                                              NULL, NULL, NULL, &classp)
 *                      if classp == NC_COMPOUND: # a compound type             # <<<<<<<<<<<<<<
 *                          # create CompoundType instance describing this compound type.
 *                          try:
 */
              case NC_COMPOUND:

              /* "netCDF4.pyx":1227
 *                      if classp == NC_COMPOUND: # a compound type
 *                          # create CompoundType instance describing this compound type.
 *                          try:             # <<<<<<<<<<<<<<
 *                              datatype = _read_compound(group, xtype)
 *                          except KeyError:
 */
              {
                __Pyx_ExceptionSave(&__pyx_t_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":1228
 *                          # create CompoundType instance describing this compound type.
 *                          try:
 *                              datatype = _read_compound(group, xtype)             # <<<<<<<<<<<<<<
 *                          except KeyError:
 *                              #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
 */
                  __pyx_t_5 = __pyx_f_7netCDF4__read_compound(__pyx_v_group, __pyx_v_xtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_5);
                  __pyx_t_5 = 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_L32_try_end;
                __pyx_L25_error:;
                __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

                /* "netCDF4.pyx":1229
 *                          try:
 *                              datatype = _read_compound(group, xtype)
 *                          except KeyError:             # <<<<<<<<<<<<<<
 *                              #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
 *                              continue
 */
                __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
                if (__pyx_t_6) {
                  __Pyx_AddTraceback("netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_15, &__pyx_t_16) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;}
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_GOTREF(__pyx_t_15);
                  __Pyx_GOTREF(__pyx_t_16);

                  /* "netCDF4.pyx":1231
 *                          except KeyError:
 *                              #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
 *                              continue             # <<<<<<<<<<<<<<
 *                      elif classp == NC_VLEN: # a compound type
 *                          # create VLType instance describing this compound type.
 */
                  goto __pyx_L34_except_continue;
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                  goto __pyx_L26_exception_handled;
                  __pyx_L34_except_continue:;
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                  goto __pyx_L31_try_continue;
                }
                goto __pyx_L27_except_error;
                __pyx_L27_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_L16_except_error;
                __pyx_L31_try_continue:;
                __Pyx_XGIVEREF(__pyx_t_12);
                __Pyx_XGIVEREF(__pyx_t_13);
                __Pyx_XGIVEREF(__pyx_t_14);
                __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
                goto __pyx_L23_except_continue;
                __pyx_L26_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_L32_try_end:;
              }
              break;

              /* "netCDF4.pyx":1232
 *                              #print "WARNING: variable '%s' has unsupported compound datatype, skipping .." % name
 *                              continue
 *                      elif classp == NC_VLEN: # a compound type             # <<<<<<<<<<<<<<
 *                          # create VLType instance describing this compound type.
 *                          try:
 */
              case NC_VLEN:

              /* "netCDF4.pyx":1234
 *                      elif classp == NC_VLEN: # a compound type
 *                          # create VLType instance describing this compound type.
 *                          try:             # <<<<<<<<<<<<<<
 *                              datatype = _read_vlen(group, xtype)
 *                          except KeyError:
 */
              {
                __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
                __Pyx_XGOTREF(__pyx_t_14);
                __Pyx_XGOTREF(__pyx_t_13);
                __Pyx_XGOTREF(__pyx_t_12);
                /*try:*/ {

                  /* "netCDF4.pyx":1235
 *                          # create VLType instance describing this compound type.
 *                          try:
 *                              datatype = _read_vlen(group, xtype)             # <<<<<<<<<<<<<<
 *                          except KeyError:
 *                              #print "WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
 */
                  __pyx_t_16 = __pyx_f_7netCDF4__read_vlen(__pyx_v_group, __pyx_v_xtype); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1235; __pyx_clineno = __LINE__; goto __pyx_L35_error;}
                  __Pyx_GOTREF(__pyx_t_16);
                  __Pyx_XDECREF_SET(__pyx_v_datatype, __pyx_t_16);
                  __pyx_t_16 = 0;
                }
                __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
                __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                goto __pyx_L42_try_end;
                __pyx_L35_error:;
                __Pyx_XDECREF(__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;

                /* "netCDF4.pyx":1236
 *                          try:
 *                              datatype = _read_vlen(group, xtype)
 *                          except KeyError:             # <<<<<<<<<<<<<<
 *                              #print "WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
 *                              continue
 */
                __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
                if (__pyx_t_6) {
                  __Pyx_AddTraceback("netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
                  if (__Pyx_GetException(&__pyx_t_16, &__pyx_t_15, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L37_except_error;}
                  __Pyx_GOTREF(__pyx_t_16);
                  __Pyx_GOTREF(__pyx_t_15);
                  __Pyx_GOTREF(__pyx_t_5);

                  /* "netCDF4.pyx":1238
 *                          except KeyError:
 *                              #print "WARNING: variable '%s' has unsupported VLEN datatype, skipping .." % name
 *                              continue             # <<<<<<<<<<<<<<
 *                      else:
 *                          #print "WARNING: variable '%s' has unsupported datatype, skipping .." % name
 */
                  goto __pyx_L44_except_continue;
                  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  goto __pyx_L36_exception_handled;
                  __pyx_L44_except_continue:;
                  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                  goto __pyx_L41_try_continue;
                }
                goto __pyx_L37_except_error;
                __pyx_L37_except_error:;
                __Pyx_XGIVEREF(__pyx_t_14);
                __Pyx_XGIVEREF(__pyx_t_13);
                __Pyx_XGIVEREF(__pyx_t_12);
                __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
                goto __pyx_L16_except_error;
                __pyx_L41_try_continue:;
                __Pyx_XGIVEREF(__pyx_t_14);
                __Pyx_XGIVEREF(__pyx_t_13);
                __Pyx_XGIVEREF(__pyx_t_12);
                __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
                goto __pyx_L23_except_continue;
                __pyx_L36_exception_handled:;
                __Pyx_XGIVEREF(__pyx_t_14);
                __Pyx_XGIVEREF(__pyx_t_13);
                __Pyx_XGIVEREF(__pyx_t_12);
                __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
                __pyx_L42_try_end:;
              }
              break;
              default:

              /* "netCDF4.pyx":1241
 *                      else:
 *                          #print "WARNING: variable '%s' has unsupported datatype, skipping .." % name
 *                          continue             # <<<<<<<<<<<<<<
 *              # get number of dimensions.
 *              ierr = nc_inq_varndims(group._grpid, varid, &numdims)
 */
              goto __pyx_L23_except_continue;
              break;
            }
          }
          __pyx_L24:;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L15_exception_handled;
          __pyx_L23_except_continue:;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L20_try_continue;
        }
        goto __pyx_L16_except_error;
        __pyx_L16_except_error:;
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        goto __pyx_L1_error;
        __pyx_L20_try_continue:;
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        goto __pyx_L9_continue;
        __pyx_L15_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        __pyx_L21_try_end:;
      }

      /* "netCDF4.pyx":1243
 *                          continue
 *              # get number of dimensions.
 *              ierr = nc_inq_varndims(group._grpid, varid, &numdims)             # <<<<<<<<<<<<<<
 *              if ierr != NC_NOERR:
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __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 = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_ierr = nc_inq_varndims(__pyx_t_6, __pyx_v_varid, (&__pyx_v_numdims));

      /* "netCDF4.pyx":1244
 *              # get number of dimensions.
 *              ierr = nc_inq_varndims(group._grpid, varid, &numdims)
 *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *              # get dimension ids.
 */
      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_3) {

        /* "netCDF4.pyx":1245
 *              ierr = nc_inq_varndims(group._grpid, varid, &numdims)
 *              if ierr != NC_NOERR:
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *              # get dimension ids.
 *              ierr = nc_inq_vardimid(group._grpid, varid, dimids)
 */
        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
        __pyx_t_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 = 1245; __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 = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_7, 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_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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 = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":1247
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *              # get dimension ids.
 *              ierr = nc_inq_vardimid(group._grpid, varid, dimids)             # <<<<<<<<<<<<<<
 *              if ierr != NC_NOERR:
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __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 = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_ierr = nc_inq_vardimid(__pyx_t_6, __pyx_v_varid, __pyx_v_dimids);

      /* "netCDF4.pyx":1248
 *              # get dimension ids.
 *              ierr = nc_inq_vardimid(group._grpid, varid, dimids)
 *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *              # loop over dimensions, retrieve names.
 */
      __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_3) {

        /* "netCDF4.pyx":1249
 *              ierr = nc_inq_vardimid(group._grpid, varid, dimids)
 *              if ierr != NC_NOERR:
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *              # loop over dimensions, retrieve names.
 *              # if not found in current group, look in parents.
 */
        __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
        __pyx_t_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 = 1249; __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 = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_7, 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_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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 = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":1255
 *              # 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_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_dimensions, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "netCDF4.pyx":1256
 *              # use the 'foo' dimension from the parent?
 *              dimensions = []
 *              for nn from 0 <= nn < numdims:             # <<<<<<<<<<<<<<
 *                  grp = group
 *                  found = False
 */
      __pyx_t_6 = __pyx_v_numdims;
      for (__pyx_v_nn = 0; __pyx_v_nn < __pyx_t_6; __pyx_v_nn++) {

        /* "netCDF4.pyx":1257
 *              dimensions = []
 *              for nn from 0 <= nn < numdims:
 *                  grp = group             # <<<<<<<<<<<<<<
 *                  found = False
 *                  while not found:
 */
        __Pyx_INCREF(__pyx_v_group);
        __Pyx_XDECREF_SET(__pyx_v_grp, __pyx_v_group);

        /* "netCDF4.pyx":1258
 *              for nn from 0 <= nn < numdims:
 *                  grp = group
 *                  found = False             # <<<<<<<<<<<<<<
 *                  while not found:
 *                      for key, value in grp.dimensions.items():
 */
        __pyx_v_found = 0;

        /* "netCDF4.pyx":1259
 *                  grp = group
 *                  found = False
 *                  while not found:             # <<<<<<<<<<<<<<
 *                      for key, value in grp.dimensions.items():
 *                          if value._dimid == dimids[nn]:
 */
        while (1) {
          __pyx_t_3 = ((!(__pyx_v_found != 0)) != 0);
          if (!__pyx_t_3) break;

          /* "netCDF4.pyx":1260
 *                  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 = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __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_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
            __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_17 = 0;
            __pyx_t_18 = NULL;
          } else {
            __pyx_t_17 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_18 = Py_TYPE(__pyx_t_7)->tp_iternext;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          for (;;) {
            if (!__pyx_t_18 && PyList_CheckExact(__pyx_t_7)) {
              if (__pyx_t_17 >= PyList_GET_SIZE(__pyx_t_7)) break;
              #if CYTHON_COMPILING_IN_CPYTHON
              __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_17); __Pyx_INCREF(__pyx_t_1); __pyx_t_17++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              #else
              __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              #endif
            } else if (!__pyx_t_18 && PyTuple_CheckExact(__pyx_t_7)) {
              if (__pyx_t_17 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
              #if CYTHON_COMPILING_IN_CPYTHON
              __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_17); __Pyx_INCREF(__pyx_t_1); __pyx_t_17++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              #else
              __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_17); __pyx_t_17++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              #endif
            } else {
              __pyx_t_1 = __pyx_t_18(__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 = 1260; __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 = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              }
              #if CYTHON_COMPILING_IN_CPYTHON
              if (likely(PyTuple_CheckExact(sequence))) {
                __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
                __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
              } else {
                __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
                __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
              }
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(__pyx_t_5);
              #else
              __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_5);
              #endif
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            } else {
              Py_ssize_t index = -1;
              __pyx_t_15 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_15);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_19 = Py_TYPE(__pyx_t_15)->tp_iternext;
              index = 0; __pyx_t_8 = __pyx_t_19(__pyx_t_15); if (unlikely(!__pyx_t_8)) goto __pyx_L53_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_8);
              index = 1; __pyx_t_5 = __pyx_t_19(__pyx_t_15); if (unlikely(!__pyx_t_5)) goto __pyx_L53_unpacking_failed;
              __Pyx_GOTREF(__pyx_t_5);
              if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_15), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __pyx_t_19 = NULL;
              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
              goto __pyx_L54_unpacking_done;
              __pyx_L53_unpacking_failed:;
              __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
              __pyx_t_19 = NULL;
              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __pyx_L54_unpacking_done:;
            }
            __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_8);
            __pyx_t_8 = 0;
            __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5);
            __pyx_t_5 = 0;

            /* "netCDF4.pyx":1261
 *                  while not found:
 *                      for key, value in grp.dimensions.items():
 *                          if value._dimid == dimids[nn]:             # <<<<<<<<<<<<<<
 *                              dimensions.append(key)
 *                              found = True
 */
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_dimid); 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 = __Pyx_PyInt_From_int((__pyx_v_dimids[__pyx_v_nn])); 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_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __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_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (__pyx_t_3) {

              /* "netCDF4.pyx":1262
 *                      for key, value in grp.dimensions.items():
 *                          if value._dimid == dimids[nn]:
 *                              dimensions.append(key)             # <<<<<<<<<<<<<<
 *                              found = True
 *                              break
 */
              __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_dimensions, __pyx_v_key); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

              /* "netCDF4.pyx":1263
 *                          if value._dimid == dimids[nn]:
 *                              dimensions.append(key)
 *                              found = True             # <<<<<<<<<<<<<<
 *                              break
 *                      grp = grp.parent
 */
              __pyx_v_found = 1;

              /* "netCDF4.pyx":1264
 *                              dimensions.append(key)
 *                              found = True
 *                              break             # <<<<<<<<<<<<<<
 *                      grp = grp.parent
 *              # create new variable instance.
 */
              goto __pyx_L52_break;
            }
          }
          __pyx_L52_break:;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "netCDF4.pyx":1265
 *                              found = True
 *                              break
 *                      grp = grp.parent             # <<<<<<<<<<<<<<
 *              # create new variable instance.
 *              variables[name] = Variable(group, name, datatype, dimensions, id=varid)
 */
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_parent); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF_SET(__pyx_v_grp, __pyx_t_7);
          __pyx_t_7 = 0;
        }
      }

      /* "netCDF4.pyx":1267
 *                      grp = grp.parent
 *              # create new variable instance.
 *              variables[name] = Variable(group, name, datatype, dimensions, id=varid)             # <<<<<<<<<<<<<<
 *         free(varids) # free pointer holding variable ids.
 *     return variables
 */
      __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __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_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_varid); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_id, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Variable)), __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_variables, __pyx_v_name, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_L9_continue:;
    }

    /* "netCDF4.pyx":1268
 *              # create new variable instance.
 *              variables[name] = Variable(group, name, datatype, dimensions, id=varid)
 *         free(varids) # free pointer holding variable ids.             # <<<<<<<<<<<<<<
 *     return variables
 * 
 */
    free(__pyx_v_varids);
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "netCDF4.pyx":1269
 *              variables[name] = Variable(group, name, datatype, dimensions, id=varid)
 *         free(varids) # free pointer holding variable ids.
 *     return variables             # <<<<<<<<<<<<<<
 * 
 * # these are class attributes that
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_variables);
  __pyx_r = __pyx_v_variables;
  goto __pyx_L0;

  /* "netCDF4.pyx":1176
 *     return groups
 * 
 * cdef _get_vars(group):             # <<<<<<<<<<<<<<
 *     # Private function to create L{Variable} instances for all the
 *     # variables in a L{Group} or Dataset
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("netCDF4._get_vars", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_variables);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_datatype);
  __Pyx_XDECREF(__pyx_v_dimensions);
  __Pyx_XDECREF(__pyx_v_grp);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1403
 *     file_format, data_model, cmptypes, vltypes, keepweakref
 * 
 *     def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',             # <<<<<<<<<<<<<<
 *                  diskless=False, persist=False, keepweakref=False, **kwargs):
 *         cdef int grpid, ierr, numgrps, numdims, numvars
 */

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_clobber = 0;
  PyObject *__pyx_v_format = 0;
  PyObject *__pyx_v_diskless = 0;
  PyObject *__pyx_v_persist = 0;
  PyObject *__pyx_v_keepweakref = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_mode,&__pyx_n_s_clobber,&__pyx_n_s_format,&__pyx_n_s_diskless,&__pyx_n_s_persist,&__pyx_n_s_keepweakref,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    values[1] = ((PyObject *)__pyx_n_s_r_2);
    values[2] = ((PyObject *)Py_True);
    values[3] = ((PyObject *)__pyx_n_s_NETCDF4);

    /* "netCDF4.pyx":1404
 * 
 *     def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',
 *                  diskless=False, persist=False, keepweakref=False, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef int grpid, ierr, numgrps, numdims, numvars
 *         cdef char *path
 */
    values[4] = ((PyObject *)Py_False);
    values[5] = ((PyObject *)Py_False);
    values[6] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_clobber);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_diskless);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_persist);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_keepweakref);
          if (value) { values[6] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = values[0];
    __pyx_v_mode = values[1];
    __pyx_v_clobber = values[2];
    __pyx_v_format = values[3];
    __pyx_v_diskless = values[4];
    __pyx_v_persist = values[5];
    __pyx_v_keepweakref = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("netCDF4.Dataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_7Dataset___init__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_filename, __pyx_v_mode, __pyx_v_clobber, __pyx_v_format, __pyx_v_diskless, __pyx_v_persist, __pyx_v_keepweakref, __pyx_v_kwargs);

  /* "netCDF4.pyx":1403
 *     file_format, data_model, cmptypes, vltypes, keepweakref
 * 
 *     def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',             # <<<<<<<<<<<<<<
 *                  diskless=False, persist=False, keepweakref=False, **kwargs):
 *         cdef int grpid, ierr, numgrps, numdims, numvars
 */

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset___init__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_mode, PyObject *__pyx_v_clobber, PyObject *__pyx_v_format, PyObject *__pyx_v_diskless, PyObject *__pyx_v_persist, PyObject *__pyx_v_keepweakref, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_v_grpid;
  int __pyx_v_ierr;
  char *__pyx_v_path;
  PyObject *__pyx_v_bytestr = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  char *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "netCDF4.pyx":1408
 *         cdef char *path
 *         cdef char namstring[NC_MAX_NAME+1]
 *         if diskless and __netcdf4libversion__ < '4.2.1':             # <<<<<<<<<<<<<<
 *             #diskless = False # don't raise error, instead silently ignore
 *             raise ValueError('diskless mode requires netcdf lib >= 4.2.1, you have %s' % __netcdf4libversion__)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_4_2_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __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 = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_1;
  }
  if (__pyx_t_5) {

    /* "netCDF4.pyx":1410
 *         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_GetModuleGlobalName(__pyx_n_s_netcdf4libversion); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_diskless_mode_requires_netcdf_li, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __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(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __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 = 1410; __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 = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1411
 *             #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_2 = __pyx_f_7netCDF4__strencode(__pyx_v_filename, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_bytestr = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "netCDF4.pyx":1412
 *             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_6 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_path = __pyx_t_6;

  /* "netCDF4.pyx":1413
 *         bytestr = _strencode(filename)
 *         path = bytestr
 *         if mode == 'w':             # <<<<<<<<<<<<<<
 *             _set_default_format(format=format)
 *             if clobber:
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_w, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {

    /* "netCDF4.pyx":1414
 *         path = bytestr
 *         if mode == 'w':
 *             _set_default_format(format=format)             # <<<<<<<<<<<<<<
 *             if clobber:
 *                 if diskless:
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_default_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_format, __pyx_v_format) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1414; __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_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "netCDF4.pyx":1415
 *         if mode == 'w':
 *             _set_default_format(format=format)
 *             if clobber:             # <<<<<<<<<<<<<<
 *                 if diskless:
 *                     if persist:
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_clobber); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_5) {

      /* "netCDF4.pyx":1416
 *             _set_default_format(format=format)
 *             if clobber:
 *                 if diskless:             # <<<<<<<<<<<<<<
 *                     if persist:
 *                         ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid)
 */
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_5) {

        /* "netCDF4.pyx":1417
 *             if clobber:
 *                 if diskless:
 *                     if persist:             # <<<<<<<<<<<<<<
 *                         ierr = nc_create(path, NC_WRITE | NC_CLOBBER | NC_DISKLESS , &grpid)
 *                     else:
 */
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_5) {

          /* "netCDF4.pyx":1418
 *                 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_7 = __Pyx_PyInt_From_int((NC_WRITE | NC_CLOBBER)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = PyNumber_Or(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __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_3); __pyx_t_3 = 0;
          __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid));
          goto __pyx_L7;
        }
        /*else*/ {

          /* "netCDF4.pyx":1420
 *                         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_2 = __Pyx_PyInt_From_int(NC_CLOBBER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_7 = PyNumber_Or(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __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_3); __pyx_t_3 = 0;
          __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid));
        }
        __pyx_L7:;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "netCDF4.pyx":1422
 *                         ierr = nc_create(path, NC_CLOBBER | NC_DISKLESS , &grpid)
 *                 else:
 *                     ierr = nc_create(path, NC_CLOBBER, &grpid)             # <<<<<<<<<<<<<<
 *             else:
 *                 if diskless:
 */
        __pyx_v_ierr = nc_create(__pyx_v_path, NC_CLOBBER, (&__pyx_v_grpid));
      }
      __pyx_L6:;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "netCDF4.pyx":1424
 *                     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_5 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_5) {

        /* "netCDF4.pyx":1425
 *             else:
 *                 if diskless:
 *                     if persist:             # <<<<<<<<<<<<<<
 *                         ierr = nc_create(path, NC_WRITE | NC_NOCLOBBER | NC_DISKLESS , &grpid)
 *                     else:
 */
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_5) {

          /* "netCDF4.pyx":1426
 *                 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_7 = __Pyx_PyInt_From_int((NC_WRITE | NC_NOCLOBBER)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = PyNumber_Or(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1426; __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_3); __pyx_t_3 = 0;
          __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid));
          goto __pyx_L9;
        }
        /*else*/ {

          /* "netCDF4.pyx":1428
 *                         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_2 = __Pyx_PyInt_From_int(NC_NOCLOBBER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_7 = PyNumber_Or(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1428; __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_3); __pyx_t_3 = 0;
          __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid));
        }
        __pyx_L9:;
        goto __pyx_L8;
      }
      /*else*/ {

        /* "netCDF4.pyx":1430
 *                         ierr = nc_create(path, NC_NOCLOBBER | NC_DISKLESS , &grpid)
 *                 else:
 *                     ierr = nc_create(path, NC_NOCLOBBER, &grpid)             # <<<<<<<<<<<<<<
 *             # reset default format to netcdf3 - this is a workaround
 *             # for issue 170 (nc_open'ing a DAP dataset after switching
 */
        __pyx_v_ierr = nc_create(__pyx_v_path, NC_NOCLOBBER, (&__pyx_v_grpid));
      }
      __pyx_L8:;
    }
    __pyx_L5:;

    /* "netCDF4.pyx":1435
 *             # 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_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_set_default_format); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_format, __pyx_n_s_NETCDF3_64BIT) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; __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_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L4;
  }

  /* "netCDF4.pyx":1436
 *             # 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_5 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_r_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {

    /* "netCDF4.pyx":1437
 *             _set_default_format(format='NETCDF3_64BIT')
 *         elif mode == 'r':
 *             if diskless:             # <<<<<<<<<<<<<<
 *                 ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid)
 *             else:
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_5) {

      /* "netCDF4.pyx":1438
 *         elif mode == 'r':
 *             if diskless:
 *                 ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid)             # <<<<<<<<<<<<<<
 *             else:
 *                 ierr = nc_open(path, NC_NOWRITE, &grpid)
 */
      __pyx_t_2 = __Pyx_PyInt_From_int(NC_NOWRITE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = PyNumber_Or(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __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_3); __pyx_t_3 = 0;
      __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_ierr = nc_open(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid));
      goto __pyx_L10;
    }
    /*else*/ {

      /* "netCDF4.pyx":1440
 *                 ierr = nc_open(path, NC_NOWRITE | NC_DISKLESS, &grpid)
 *             else:
 *                 ierr = nc_open(path, NC_NOWRITE, &grpid)             # <<<<<<<<<<<<<<
 *         elif mode == 'r+' or mode == 'a':
 *             if diskless:
 */
      __pyx_v_ierr = nc_open(__pyx_v_path, NC_NOWRITE, (&__pyx_v_grpid));
    }
    __pyx_L10:;
    goto __pyx_L4;
  }

  /* "netCDF4.pyx":1441
 *             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_5 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_kp_s_r_3, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_5) {
    __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_a, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __pyx_t_1;
  } else {
    __pyx_t_4 = __pyx_t_5;
  }
  if (__pyx_t_4) {

    /* "netCDF4.pyx":1442
 *                 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_4 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "netCDF4.pyx":1443
 *         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_7 = __Pyx_PyInt_From_int(NC_WRITE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); 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_2 = PyNumber_Or(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; __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_3); __pyx_t_3 = 0;
      __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_ierr = nc_open(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid));
      goto __pyx_L11;
    }
    /*else*/ {

      /* "netCDF4.pyx":1445
 *                 ierr = nc_open(path, NC_WRITE | NC_DISKLESS, &grpid)
 *             else:
 *                 ierr = nc_open(path, NC_WRITE, &grpid)             # <<<<<<<<<<<<<<
 *         elif mode == 'as' or mode == 'r+s':
 *             if diskless:
 */
      __pyx_v_ierr = nc_open(__pyx_v_path, NC_WRITE, (&__pyx_v_grpid));
    }
    __pyx_L11:;
    goto __pyx_L4;
  }

  /* "netCDF4.pyx":1446
 *             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_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_as, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_4) {
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_kp_s_r_s, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = __pyx_t_5;
  } else {
    __pyx_t_1 = __pyx_t_4;
  }
  if (__pyx_t_1) {

    /* "netCDF4.pyx":1447
 *                 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 = 1447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {

      /* "netCDF4.pyx":1448
 *         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_2 = __Pyx_PyInt_From_int(NC_SHARE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = PyNumber_Or(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __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_3); __pyx_t_3 = 0;
      __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_ierr = nc_open(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid));
      goto __pyx_L12;
    }
    /*else*/ {

      /* "netCDF4.pyx":1450
 *                 ierr = nc_open(path, NC_SHARE | NC_DISKLESS, &grpid)
 *             else:
 *                 ierr = nc_open(path, NC_SHARE, &grpid)             # <<<<<<<<<<<<<<
 *         elif mode == 'ws':
 *             if clobber:
 */
      __pyx_v_ierr = nc_open(__pyx_v_path, NC_SHARE, (&__pyx_v_grpid));
    }
    __pyx_L12:;
    goto __pyx_L4;
  }

  /* "netCDF4.pyx":1451
 *             else:
 *                 ierr = nc_open(path, NC_SHARE, &grpid)
 *         elif mode == 'ws':             # <<<<<<<<<<<<<<
 *             if clobber:
 *                 if diskless:
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_ws, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":1452
 *                 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 = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_1) {

      /* "netCDF4.pyx":1453
 *         elif mode == 'ws':
 *             if clobber:
 *                 if diskless:             # <<<<<<<<<<<<<<
 *                     if persist:
 *                         ierr = nc_create(path, NC_WRITE | NC_SHARE | NC_CLOBBER | NC_DISKLESS , &grpid)
 */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_diskless); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_1) {

        /* "netCDF4.pyx":1454
 *             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 = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_1) {

          /* "netCDF4.pyx":1455
 *                 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_7 = __Pyx_PyInt_From_int(((NC_WRITE | NC_SHARE) | NC_CLOBBER)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = PyNumber_Or(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __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_3); __pyx_t_3 = 0;
          __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid));
          goto __pyx_L15;
        }
        /*else*/ {

          /* "netCDF4.pyx":1457
 *                         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_2 = __Pyx_PyInt_From_int((NC_SHARE | NC_CLOBBER)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_7 = PyNumber_Or(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; __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_3); __pyx_t_3 = 0;
          __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid));
        }
        __pyx_L15:;
        goto __pyx_L14;
      }
      /*else*/ {

        /* "netCDF4.pyx":1459
 *                         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_L14:;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "netCDF4.pyx":1461
 *                     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 = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_1) {

        /* "netCDF4.pyx":1462
 *             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 = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_1) {

          /* "netCDF4.pyx":1463
 *                 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_7 = __Pyx_PyInt_From_int(((NC_WRITE | NC_SHARE) | NC_NOCLOBBER)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = PyNumber_Or(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __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_3); __pyx_t_3 = 0;
          __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid));
          goto __pyx_L17;
        }
        /*else*/ {

          /* "netCDF4.pyx":1465
 *                         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_2 = __Pyx_PyInt_From_int((NC_SHARE | NC_NOCLOBBER)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NC_DISKLESS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_7 = PyNumber_Or(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __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_3); __pyx_t_3 = 0;
          __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_v_ierr = nc_create(__pyx_v_path, __pyx_t_8, (&__pyx_v_grpid));
        }
        __pyx_L17:;
        goto __pyx_L16;
      }
      /*else*/ {

        /* "netCDF4.pyx":1467
 *                         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_L16:;
    }
    __pyx_L13:;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "netCDF4.pyx":1469
 *                     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_7 = __Pyx_PyString_Format(__pyx_kp_s_mode_must_be_w_r_a_or_r_got_s, __pyx_v_mode); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L4:;

  /* "netCDF4.pyx":1470
 *         else:
 *             raise ValueError("mode must be 'w', 'r', 'a' or 'r+', got '%s'" % mode)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         # data model and file format attributes
 */
  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":1471
 *             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_6 = ((char *)nc_strerror(__pyx_v_ierr));
    __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = PyTuple_New(1); 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_INCREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_3, 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_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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 = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1473
 *             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_7 = __pyx_f_7netCDF4__get_format(__pyx_v_grpid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->data_model);
  __Pyx_DECREF(__pyx_v_self->data_model);
  __pyx_v_self->data_model = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "netCDF4.pyx":1476
 *         # 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_7 = __pyx_v_self->data_model;
  __Pyx_INCREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->file_format);
  __Pyx_DECREF(__pyx_v_self->file_format);
  __pyx_v_self->file_format = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "netCDF4.pyx":1477
 *         # 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_7 = __pyx_f_7netCDF4__get_full_format(__pyx_v_grpid); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->disk_format);
  __Pyx_DECREF(__pyx_v_self->disk_format);
  __pyx_v_self->disk_format = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "netCDF4.pyx":1482
 *         #if diskless and self.data_model != 'NETCDF3_CLASSIC' and ncopen:
 *         #    raise ValueError("diskless access only supported for NETCDF3_CLASSIC format")
 *         self._grpid = grpid             # <<<<<<<<<<<<<<
 *         self._isopen = 1
 *         self.path = '/'
 */
  __pyx_v_self->_grpid = __pyx_v_grpid;

  /* "netCDF4.pyx":1483
 *         #    raise ValueError("diskless access only supported for NETCDF3_CLASSIC format")
 *         self._grpid = grpid
 *         self._isopen = 1             # <<<<<<<<<<<<<<
 *         self.path = '/'
 *         self.parent = None
 */
  __pyx_v_self->_isopen = 1;

  /* "netCDF4.pyx":1484
 *         self._grpid = grpid
 *         self._isopen = 1
 *         self.path = '/'             # <<<<<<<<<<<<<<
 *         self.parent = None
 *         self.keepweakref = keepweakref
 */
  __Pyx_INCREF(__pyx_kp_s__15);
  __Pyx_GIVEREF(__pyx_kp_s__15);
  __Pyx_GOTREF(__pyx_v_self->path);
  __Pyx_DECREF(__pyx_v_self->path);
  __pyx_v_self->path = __pyx_kp_s__15;

  /* "netCDF4.pyx":1485
 *         self._isopen = 1
 *         self.path = '/'
 *         self.parent = None             # <<<<<<<<<<<<<<
 *         self.keepweakref = keepweakref
 *         # get compound and vlen types in the root Group.
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->parent);
  __Pyx_DECREF(__pyx_v_self->parent);
  __pyx_v_self->parent = Py_None;

  /* "netCDF4.pyx":1486
 *         self.path = '/'
 *         self.parent = None
 *         self.keepweakref = keepweakref             # <<<<<<<<<<<<<<
 *         # get compound and vlen types in the root Group.
 *         self.cmptypes, self.vltypes = _get_types(self)
 */
  __Pyx_INCREF(__pyx_v_keepweakref);
  __Pyx_GIVEREF(__pyx_v_keepweakref);
  __Pyx_GOTREF(__pyx_v_self->keepweakref);
  __Pyx_DECREF(__pyx_v_self->keepweakref);
  __pyx_v_self->keepweakref = __pyx_v_keepweakref;

  /* "netCDF4.pyx":1488
 *         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_7 = __pyx_f_7netCDF4__get_types(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __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 = 1488; __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_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); 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_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_9 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L19_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L19_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_10 = NULL;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L20_unpacking_done;
    __pyx_L19_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L20_unpacking_done:;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->cmptypes);
  __Pyx_DECREF(__pyx_v_self->cmptypes);
  __pyx_v_self->cmptypes = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->vltypes);
  __Pyx_DECREF(__pyx_v_self->vltypes);
  __pyx_v_self->vltypes = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "netCDF4.pyx":1490
 *         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_7 = __pyx_f_7netCDF4__get_dims(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->dimensions);
  __Pyx_DECREF(__pyx_v_self->dimensions);
  __pyx_v_self->dimensions = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "netCDF4.pyx":1492
 *         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_7 = __pyx_f_7netCDF4__get_vars(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_GOTREF(__pyx_v_self->variables);
  __Pyx_DECREF(__pyx_v_self->variables);
  __pyx_v_self->variables = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "netCDF4.pyx":1494
 *         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 = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":1495
 *         # get groups in the root Group.
 *         if self.data_model == 'NETCDF4':
 *             self.groups = _get_grps(self)             # <<<<<<<<<<<<<<
 *         else:
 *             self.groups = OrderedDict()
 */
    __pyx_t_7 = __pyx_f_7netCDF4__get_grps(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->groups);
    __Pyx_DECREF(__pyx_v_self->groups);
    __pyx_v_self->groups = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L21;
  }
  /*else*/ {

    /* "netCDF4.pyx":1497
 *             self.groups = _get_grps(self)
 *         else:
 *             self.groups = OrderedDict()             # <<<<<<<<<<<<<<
 * 
 *     # these allow Dataset objects to be used via a "with" statement.
 */
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->groups);
    __Pyx_DECREF(__pyx_v_self->groups);
    __pyx_v_self->groups = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L21:;

  /* "netCDF4.pyx":1403
 *     file_format, data_model, cmptypes, vltypes, keepweakref
 * 
 *     def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',             # <<<<<<<<<<<<<<
 *                  diskless=False, persist=False, keepweakref=False, **kwargs):
 *         cdef int grpid, ierr, numgrps, numdims, numvars
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("netCDF4.Dataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bytestr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1500
 * 
 *     # these allow Dataset objects to be used via a "with" statement.
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 *     def __exit__(self,atype,value,traceback):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_2__enter__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_2__enter__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__", 0);

  /* "netCDF4.pyx":1501
 *     # these allow Dataset objects to be used via a "with" statement.
 *     def __enter__(self):
 *         return self             # <<<<<<<<<<<<<<
 *     def __exit__(self,atype,value,traceback):
 *         self.close()
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "netCDF4.pyx":1500
 * 
 *     # these allow Dataset objects to be used via a "with" statement.
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 *     def __exit__(self,atype,value,traceback):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1502
 *     def __enter__(self):
 *         return self
 *     def __exit__(self,atype,value,traceback):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_atype = 0;
  CYTHON_UNUSED PyObject *__pyx_v_value = 0;
  CYTHON_UNUSED PyObject *__pyx_v_traceback = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_atype,&__pyx_n_s_value,&__pyx_n_s_traceback,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_atype)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1502; __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 = 1502; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1502; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_atype = values[0];
    __pyx_v_value = values[1];
    __pyx_v_traceback = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1502; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.Dataset.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_4__exit__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_atype, __pyx_v_value, __pyx_v_traceback);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_4__exit__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_atype, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__exit__", 0);

  /* "netCDF4.pyx":1503
 *         return self
 *     def __exit__(self,atype,value,traceback):
 *         self.close()             # <<<<<<<<<<<<<<
 * 
 *     def filepath(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1503; __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_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":1502
 *     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_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":1505
 *         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":1518
 *             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":1521
 * 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 __str__(self):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; __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 = 1521; __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 = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":1505
 *         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":1523
 *             raise ValueError(msg)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         if python3:
 *            return self.__unicode__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_9__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_9__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_8__str__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_8__str__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "netCDF4.pyx":1524
 * 
 *     def __str__(self):
 *         if python3:             # <<<<<<<<<<<<<<
 *            return self.__unicode__()
 *         else:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __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 = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "netCDF4.pyx":1525
 *     def __str__(self):
 *         if python3:
 *            return self.__unicode__()             # <<<<<<<<<<<<<<
 *         else:
 *            return unicode(self).encode(default_encoding)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __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":1527
 *            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 = 1527; __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_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __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_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __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_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __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 = 1527; __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_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":1523
 *             raise ValueError(msg)
 * 
 *     def __str__(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_AddTraceback("netCDF4.Dataset.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1529
 *            return unicode(self).encode(default_encoding)
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         ncdump = ['%r\n' % type(self)]
 *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_11__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_11__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10__unicode__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_10__unicode__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_v_ncdump = NULL;
  PyObject *__pyx_v_dimnames = NULL;
  PyObject *__pyx_v_varnames = NULL;
  PyObject *__pyx_v_grpnames = NULL;
  PyObject *__pyx_v_attrs = NULL;
  PyObject *__pyx_v_dimname = NULL;
  PyObject *__pyx_v_varname = NULL;
  PyObject *__pyx_v_grpname = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  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 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__unicode__", 0);

  /* "netCDF4.pyx":1530
 * 
 *     def __unicode__(self):
 *         ncdump = ['%r\n' % type(self)]             # <<<<<<<<<<<<<<
 *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
 *         for dimname in self.dimensions.keys()])
 */
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_r, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; __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 = 1530; __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":1531
 *     def __unicode__(self):
 *         ncdump = ['%r\n' % type(self)]
 *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\             # <<<<<<<<<<<<<<
 *         for dimname in self.dimensions.keys()])
 *         varnames = tuple(\
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "netCDF4.pyx":1532
 *         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_self->dimensions, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (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 = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (!__pyx_t_5 && 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 = 1532; __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 = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
      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 = 1532; __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 = 1532; __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 = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "netCDF4.pyx":1531
 *     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 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); 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_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_dimname);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_dimname);
    __Pyx_GIVEREF(__pyx_v_dimname);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_dimname); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); 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_3 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_t_6); 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_t_6 = PyNumber_Add(__pyx_t_7, __pyx_t_3); 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_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __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;
  __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_dimnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":1534
 *         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 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "netCDF4.pyx":1539
 *         .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 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
    __pyx_t_2 = __pyx_t_6; __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_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_2);
      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 = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_varname, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "netCDF4.pyx":1534
 *         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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __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 = 1534; __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 = 1534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __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 = 1534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; __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_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_7, __pyx_kp_s_4m); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; __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 = 1534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_varname);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_varname);
    __Pyx_GIVEREF(__pyx_v_varname);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; __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_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; __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_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyNumber_Add(__pyx_t_6, __pyx_kp_s_0m); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "netCDF4.pyx":1535
 *         varnames = tuple(\
 *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
 *         (((_tostr(self.variables[varname].dimensions)             # <<<<<<<<<<<<<<
 *         .replace("u'",""))\
 *         .replace("'",""))\
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __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 = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dimensions); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __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 = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __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_3); __pyx_t_3 = 0;

    /* "netCDF4.pyx":1536
 *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
 *         (((_tostr(self.variables[varname].dimensions)
 *         .replace("u'",""))\             # <<<<<<<<<<<<<<
 *         .replace("'",""))\
 *         .replace(", ",","))\
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "netCDF4.pyx":1537
 *         (((_tostr(self.variables[varname].dimensions)
 *         .replace("u'",""))\
 *         .replace("'",""))\             # <<<<<<<<<<<<<<
 *         .replace(", ",","))\
 *         .replace(",)",")") for varname in self.variables.keys()])
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "netCDF4.pyx":1538
 *         .replace("u'",""))\
 *         .replace("'",""))\
 *         .replace(", ",","))\             # <<<<<<<<<<<<<<
 *         .replace(",)",")") for varname in self.variables.keys()])
 *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "netCDF4.pyx":1539
 *         .replace("'",""))\
 *         .replace(", ",","))\
 *         .replace(",)",")") for varname in self.variables.keys()])             # <<<<<<<<<<<<<<
 *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
 *         if self.path == '/':
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_replace); 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_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "netCDF4.pyx":1534
 *         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 = PyNumber_Add(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; __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_7); __pyx_t_7 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":1533
 *         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_2 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_varnames = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "netCDF4.pyx":1540
 *         .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_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->groups, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (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 = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (!__pyx_t_5 && 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 = 1540; __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 = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
      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 = 1540; __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 = 1540; __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 = 1540; __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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_grpname);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_grpname);
    __Pyx_GIVEREF(__pyx_v_grpname);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_grpnames = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":1541
 *         .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_10 = (__Pyx_PyString_Equals(__pyx_v_self->path, __pyx_kp_s__15, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_10) {

    /* "netCDF4.pyx":1543
 *         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_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_self->data_model);
    PyTuple_SET_ITEM(__pyx_t_1, 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_1, 1, __pyx_v_self->disk_format);
    __Pyx_GIVEREF(__pyx_v_self->disk_format);

    /* "netCDF4.pyx":1542
 *         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_2 = __Pyx_PyString_Format(__pyx_kp_s_root_group_s_data_model_file_for, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_2); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L9;
  }
  /*else*/ {

    /* "netCDF4.pyx":1545
 *                     (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_2 = __Pyx_PyString_Format(__pyx_kp_s_group_s, __pyx_v_self->path); 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_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_2); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L9:;

  /* "netCDF4.pyx":1546
 *         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_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "netCDF4.pyx":1547
 *             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_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
    __pyx_t_1 = __pyx_t_9; __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_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_9 = __pyx_t_5(__pyx_t_1);
      if (unlikely(!__pyx_t_9)) {
        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 = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "netCDF4.pyx":1546
 *         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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __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_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_attrs = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "netCDF4.pyx":1548
 *         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_2 = PyNumber_Add(__pyx_v_ncdump, __pyx_v_attrs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_ncdump, ((PyObject*)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "netCDF4.pyx":1549
 *                 self.ncattrs()]
 *         ncdump = ncdump + attrs
 *         ncdump.append('    dimensions(sizes): %s\n' % ', '.join(dimnames))             # <<<<<<<<<<<<<<
 *         ncdump.append('    variables(dimensions): %s\n' % ', '.join(varnames))
 *         ncdump.append('    groups: %s\n' % ', '.join(grpnames))
 */
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_dimnames); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_dimensions_sizes_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "netCDF4.pyx":1550
 *         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 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_varnames); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_variables_dimensions_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_2); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":1551
 *         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_2 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_grpnames); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_groups_s_2, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ncdump, __pyx_t_1); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "netCDF4.pyx":1552
 *         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__16, __pyx_v_ncdump); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; __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":1529
 *            return unicode(self).encode(default_encoding)
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         ncdump = ['%r\n' % type(self)]
 *         dimnames = tuple([_tostr(dimname)+'(%s)'%len(self.dimensions[dimname])\
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("netCDF4.Dataset.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ncdump);
  __Pyx_XDECREF(__pyx_v_dimnames);
  __Pyx_XDECREF(__pyx_v_varnames);
  __Pyx_XDECREF(__pyx_v_grpnames);
  __Pyx_XDECREF(__pyx_v_attrs);
  __Pyx_XDECREF(__pyx_v_dimname);
  __Pyx_XDECREF(__pyx_v_varname);
  __Pyx_XDECREF(__pyx_v_grpname);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1554
 *         return ''.join(ncdump)
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 * close(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_12close[] = "\nclose(self)\n\nClose the Dataset.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_12close(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_12close(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_v_ierr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 0);

  /* "netCDF4.pyx":1560
 * Close the Dataset."""
 *         cdef int ierr
 *         ierr = nc_close(self._grpid)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_close(__pyx_v_self->_grpid);

  /* "netCDF4.pyx":1561
 *         cdef int ierr
 *         ierr = nc_close(self._grpid)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         self._isopen = 0 # indicates file already closed, checked by __dealloc__
 */
  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":1562
 *         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 = 1562; __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 = 1562; __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 = 1562; __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 = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1563
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         self._isopen = 0 # indicates file already closed, checked by __dealloc__             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->_isopen = 0;

  /* "netCDF4.pyx":1554
 *         return ''.join(ncdump)
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 * close(self)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("netCDF4.Dataset.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1565
 *         self._isopen = 0 # indicates file already closed, checked by __dealloc__
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # close file when there are no references to object left
 *         cdef int ierr
 */

/* Python wrapper */
static void __pyx_pw_7netCDF4_7Dataset_15__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7netCDF4_7Dataset_15__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_7netCDF4_7Dataset_14__dealloc__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_7netCDF4_7Dataset_14__dealloc__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  CYTHON_UNUSED int __pyx_v_ierr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "netCDF4.pyx":1568
 *         # close file when there are no references to object left
 *         cdef int ierr
 *         if self._isopen:             # <<<<<<<<<<<<<<
 *             ierr = nc_close(self._grpid)
 * 
 */
  __pyx_t_1 = (__pyx_v_self->_isopen != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":1569
 *         cdef int ierr
 *         if self._isopen:
 *             ierr = nc_close(self._grpid)             # <<<<<<<<<<<<<<
 * 
 *     def sync(self):
 */
    __pyx_v_ierr = nc_close(__pyx_v_self->_grpid);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":1565
 *         self._isopen = 0 # indicates file already closed, checked by __dealloc__
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         # close file when there are no references to object left
 *         cdef int ierr
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "netCDF4.pyx":1571
 *             ierr = nc_close(self._grpid)
 * 
 *     def sync(self):             # <<<<<<<<<<<<<<
 *         """
 * sync(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_17sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_16sync[] = "\nsync(self)\n\nWrites all buffered data in the L{Dataset} to the disk file.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_17sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sync (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_16sync(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_16sync(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_v_ierr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sync", 0);

  /* "netCDF4.pyx":1577
 * Writes all buffered data in the L{Dataset} to the disk file."""
 *         cdef int ierr
 *         ierr = nc_sync(self._grpid)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_sync(__pyx_v_self->_grpid);

  /* "netCDF4.pyx":1578
 *         cdef int ierr
 *         ierr = nc_sync(self._grpid)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 */
  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":1579
 *         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 = 1579; __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 = 1579; __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 = 1579; __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 = 1579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1571
 *             ierr = nc_close(self._grpid)
 * 
 *     def sync(self):             # <<<<<<<<<<<<<<
 *         """
 * sync(self)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("netCDF4.Dataset.sync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1581
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def _redef(self):             # <<<<<<<<<<<<<<
 *         cdef int ierr
 *         ierr = nc_redef(self._grpid)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_19_redef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_19_redef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_redef (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_18_redef(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_18_redef(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  CYTHON_UNUSED int __pyx_v_ierr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_redef", 0);

  /* "netCDF4.pyx":1583
 *     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":1581
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def _redef(self):             # <<<<<<<<<<<<<<
 *         cdef int ierr
 *         ierr = nc_redef(self._grpid)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1585
 *         ierr = nc_redef(self._grpid)
 * 
 *     def _enddef(self):             # <<<<<<<<<<<<<<
 *         cdef int ierr
 *         ierr = nc_enddef(self._grpid)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_21_enddef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_21_enddef(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_enddef (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_20_enddef(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_20_enddef(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  CYTHON_UNUSED int __pyx_v_ierr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_enddef", 0);

  /* "netCDF4.pyx":1587
 *     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":1585
 *         ierr = nc_redef(self._grpid)
 * 
 *     def _enddef(self):             # <<<<<<<<<<<<<<
 *         cdef int ierr
 *         ierr = nc_enddef(self._grpid)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1589
 *         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 equal to the \nC{_Fill_Value} indicate that the variable was created, but never written \nto.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_23set_fill_on(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_fill_on (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_22set_fill_on(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_22set_fill_on(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_v_ierr;
  int __pyx_v_oldmode;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_fill_on", 0);

  /* "netCDF4.pyx":1603
 * 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":1604
 *         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":1605
 *         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 = 1605; __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 = 1605; __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 = 1605; __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 = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1589
 *         ierr = nc_enddef(self._grpid)
 * 
 *     def set_fill_on(self):             # <<<<<<<<<<<<<<
 *         """
 * set_fill_on(self)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("netCDF4.Dataset.set_fill_on", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1607
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def set_fill_off(self):             # <<<<<<<<<<<<<<
 *         """
 * set_fill_off(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_25set_fill_off(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_24set_fill_off[] = "\nset_fill_off(self)\n\nSets the fill mode for a L{Dataset} open for writing to C{off}. \n\nThis will prevent the data from being pre-filled with fill values, which \nmay result in some performance improvements. However, you must then make \nsure the data is actually written before being read.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_25set_fill_off(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_fill_off (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_24set_fill_off(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_24set_fill_off(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_v_ierr;
  int __pyx_v_oldmode;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_fill_off", 0);

  /* "netCDF4.pyx":1617
 * 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":1618
 *         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":1619
 *         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 = 1619; __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 = 1619; __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 = 1619; __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 = 1619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1607
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def set_fill_off(self):             # <<<<<<<<<<<<<<
 *         """
 * set_fill_off(self)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("netCDF4.Dataset.set_fill_off", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1621
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def createDimension(self, dimname, size=None):             # <<<<<<<<<<<<<<
 *         """
 * createDimension(self, dimname, size=None)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_27createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_26createDimension[] = "\ncreateDimension(self, dimname, size=None)\n\nCreates a new dimension with the given C{dimname} and C{size}. \n\nC{size} must be a positive integer or C{None}, which stands for \n\"unlimited\" (default is C{None}). Specifying a size of 0 also\nresults in an unlimited dimension. The return value is the L{Dimension} \nclass instance describing the new dimension.  To determine the current \nmaximum size of the dimension, use the C{len} function on the L{Dimension} \ninstance. To determine if a dimension is 'unlimited', use the \nC{isunlimited()} method of the L{Dimension} instance.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_27createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dimname = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("createDimension (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dimname,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dimname)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createDimension") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __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 = 1621; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.Dataset.createDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_26createDimension(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_dimname, __pyx_v_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_26createDimension(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_dimname, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("createDimension", 0);

  /* "netCDF4.pyx":1634
 * 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 = 1634; __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 = 1634; __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 = 1634; __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 = 1634; __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 = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "netCDF4.pyx":1635
 * C{isunlimited()} method of the L{Dimension} instance."""
 *         self.dimensions[dimname] = Dimension(self, dimname, size=size)
 *         return self.dimensions[dimname]             # <<<<<<<<<<<<<<
 * 
 *     def renameDimension(self, oldname, newname):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_dimname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "netCDF4.pyx":1621
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def createDimension(self, dimname, size=None):             # <<<<<<<<<<<<<<
 *         """
 * createDimension(self, dimname, size=None)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("netCDF4.Dataset.createDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1637
 *         return self.dimensions[dimname]
 * 
 *     def renameDimension(self, oldname, newname):             # <<<<<<<<<<<<<<
 *         """
 * renameDimension(self, oldname, newname)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_29renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_28renameDimension[] = "\nrenameDimension(self, oldname, newname)\n\nrename a L{Dimension} named C{oldname} to C{newname}.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_29renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_oldname = 0;
  PyObject *__pyx_v_newname = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("renameDimension (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oldname,&__pyx_n_s_newname,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oldname)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1637; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameDimension") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1637; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_oldname = values[0];
    __pyx_v_newname = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1637; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.Dataset.renameDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_28renameDimension(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_28renameDimension(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) {
  char *__pyx_v_namstring;
  PyObject *__pyx_v_bytestr = NULL;
  PyObject *__pyx_v_dim = NULL;
  int __pyx_v_ierr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  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("renameDimension", 0);

  /* "netCDF4.pyx":1643
 * rename a L{Dimension} named C{oldname} to C{newname}."""
 *         cdef char *namstring
 *         bytestr = _strencode(newname)             # <<<<<<<<<<<<<<
 *         namstring = bytestr
 *         if self.data_model != 'NETCDF4': self._redef()
 */
  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytestr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":1644
 *         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 = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_namstring = __pyx_t_2;

  /* "netCDF4.pyx":1645
 *         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 = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":1646
 *         namstring = bytestr
 *         if self.data_model != 'NETCDF4': self._redef()
 *         try:             # <<<<<<<<<<<<<<
 *             dim = self.dimensions[oldname]
 *         except KeyError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "netCDF4.pyx":1647
 *         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 = PyObject_GetItem(__pyx_v_self->dimensions, __pyx_v_oldname); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L4_error;};
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_dim = __pyx_t_4;
      __pyx_t_4 = 0;
    }
    __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;
    goto __pyx_L11_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "netCDF4.pyx":1648
 *         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_8 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("netCDF4.Dataset.renameDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_9);

      /* "netCDF4.pyx":1649
 *             dim = self.dimensions[oldname]
 *         except KeyError:
 *             raise KeyError('%s not a valid dimension name' % oldname)             # <<<<<<<<<<<<<<
 *         ierr = nc_rename_dim(self._grpid, dim._dimid, namstring)
 *         if self.data_model != 'NETCDF4': self._enddef()
 */
      __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_s_not_a_valid_dimension_name, __pyx_v_oldname); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; __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 = 1649; __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 = 1649; __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 = 1649; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    __pyx_L11_try_end:;
  }

  /* "netCDF4.pyx":1650
 *         except KeyError:
 *             raise KeyError('%s not a valid dimension name' % oldname)
 *         ierr = nc_rename_dim(self._grpid, dim._dimid, namstring)             # <<<<<<<<<<<<<<
 *         if self.data_model != 'NETCDF4': self._enddef()
 *         if ierr != NC_NOERR:
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_dimid); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_ierr = nc_rename_dim(__pyx_v_self->_grpid, __pyx_t_8, __pyx_v_namstring);

  /* "netCDF4.pyx":1651
 *             raise KeyError('%s not a valid dimension name' % oldname)
 *         ierr = nc_rename_dim(self._grpid, dim._dimid, namstring)
 *         if self.data_model != 'NETCDF4': self._enddef()             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_enddef); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; __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_1); __pyx_t_1 = 0;
    goto __pyx_L14;
  }
  __pyx_L14:;

  /* "netCDF4.pyx":1652
 *         ierr = nc_rename_dim(self._grpid, dim._dimid, namstring)
 *         if self.data_model != 'NETCDF4': self._enddef()
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         # remove old key from dimensions dict.
 */
  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":1653
 *         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_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 = 1653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_9, 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_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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 = 1653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1655
 *             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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dimensions, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_v_oldname);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_oldname);
  __Pyx_GIVEREF(__pyx_v_oldname);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "netCDF4.pyx":1657
 *         self.dimensions.pop(oldname)
 *         # add new key.
 *         self.dimensions[newname] = dim             # <<<<<<<<<<<<<<
 *         # Variable.dimensions is determined by a method that
 *         # looks in the file, so no need to manually update.
 */
  if (unlikely(PyObject_SetItem(__pyx_v_self->dimensions, __pyx_v_newname, __pyx_v_dim) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":1637
 *         return self.dimensions[dimname]
 * 
 *     def renameDimension(self, oldname, newname):             # <<<<<<<<<<<<<<
 *         """
 * renameDimension(self, oldname, newname)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("netCDF4.Dataset.renameDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bytestr);
  __Pyx_XDECREF(__pyx_v_dim);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1661
 *         # looks in the file, so no need to manually update.
 * 
 *     def createCompoundType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
 *         """
 * createCompoundType(self, datatype, datatype_name)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_31createCompoundType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_30createCompoundType[] = "\ncreateCompoundType(self, datatype, datatype_name)\n\nCreates a new compound data type named C{datatype_name} from the numpy\ndtype object C{datatype}.\n\n@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{CompoundType} class instance describing the new\ndatatype.";
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 = 1661; __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 = 1661; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_datatype = values[0];
    __pyx_v_datatype_name = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("createCompoundType", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.Dataset.createCompoundType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_30createCompoundType(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_datatype, __pyx_v_datatype_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_30createCompoundType(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("createCompoundType", 0);

  /* "netCDF4.pyx":1675
 * The return value is the L{CompoundType} class instance describing the new
 * datatype."""
 *         self.cmptypes[datatype_name] = CompoundType(self, datatype,\             # <<<<<<<<<<<<<<
 *                 datatype_name)
 *         return self.cmptypes[datatype_name]
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __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 = 1675; __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 = 1675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":1677
 *         self.cmptypes[datatype_name] = CompoundType(self, datatype,\
 *                 datatype_name)
 *         return self.cmptypes[datatype_name]             # <<<<<<<<<<<<<<
 * 
 *     def createVLType(self, datatype, datatype_name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_GetItem(__pyx_v_self->cmptypes, __pyx_v_datatype_name); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; __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":1661
 *         # looks in the file, so no need to manually update.
 * 
 *     def createCompoundType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
 *         """
 * createCompoundType(self, datatype, datatype_name)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("netCDF4.Dataset.createCompoundType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1679
 *         return self.cmptypes[datatype_name]
 * 
 *     def createVLType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
 *         """
 * createVLType(self, datatype, datatype_name)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_33createVLType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_32createVLType[] = "\ncreateVLType(self, datatype, datatype_name)\n\nCreates a new VLEN data type named C{datatype_name} from a numpy\ndtype object C{datatype}.\n\nThe return value is the L{VLType} class instance describing the new\ndatatype.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_33createVLType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_datatype = 0;
  PyObject *__pyx_v_datatype_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("createVLType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datatype,&__pyx_n_s_datatype_name,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("createVLType", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createVLType") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_datatype = values[0];
    __pyx_v_datatype_name = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("createVLType", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.Dataset.createVLType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_32createVLType(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_datatype, __pyx_v_datatype_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_32createVLType(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_datatype, PyObject *__pyx_v_datatype_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("createVLType", 0);

  /* "netCDF4.pyx":1688
 * The return value is the L{VLType} class instance describing the new
 * datatype."""
 *         self.vltypes[datatype_name] = VLType(self, datatype, datatype_name)             # <<<<<<<<<<<<<<
 *         return self.vltypes[datatype_name]
 * 
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __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 = 1688; __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 = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":1689
 * datatype."""
 *         self.vltypes[datatype_name] = VLType(self, datatype, datatype_name)
 *         return self.vltypes[datatype_name]             # <<<<<<<<<<<<<<
 * 
 *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_GetItem(__pyx_v_self->vltypes, __pyx_v_datatype_name); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; __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":1679
 *         return self.cmptypes[datatype_name]
 * 
 *     def createVLType(self, datatype, datatype_name):             # <<<<<<<<<<<<<<
 *         """
 * createVLType(self, datatype, datatype_name)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("netCDF4.Dataset.createVLType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1691
 *         return self.vltypes[datatype_name]
 * 
 *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,             # <<<<<<<<<<<<<<
 *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
 *             chunksizes=None, endian='native', least_significant_digit=None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_35createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_34createVariable[] = "\ncreateVariable(self, varname, datatype, dimensions=(), zlib=False, complevel=4, shuffle=True, fletcher32=False, contiguous=False, chunksizes=None, endian='native', least_significant_digit=None, fill_value=None)\n\nCreates a new variable with the given C{varname}, C{datatype}, and \nC{dimensions}. If dimensions are not given, the variable is assumed to be \na scalar.\n\nThe C{datatype} can be a numpy datatype object, or a string that describes \na numpy dtype object (like the C{dtype.str} attribue of a numpy array). \nSupported specifiers include: C{'S1' or 'c' (NC_CHAR), 'i1' or 'b' or 'B' \n(NC_BYTE), 'u1' (NC_UBYTE), 'i2' or 'h' or 's' (NC_SHORT), 'u2' \n(NC_USHORT), 'i4' or 'i' or 'l' (NC_INT), 'u4' (NC_UINT), 'i8' (NC_INT64), \n'u8' (NC_UINT64), 'f4' or 'f' (NC_FLOAT), 'f8' or 'd' (NC_DOUBLE)}.\nC{datatype} can also be a L{CompoundType} instance\n(for a structured, or compound array), a L{VLType} instance\n(for a variable-length array), or the python C{str} builtin \n(for a variable-length string array). Numpy string and unicode datatypes with\nlength greater than one are aliases for C{str}.\n\nData from netCDF variables is presented to python as numpy arrays with\nthe corresponding data type. \n\nC{dimensions} must be a tuple containing dimension names (strings) that \nhave been defined previously using C{createDimension}. The default value \nis an empty tuple, which means the variable is a scalar.\n\nIf the optional keyword C{zlib} is C{True}, the data will be compressed in \nthe netCDF file using gzip compression (default C{False}).\n\nThe optional keyword C{complevel} is an integer between 1 and 9 describing \nthe level of compression desired (default 4). Ignored if C{zlib=False}.\n\nIf the optional keyword C{shuffle} is C{True}, the HDF5 shuffle filter \nwill be applied before compressing the data (default C{True}).  This \nsignificantly improves compression. Default is C{True}. Ignored if\nC{zlib=False}.\n\nIf the optional keyword C{fletcher32} is C{True""}, the Fletcher32 HDF5 \nchecksum algorithm is activated to detect errors. Default C{False}.\n\nIf the optional keyword C{contiguous} is C{True}, the variable data is \nstored contiguously on disk.  Default C{False}. Setting to C{True} for\na variable with an unlimited dimension will trigger an error.\n\nThe optional keyword C{chunksizes} can be used to manually specify the\nHDF5 chunksizes for each dimension of the variable. A detailed\ndiscussion of HDF chunking and I/O performance is available U{here\n<http://www.hdfgroup.org/HDF5/doc/H5.user/Chunking.html>}. \nBasically, you want the chunk size for each dimension to match as\nclosely as possible the size of the data block that users will read\nfrom the file.  C{chunksizes} cannot be set if C{contiguous=True}.\n\nThe optional keyword C{endian} can be used to control whether the\ndata is stored in little or big endian format on disk. Possible\nvalues are C{little, big} or C{native} (default). The library\nwill automatically handle endian conversions when the data is read,\nbut if the data is always going to be read on a computer with the\nopposite format as the one used to create the file, there may be\nsome performance advantage to be gained by setting the endian-ness.\n\nThe C{zlib, complevel, shuffle, fletcher32, contiguous, chunksizes} and C{endian}\nkeywords are silently ignored for netCDF 3 files that do not use HDF5.\n\nThe optional keyword C{fill_value} can be used to override the default \nnetCDF C{_FillValue} (the value that the variable gets filled with before \nany data is written to it, defaults given in netCDF4.default_fillvals).\nIf fill_value is set to C{False}, then the variable is not pre-filled.\n\nIf the optional keyword parameter C{least_significant_digit} is\nspecified, variable data will be truncated (quantized). In conjunction\nwith C{zlib=True} this produces 'lossy', but significantly more\nefficient compression. For example, if C{least_significant_digit=1},\ndata will be quantized using C""{numpy.around(scale*data)/scale}, where\nscale = 2**bits, and bits is determined so that a precision of 0.1 is\nretained (in this case bits=4). From\nU{http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml}:\n\"least_significant_digit -- power of ten of the smallest decimal place\nin unpacked data that is a reliable value.\" Default is C{None}, or no\nquantization, or 'lossless' compression.\n\nWhen creating variables in a C{NETCDF4} or C{NETCDF4_CLASSIC} formatted file, \nHDF5 creates something called a 'chunk cache' for each variable.  The\ndefault size of the chunk cache may be large enough to completely fill \navailable memory when creating thousands of variables.  The optional\nkeyword C{chunk_cache} allows you to reduce (or increase) the size of\nthe default chunk cache when creating a variable.  The setting only\npersists as long as the Dataset is open - you can use the set_var_chunk_cache\nmethod to change it the next time the Dataset is opened.\nWarning - messing with this parameter can seriously degrade performance.\n\nThe return value is the L{Variable} class instance describing the new \nvariable.\n\nA list of names corresponding to netCDF variable attributes can be \nobtained with the L{Variable} method C{ncattrs()}. A dictionary\ncontaining all the netCDF attribute name/value pairs is provided by\nthe C{__dict__} attribute of a L{Variable} instance.\n\nL{Variable} instances behave much like array objects. Data can be\nassigned to or retrieved from a variable with indexing and slicing\noperations on the L{Variable} instance. A L{Variable} instance has five\nDataset standard attributes: C{dimensions, dtype, shape, ndim} and\nC{least_significant_digit}. Application programs should never modify\nthese attributes. The C{dimensions} attribute is a tuple containing the\nnames of the dimensions associated with this variable. The C{dtype}\nattribute is a string describing the variable's data type (C{i4, f8,\nS1,} etc). The C{shape} attribute is a tu""ple describing the current\nsizes of all the variable's dimensions. The C{least_significant_digit}\nattributes describes the power of ten of the smallest decimal place in\nthe data the contains a reliable value.  assigned to the L{Variable}\ninstance. If C{None}, the data is not truncated. The C{ndim} attribute\nis the number of variable dimensions.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_35createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_varname = 0;
  PyObject *__pyx_v_datatype = 0;
  PyObject *__pyx_v_dimensions = 0;
  PyObject *__pyx_v_zlib = 0;
  PyObject *__pyx_v_complevel = 0;
  PyObject *__pyx_v_shuffle = 0;
  PyObject *__pyx_v_fletcher32 = 0;
  PyObject *__pyx_v_contiguous = 0;
  PyObject *__pyx_v_chunksizes = 0;
  PyObject *__pyx_v_endian = 0;
  PyObject *__pyx_v_least_significant_digit = 0;
  PyObject *__pyx_v_fill_value = 0;
  PyObject *__pyx_v_chunk_cache = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("createVariable (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_varname,&__pyx_n_s_datatype,&__pyx_n_s_dimensions,&__pyx_n_s_zlib,&__pyx_n_s_complevel,&__pyx_n_s_shuffle,&__pyx_n_s_fletcher32,&__pyx_n_s_contiguous,&__pyx_n_s_chunksizes,&__pyx_n_s_endian,&__pyx_n_s_least_significant_digit,&__pyx_n_s_fill_value,&__pyx_n_s_chunk_cache,0};
    PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
    values[2] = ((PyObject *)__pyx_empty_tuple);
    values[3] = ((PyObject *)Py_False);
    values[4] = ((PyObject *)__pyx_int_4);

    /* "netCDF4.pyx":1692
 * 
 *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,
 *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,             # <<<<<<<<<<<<<<
 *             chunksizes=None, endian='native', least_significant_digit=None,
 *             fill_value=None, chunk_cache=None):
 */
    values[5] = ((PyObject *)Py_True);
    values[6] = ((PyObject *)Py_False);
    values[7] = ((PyObject *)Py_False);

    /* "netCDF4.pyx":1693
 *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,
 *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
 *             chunksizes=None, endian='native', least_significant_digit=None,             # <<<<<<<<<<<<<<
 *             fill_value=None, chunk_cache=None):
 *         """
 */
    values[8] = ((PyObject *)Py_None);
    values[9] = ((PyObject *)__pyx_n_s_native);
    values[10] = ((PyObject *)Py_None);

    /* "netCDF4.pyx":1694
 *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
 *             chunksizes=None, endian='native', least_significant_digit=None,
 *             fill_value=None, chunk_cache=None):             # <<<<<<<<<<<<<<
 *         """
 * createVariable(self, varname, datatype, dimensions=(), zlib=False, complevel=4, shuffle=True, fletcher32=False, contiguous=False, chunksizes=None, endian='native', least_significant_digit=None, fill_value=None)
 */
    values[11] = ((PyObject *)Py_None);
    values[12] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_varname)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_datatype)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("createVariable", 0, 2, 13, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __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 = 1691; __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 = 1691; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.Dataset.createVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_34createVariable(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_varname, __pyx_v_datatype, __pyx_v_dimensions, __pyx_v_zlib, __pyx_v_complevel, __pyx_v_shuffle, __pyx_v_fletcher32, __pyx_v_contiguous, __pyx_v_chunksizes, __pyx_v_endian, __pyx_v_least_significant_digit, __pyx_v_fill_value, __pyx_v_chunk_cache);

  /* "netCDF4.pyx":1691
 *         return self.vltypes[datatype_name]
 * 
 *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,             # <<<<<<<<<<<<<<
 *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
 *             chunksizes=None, endian='native', least_significant_digit=None,
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_34createVariable(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_varname, PyObject *__pyx_v_datatype, PyObject *__pyx_v_dimensions, PyObject *__pyx_v_zlib, PyObject *__pyx_v_complevel, PyObject *__pyx_v_shuffle, PyObject *__pyx_v_fletcher32, PyObject *__pyx_v_contiguous, PyObject *__pyx_v_chunksizes, PyObject *__pyx_v_endian, PyObject *__pyx_v_least_significant_digit, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_chunk_cache) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("createVariable", 0);

  /* "netCDF4.pyx":1807
 * instance. If C{None}, the data is not truncated. The C{ndim} attribute
 * is the number of variable dimensions."""
 *         self.variables[varname] = Variable(self, varname, datatype,             # <<<<<<<<<<<<<<
 *         dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,
 *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __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 = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "netCDF4.pyx":1808
 * is the number of variable dimensions."""
 *         self.variables[varname] = Variable(self, varname, datatype,
 *         dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,             # <<<<<<<<<<<<<<
 *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
 *         endian=endian, least_significant_digit=least_significant_digit,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dimensions, __pyx_v_dimensions) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __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 = 1807; __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 = 1807; __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 = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":1809
 *         self.variables[varname] = Variable(self, varname, datatype,
 *         dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,
 *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,             # <<<<<<<<<<<<<<
 *         endian=endian, least_significant_digit=least_significant_digit,
 *         fill_value=fill_value, chunk_cache=chunk_cache)
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fletcher32, __pyx_v_fletcher32) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __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 = 1807; __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 = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":1810
 *         dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,
 *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
 *         endian=endian, least_significant_digit=least_significant_digit,             # <<<<<<<<<<<<<<
 *         fill_value=fill_value, chunk_cache=chunk_cache)
 *         return self.variables[varname]
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_endian, __pyx_v_endian) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __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 = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":1811
 *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
 *         endian=endian, least_significant_digit=least_significant_digit,
 *         fill_value=fill_value, chunk_cache=chunk_cache)             # <<<<<<<<<<<<<<
 *         return self.variables[varname]
 * 
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __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 = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":1807
 * instance. If C{None}, the data is not truncated. The C{ndim} attribute
 * is the number of variable dimensions."""
 *         self.variables[varname] = Variable(self, varname, datatype,             # <<<<<<<<<<<<<<
 *         dimensions=dimensions, zlib=zlib, complevel=complevel, shuffle=shuffle,
 *         fletcher32=fletcher32, contiguous=contiguous, chunksizes=chunksizes,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Variable)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; __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 = 1807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "netCDF4.pyx":1812
 *         endian=endian, least_significant_digit=least_significant_digit,
 *         fill_value=fill_value, chunk_cache=chunk_cache)
 *         return self.variables[varname]             # <<<<<<<<<<<<<<
 * 
 *     def renameVariable(self, oldname, newname):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_varname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "netCDF4.pyx":1691
 *         return self.vltypes[datatype_name]
 * 
 *     def createVariable(self, varname, datatype, dimensions=(), zlib=False,             # <<<<<<<<<<<<<<
 *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
 *             chunksizes=None, endian='native', least_significant_digit=None,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("netCDF4.Dataset.createVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1814
 *         return self.variables[varname]
 * 
 *     def renameVariable(self, oldname, newname):             # <<<<<<<<<<<<<<
 *         """
 * renameVariable(self, oldname, newname)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_37renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_36renameVariable[] = "\nrenameVariable(self, oldname, newname)\n\nrename a L{Variable} named C{oldname} to C{newname}";
static PyObject *__pyx_pw_7netCDF4_7Dataset_37renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_oldname = 0;
  PyObject *__pyx_v_newname = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("renameVariable (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oldname,&__pyx_n_s_newname,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oldname)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("renameVariable", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __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 = 1814; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_oldname = values[0];
    __pyx_v_newname = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("renameVariable", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.Dataset.renameVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_36renameVariable(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_36renameVariable(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) {
  char *__pyx_v_namstring;
  PyObject *__pyx_v_var = NULL;
  PyObject *__pyx_v_bytestr = NULL;
  int __pyx_v_ierr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  char *__pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("renameVariable", 0);

  /* "netCDF4.pyx":1820
 * rename a L{Variable} named C{oldname} to C{newname}"""
 *         cdef char *namstring
 *         try:             # <<<<<<<<<<<<<<
 *             var = self.variables[oldname]
 *         except KeyError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "netCDF4.pyx":1821
 *         cdef char *namstring
 *         try:
 *             var = self.variables[oldname]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             raise KeyError('%s not a valid variable name' % oldname)
 */
      __pyx_t_4 = PyObject_GetItem(__pyx_v_self->variables, __pyx_v_oldname); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L3_error;};
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_var = __pyx_t_4;
      __pyx_t_4 = 0;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "netCDF4.pyx":1822
 *         try:
 *             var = self.variables[oldname]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             raise KeyError('%s not a valid variable name' % oldname)
 *         bytestr = _strencode(newname)
 */
    __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("netCDF4.Dataset.renameVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "netCDF4.pyx":1823
 *             var = self.variables[oldname]
 *         except KeyError:
 *             raise KeyError('%s not a valid variable name' % oldname)             # <<<<<<<<<<<<<<
 *         bytestr = _strencode(newname)
 *         namstring = bytestr
 */
      __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_not_a_valid_variable_name, __pyx_v_oldname); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __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 = 1823; __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 = 1823; __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 = 1823; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    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_L4_exception_handled:;
    __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);
    __pyx_L10_try_end:;
  }

  /* "netCDF4.pyx":1824
 *         except KeyError:
 *             raise KeyError('%s not a valid variable name' % oldname)
 *         bytestr = _strencode(newname)             # <<<<<<<<<<<<<<
 *         namstring = bytestr
 *         if self.data_model != 'NETCDF4': self._redef()
 */
  __pyx_t_7 = __pyx_f_7netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_bytestr = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "netCDF4.pyx":1825
 *             raise KeyError('%s not a valid variable name' % oldname)
 *         bytestr = _strencode(newname)
 *         namstring = bytestr             # <<<<<<<<<<<<<<
 *         if self.data_model != 'NETCDF4': self._redef()
 *         ierr = nc_rename_var(self._grpid, var._varid, namstring)
 */
  __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_namstring = __pyx_t_10;

  /* "netCDF4.pyx":1826
 *         bytestr = _strencode(newname)
 *         namstring = bytestr
 *         if self.data_model != 'NETCDF4': self._redef()             # <<<<<<<<<<<<<<
 *         ierr = nc_rename_var(self._grpid, var._varid, namstring)
 *         if self.data_model != 'NETCDF4': self._enddef()
 */
  __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_11) {
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1826; __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_6); __pyx_t_6 = 0;
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "netCDF4.pyx":1827
 *         namstring = bytestr
 *         if self.data_model != 'NETCDF4': self._redef()
 *         ierr = nc_rename_var(self._grpid, var._varid, namstring)             # <<<<<<<<<<<<<<
 *         if self.data_model != 'NETCDF4': self._enddef()
 *         if ierr != NC_NOERR:
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_varid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_ierr = nc_rename_var(__pyx_v_self->_grpid, __pyx_t_5, __pyx_v_namstring);

  /* "netCDF4.pyx":1828
 *         if self.data_model != 'NETCDF4': self._redef()
 *         ierr = nc_rename_var(self._grpid, var._varid, namstring)
 *         if self.data_model != 'NETCDF4': self._enddef()             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __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 = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L14;
  }
  __pyx_L14:;

  /* "netCDF4.pyx":1829
 *         ierr = nc_rename_var(self._grpid, var._varid, namstring)
 *         if self.data_model != 'NETCDF4': self._enddef()
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         # remove old key from dimensions dict.
 */
  __pyx_t_11 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_11) {

    /* "netCDF4.pyx":1830
 *         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 = 1830; __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 = 1830; __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 = 1830; __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 = 1830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1832
 *             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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_pop); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_oldname);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_oldname);
  __Pyx_GIVEREF(__pyx_v_oldname);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1832; __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_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "netCDF4.pyx":1834
 *         self.variables.pop(oldname)
 *         # add new key.
 *         self.variables[newname] = var             # <<<<<<<<<<<<<<
 * 
 *     def createGroup(self, groupname):
 */
  if (unlikely(PyObject_SetItem(__pyx_v_self->variables, __pyx_v_newname, __pyx_v_var) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":1814
 *         return self.variables[varname]
 * 
 *     def renameVariable(self, oldname, newname):             # <<<<<<<<<<<<<<
 *         """
 * renameVariable(self, oldname, newname)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("netCDF4.Dataset.renameVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_var);
  __Pyx_XDECREF(__pyx_v_bytestr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1836
 *         self.variables[newname] = var
 * 
 *     def createGroup(self, groupname):             # <<<<<<<<<<<<<<
 *         """
 * createGroup(self, groupname)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_39createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_38createGroup[] = "\ncreateGroup(self, groupname)\n\nCreates a new L{Group} with the given C{groupname}.\n\nThe return value is a L{Group} class instance describing the new group.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_39createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("createGroup (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_38createGroup(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_groupname));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_38createGroup(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_groupname) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("createGroup", 0);

  /* "netCDF4.pyx":1843
 * 
 * The return value is a L{Group} class instance describing the new group."""
 *         self.groups[groupname] = Group(self, groupname)             # <<<<<<<<<<<<<<
 *         return self.groups[groupname]
 * 
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __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 = 1843; __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 = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":1844
 * The return value is a L{Group} class instance describing the new group."""
 *         self.groups[groupname] = Group(self, groupname)
 *         return self.groups[groupname]             # <<<<<<<<<<<<<<
 * 
 *     def ncattrs(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_GetItem(__pyx_v_self->groups, __pyx_v_groupname); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1844; __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":1836
 *         self.variables[newname] = var
 * 
 *     def createGroup(self, groupname):             # <<<<<<<<<<<<<<
 *         """
 * createGroup(self, groupname)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("netCDF4.Dataset.createGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1846
 *         return self.groups[groupname]
 * 
 *     def ncattrs(self):             # <<<<<<<<<<<<<<
 *         """
 * ncattrs(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_41ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_40ncattrs[] = "\nncattrs(self)\n\nreturn netCDF global attribute names for this L{Dataset} or L{Group} in a list.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_41ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ncattrs (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_40ncattrs(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_40ncattrs(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ncattrs", 0);

  /* "netCDF4.pyx":1851
 * 
 * return netCDF global attribute names for this L{Dataset} or L{Group} in a list."""
 *         return _get_att_names(self._grpid, NC_GLOBAL)             # <<<<<<<<<<<<<<
 * 
 *     def setncattr(self,name,value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7netCDF4__get_att_names(__pyx_v_self->_grpid, NC_GLOBAL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; __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":1846
 *         return self.groups[groupname]
 * 
 *     def ncattrs(self):             # <<<<<<<<<<<<<<
 *         """
 * ncattrs(self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Dataset.ncattrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1853
 *         return _get_att_names(self._grpid, NC_GLOBAL)
 * 
 *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
 *         """
 * setncattr(self,name,value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_43setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_42setncattr[] = "\nsetncattr(self,name,value)\n\nset a netCDF dataset or group attribute using name,value pair.  Only use if you need to set a\nnetCDF attribute with the same name as one of the reserved python\nattributes.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_43setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setncattr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setncattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __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 = 1853; __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 = 1853; __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setncattr", 0);

  /* "netCDF4.pyx":1860
 * 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 = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __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_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":1861
 * attributes."""
 *         if self.data_model != 'NETCDF4': self._redef()
 *         _set_att(self, NC_GLOBAL, name, value)             # <<<<<<<<<<<<<<
 *         if self.data_model !=  'NETCDF4': self._enddef()
 * 
 */
  __pyx_t_3 = __pyx_f_7netCDF4__set_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "netCDF4.pyx":1862
 *         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 = 1862; __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 = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "netCDF4.pyx":1853
 *         return _get_att_names(self._grpid, NC_GLOBAL)
 * 
 *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
 *         """
 * setncattr(self,name,value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("netCDF4.Dataset.setncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1864
 *         if self.data_model !=  'NETCDF4': self._enddef()
 * 
 *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
 *         """
 * setncatts(self,attdict)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_45setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_44setncatts[] = "\nsetncatts(self,attdict)\n\nset a bunch of netCDF dataset or group attributes at once using a python dictionary. \nThis may be faster when setting a lot of attributes for a NETCDF3 \nformatted file, since nc_redef/nc_enddef is not called in between setting\neach attribute";
static PyObject *__pyx_pw_7netCDF4_7Dataset_45setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setncatts (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_44setncatts(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_attdict));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_44setncatts(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_attdict) {
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  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;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setncatts", 0);

  /* "netCDF4.pyx":1872
 * 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 = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __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_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":1873
 * 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 = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __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[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __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[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __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 = 1873; __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_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __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 = 1873; __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_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      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 = 1873; __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 = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "netCDF4.pyx":1874
 *         if self.data_model != 'NETCDF4': self._redef()
 *         for name, value in attdict.items():
 *             _set_att(self, NC_GLOBAL, name, value)             # <<<<<<<<<<<<<<
 *         if self.data_model != 'NETCDF4': self._enddef()
 * 
 */
    __pyx_t_2 = __pyx_f_7netCDF4__set_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "netCDF4.pyx":1875
 *         for name, value in attdict.items():
 *             _set_att(self, NC_GLOBAL, name, value)
 *         if self.data_model != 'NETCDF4': self._enddef()             # <<<<<<<<<<<<<<
 * 
 *     def getncattr(self,name):
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1875; __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 = 1875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1875; __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_L8;
  }
  __pyx_L8:;

  /* "netCDF4.pyx":1864
 *         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_6);
  __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":1877
 *         if self.data_model != 'NETCDF4': self._enddef()
 * 
 *     def getncattr(self,name):             # <<<<<<<<<<<<<<
 *         """
 * getncattr(self,name)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_47getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_46getncattr[] = "\ngetncattr(self,name)\n\nretrievel a netCDF dataset or group attribute.  Only use if you need to set a\nnetCDF attribute with the same name as one of the reserved python\nattributes.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_47getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getncattr (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_46getncattr(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_46getncattr(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getncattr", 0);

  /* "netCDF4.pyx":1884
 * netCDF attribute with the same name as one of the reserved python
 * attributes."""
 *         return _get_att(self, NC_GLOBAL, name)             # <<<<<<<<<<<<<<
 * 
 *     def __delattr__(self,name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7netCDF4__get_att(((PyObject *)__pyx_v_self), NC_GLOBAL, __pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1884; __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":1877
 *         if self.data_model != 'NETCDF4': self._enddef()
 * 
 *     def getncattr(self,name):             # <<<<<<<<<<<<<<
 *         """
 * getncattr(self,name)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Dataset.getncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1886
 *         return _get_att(self, NC_GLOBAL, name)
 * 
 *     def __delattr__(self,name):             # <<<<<<<<<<<<<<
 *         # if it's a netCDF attribute, remove it
 *         if name not in _private_atts:
 */

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_49__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_49__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_48__delattr__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_48__delattr__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__delattr__", 0);

  /* "netCDF4.pyx":1888
 *     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 = 1888; __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 = 1888; __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":1889
 *         # if it's a netCDF attribute, remove it
 *         if name not in _private_atts:
 *             self.delncattr(name)             # <<<<<<<<<<<<<<
 *         else:
 *             raise AttributeError(
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delncattr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __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 = 1889; __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);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "netCDF4.pyx":1892
 *         else:
 *             raise AttributeError(
 *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))             # <<<<<<<<<<<<<<
 * 
 *     def delncattr(self, name):
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1892; __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 = 1892; __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(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1892; __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 = 1892; __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_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "netCDF4.pyx":1891
 *             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_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __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_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __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 = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "netCDF4.pyx":1886
 *         return _get_att(self, NC_GLOBAL, name)
 * 
 *     def __delattr__(self,name):             # <<<<<<<<<<<<<<
 *         # if it's a netCDF attribute, remove it
 *         if name not in _private_atts:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("netCDF4.Dataset.__delattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1894
 *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
 * 
 *     def delncattr(self, name):             # <<<<<<<<<<<<<<
 *         """
 * delncattr(self,name,value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_51delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_50delncattr[] = "\ndelncattr(self,name,value)\n\ndelete a netCDF dataset or group attribute.  Only use if you need to delete a\nnetCDF attribute with the same name as one of the reserved python\nattributes.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_51delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("delncattr (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_50delncattr(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_50delncattr(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) {
  char *__pyx_v_attname;
  int __pyx_v_ierr;
  PyObject *__pyx_v_bytestr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("delncattr", 0);

  /* "netCDF4.pyx":1903
 *         cdef char *attname
 *         cdef int ierr
 *         bytestr = _strencode(name)             # <<<<<<<<<<<<<<
 *         attname = bytestr
 *         if self.data_model != 'NETCDF4': self._redef()
 */
  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytestr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":1904
 *         cdef int ierr
 *         bytestr = _strencode(name)
 *         attname = bytestr             # <<<<<<<<<<<<<<
 *         if self.data_model != 'NETCDF4': self._redef()
 *         ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)
 */
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_attname = __pyx_t_2;

  /* "netCDF4.pyx":1905
 *         bytestr = _strencode(name)
 *         attname = bytestr
 *         if self.data_model != 'NETCDF4': self._redef()             # <<<<<<<<<<<<<<
 *         ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)
 *         if self.data_model != 'NETCDF4': self._enddef()
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redef); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1905; __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_4); __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":1906
 *         attname = bytestr
 *         if self.data_model != 'NETCDF4': self._redef()
 *         ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)             # <<<<<<<<<<<<<<
 *         if self.data_model != 'NETCDF4': self._enddef()
 *         if ierr != NC_NOERR:
 */
  __pyx_v_ierr = nc_del_att(__pyx_v_self->_grpid, NC_GLOBAL, __pyx_v_attname);

  /* "netCDF4.pyx":1907
 *         if self.data_model != 'NETCDF4': self._redef()
 *         ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)
 *         if self.data_model != 'NETCDF4': self._enddef()             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->data_model, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __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 = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __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":1908
 *         ierr = nc_del_att(self._grpid, NC_GLOBAL, attname)
 *         if self.data_model != 'NETCDF4': self._enddef()
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 */
  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":1909
 *         if self.data_model != 'NETCDF4': self._enddef()
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 * 
 *     def __setattr__(self,name,value):
 */
    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __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 = 1909; __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 = 1909; __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 = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1894
 *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
 * 
 *     def delncattr(self, name):             # <<<<<<<<<<<<<<
 *         """
 * delncattr(self,name,value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_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":1911
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def __setattr__(self,name,value):             # <<<<<<<<<<<<<<
 *         # if name in _private_atts, it is stored at the python
 *         # level and not in the netCDF file.
 */

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_53__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_53__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_52__setattr__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_52__setattr__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setattr__", 0);

  /* "netCDF4.pyx":1914
 *         # if name in _private_atts, it is stored at the python
 *         # level and not in the netCDF file.
 *         if name not in _private_atts:             # <<<<<<<<<<<<<<
 *             self.setncattr(name, value)
 *         elif not name.endswith('__'):
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 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) {

    /* "netCDF4.pyx":1915
 *         # 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_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setncattr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L3;
  }

  /* "netCDF4.pyx":1916
 *         if name not in _private_atts:
 *             self.setncattr(name, value)
 *         elif not name.endswith('__'):             # <<<<<<<<<<<<<<
 *             if hasattr(self,name):
 *                 raise AttributeError(
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __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_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __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":1917
 *             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 = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "netCDF4.pyx":1919
 *             if hasattr(self,name):
 *                 raise AttributeError(
 *             "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))             # <<<<<<<<<<<<<<
 *             else:
 *                 self.__dict__[name]=value
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1919; __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(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1919; __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 = 1919; __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 = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "netCDF4.pyx":1918
 *         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 = 1918; __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 = 1918; __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 = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    /*else*/ {

      /* "netCDF4.pyx":1921
 *             "'%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 = 1921; __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 = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":1911
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def __setattr__(self,name,value):             # <<<<<<<<<<<<<<
 *         # if name in _private_atts, it is stored at the python
 *         # level and not in the netCDF file.
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("netCDF4.Dataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1923
 *                 self.__dict__[name]=value
 * 
 *     def __getattr__(self,name):             # <<<<<<<<<<<<<<
 *         # if name in _private_atts, it is stored at the python
 *         # level and not in the netCDF file.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_55__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_55__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_54__getattr__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_54__getattr__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_names = NULL;
  PyObject *__pyx_v_values = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);
  __Pyx_INCREF(__pyx_v_name);

  /* "netCDF4.pyx":1926
 *         # 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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __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 = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __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 = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_3;
  }
  if (__pyx_t_5) {

    /* "netCDF4.pyx":1928
 *         if name.startswith('__') and name.endswith('__'):
 *             # if __dict__ requested, return a dict with netCDF attributes.
 *             if name == '__dict__':             # <<<<<<<<<<<<<<
 *                 names = self.ncattrs()
 *                 values = []
 */
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dict, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_5) {

      /* "netCDF4.pyx":1929
 *             # if __dict__ requested, return a dict with netCDF attributes.
 *             if name == '__dict__':
 *                 names = self.ncattrs()             # <<<<<<<<<<<<<<
 *                 values = []
 *                 for name in names:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); 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_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_names = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "netCDF4.pyx":1930
 *             if name == '__dict__':
 *                 names = self.ncattrs()
 *                 values = []             # <<<<<<<<<<<<<<
 *                 for name in names:
 *                     values.append(_get_att(self, NC_GLOBAL, name))
 */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __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":1931
 *                 names = self.ncattrs()
 *                 values = []
 *                 for name in names:             # <<<<<<<<<<<<<<
 *                     values.append(_get_att(self, NC_GLOBAL, name))
 *                 return OrderedDict(zip(names,values))
 */
      if (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 = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext;
      }
      for (;;) {
        if (!__pyx_t_7 && 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 = 1931; __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 = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_2)) {
          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 = 1931; __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 = 1931; __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 = 1931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "netCDF4.pyx":1932
 *                 values = []
 *                 for name in names:
 *                     values.append(_get_att(self, NC_GLOBAL, name))             # <<<<<<<<<<<<<<
 *                 return OrderedDict(zip(names,values))
 *             else:
 */
        __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 = 1932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; __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":1933
 *                 for name in names:
 *                     values.append(_get_att(self, NC_GLOBAL, name))
 *                 return OrderedDict(zip(names,values))             # <<<<<<<<<<<<<<
 *             else:
 *                 raise AttributeError
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); 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_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_names);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_names);
      __Pyx_GIVEREF(__pyx_v_names);
      __Pyx_INCREF(__pyx_v_values);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_values);
      __Pyx_GIVEREF(__pyx_v_values);
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __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_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __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 = 0;
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; __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_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "netCDF4.pyx":1935
 *                 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 = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }

  /* "netCDF4.pyx":1936
 *             else:
 *                 raise AttributeError
 *         elif name in _private_atts:             # <<<<<<<<<<<<<<
 *             return self.__dict__[name]
 *         else:
 */
  __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_t_10, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_3 = (__pyx_t_5 != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":1937
 *                 raise AttributeError
 *         elif name in _private_atts:
 *             return self.__dict__[name]             # <<<<<<<<<<<<<<
 *         else:
 *             return self.getncattr(name)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = PyObject_GetItem(__pyx_t_10, __pyx_v_name); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_9;
    __pyx_t_9 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "netCDF4.pyx":1939
 *             return self.__dict__[name]
 *         else:
 *             return self.getncattr(name)             # <<<<<<<<<<<<<<
 * 
 *     def renameAttribute(self, oldname, newname):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __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);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":1923
 *                 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __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":1941
 *             return self.getncattr(name)
 * 
 *     def renameAttribute(self, oldname, newname):             # <<<<<<<<<<<<<<
 *         """
 * renameAttribute(self, oldname, newname)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_57renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_56renameAttribute[] = "\nrenameAttribute(self, oldname, newname)\n\nrename a L{Dataset} or L{Group} attribute named C{oldname} to C{newname}.";
static PyObject *__pyx_pw_7netCDF4_7Dataset_57renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_oldname = 0;
  PyObject *__pyx_v_newname = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("renameAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oldname,&__pyx_n_s_newname,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oldname)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __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 = 1941; __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 = 1941; __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":1949
 *         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 = 1949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytestr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":1950
 *         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 = 1950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_oldnamec = __pyx_t_2;

  /* "netCDF4.pyx":1951
 *         bytestr = _strencode(oldname)
 *         oldnamec = bytestr
 *         bytestr = _strencode(newname)             # <<<<<<<<<<<<<<
 *         newnamec = bytestr
 *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
 */
  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_newname, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __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":1952
 *         oldnamec = bytestr
 *         bytestr = _strencode(newname)
 *         newnamec = bytestr             # <<<<<<<<<<<<<<
 *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
 *         if ierr != NC_NOERR:
 */
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newnamec = __pyx_t_2;

  /* "netCDF4.pyx":1953
 *         bytestr = _strencode(newname)
 *         newnamec = bytestr
 *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_rename_att(__pyx_v_self->_grpid, NC_GLOBAL, __pyx_v_oldnamec, __pyx_v_newnamec);

  /* "netCDF4.pyx":1954
 *         newnamec = bytestr
 *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 */
  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":1955
 *         ierr = nc_rename_att(self._grpid, NC_GLOBAL, oldnamec, newnamec)
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 * 
 *     def renameGroup(self, oldname, newname):
 */
    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __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 = 1955; __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 = 1955; __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 = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":1941
 *             return self.getncattr(name)
 * 
 *     def renameAttribute(self, oldname, newname):             # <<<<<<<<<<<<<<
 *         """
 * renameAttribute(self, oldname, newname)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("netCDF4.Dataset.renameAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bytestr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1957
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def renameGroup(self, oldname, newname):             # <<<<<<<<<<<<<<
 *         """
 * renameGroup(self, oldname, newname)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_59renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_58renameGroup[] = "\nrenameGroup(self, oldname, newname)\n\nrename a L{Group} named C{oldname} to C{newname} (requires netcdf >= 4.3.1).";
static PyObject *__pyx_pw_7netCDF4_7Dataset_59renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_oldname = 0;
  CYTHON_UNUSED PyObject *__pyx_v_newname = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("renameGroup (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oldname,&__pyx_n_s_newname,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oldname)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("renameGroup", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __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 = 1957; __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 = 1957; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.Dataset.renameGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_58renameGroup(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_58renameGroup(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_oldname, CYTHON_UNUSED PyObject *__pyx_v_newname) {
  PyObject *__pyx_v_msg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("renameGroup", 0);

  /* "netCDF4.pyx":1979
 *             self.groups[newname] = grp
 *         ELSE:
 *             msg = """             # <<<<<<<<<<<<<<
 * renameGroup method not enabled.  To enable, install Cython, make sure you have
 * version 4.3.1 or higher of the netcdf C lib, and rebuild netcdf4-python."""
 */
  __Pyx_INCREF(__pyx_kp_s_renameGroup_method_not_enabled);
  __pyx_v_msg = __pyx_kp_s_renameGroup_method_not_enabled;

  /* "netCDF4.pyx":1982
 * renameGroup method not enabled.  To enable, install Cython, make sure you have
 * version 4.3.1 or higher of the netcdf C lib, and rebuild netcdf4-python."""
 *             raise ValueError(msg)             # <<<<<<<<<<<<<<
 * 
 *     def set_auto_maskandscale(self, value):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __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 = 1982; __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 = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":1957
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def renameGroup(self, oldname, newname):             # <<<<<<<<<<<<<<
 *         """
 * renameGroup(self, oldname, newname)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("netCDF4.Dataset.renameGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1984
 *             raise ValueError(msg)
 * 
 *     def set_auto_maskandscale(self, value):             # <<<<<<<<<<<<<<
 *         """
 * set_auto_maskandscale(self, True_or_False)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_61set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_60set_auto_maskandscale[] = "\nset_auto_maskandscale(self, True_or_False)\n\nCall L{set_auto_maskandscale} for all variables contained in this L{Dataset} or\nL{Group}, as well as for all variables in all its subgroups.\n\nB{Parameters}:\n\nB{C{True_or_False}} - Boolean determining if automatic conversion to masked arrays\nand variable scaling shall be applied for all variables.\n\nB{Notes}:\n\nCalling this function only affects existing variables. Variables created\nafter calling this function will follow the default behaviour.\n        ";
static PyObject *__pyx_pw_7netCDF4_7Dataset_61set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_auto_maskandscale (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_60set_auto_maskandscale(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_60set_auto_maskandscale(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_var = NULL;
  PyObject *__pyx_v_groups = NULL;
  PyObject *__pyx_v_group = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_auto_maskandscale", 0);

  /* "netCDF4.pyx":2002
 *         """
 * 
 *         for var in self.variables.values():             # <<<<<<<<<<<<<<
 *             var.set_auto_maskandscale(value)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__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 = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "netCDF4.pyx":2003
 * 
 *         for var in self.variables.values():
 *             var.set_auto_maskandscale(value)             # <<<<<<<<<<<<<<
 * 
 *         for groups in _walk_grps(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2003; __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 = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "netCDF4.pyx":2005
 *             var.set_auto_maskandscale(value)
 * 
 *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
 *             for group in groups:
 *                 for var in group.variables.values():
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __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 = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __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;
  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = Py_TYPE(__pyx_t_6)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_6)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_6)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_6);
      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 = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "netCDF4.pyx":2006
 * 
 *         for groups in _walk_grps(self):
 *             for group in groups:             # <<<<<<<<<<<<<<
 *                 for var in group.variables.values():
 *                     var.set_auto_maskandscale(value)
 */
    if (PyList_CheckExact(__pyx_v_groups) || PyTuple_CheckExact(__pyx_v_groups)) {
      __pyx_t_5 = __pyx_v_groups; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_5)) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_5)) {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_1 = __pyx_t_8(__pyx_t_5);
        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 = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "netCDF4.pyx":2007
 *         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_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); 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_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); 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_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_2)) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_2)) {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_1 = __pyx_t_10(__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 = 2007; __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":2008
 *             for group in groups:
 *                 for var in group.variables.values():
 *                     var.set_auto_maskandscale(value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_maskandscale); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2008; __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_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "netCDF4.pyx":1984
 *             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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __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":2011
 * 
 * 
 *     def set_auto_mask(self, value):             # <<<<<<<<<<<<<<
 *         """
 * set_auto_mask(self, True_or_False)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_63set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_62set_auto_mask[] = "\nset_auto_mask(self, True_or_False)\n\nCall L{set_auto_mask} for all variables contained in this L{Dataset} or\nL{Group}, as well as for all variables in all its subgroups.\n\nB{Parameters}:\n\nB{C{True_or_False}} - Boolean determining if automatic conversion to masked arrays\nshall be applied for all variables.\n\nB{Notes}:\n\nCalling this function only affects existing variables. Variables created\nafter calling this function will follow the default behaviour.\n        ";
static PyObject *__pyx_pw_7netCDF4_7Dataset_63set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_auto_mask (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_62set_auto_mask(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_62set_auto_mask(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_var = NULL;
  PyObject *__pyx_v_groups = NULL;
  PyObject *__pyx_v_group = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_auto_mask", 0);

  /* "netCDF4.pyx":2029
 *         """
 * 
 *         for var in self.variables.values():             # <<<<<<<<<<<<<<
 *             var.set_auto_mask(value)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__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 = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "netCDF4.pyx":2030
 * 
 *         for var in self.variables.values():
 *             var.set_auto_mask(value)             # <<<<<<<<<<<<<<
 * 
 *         for groups in _walk_grps(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_mask); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2030; __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 = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "netCDF4.pyx":2032
 *             var.set_auto_mask(value)
 * 
 *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
 *             for group in groups:
 *                 for var in group.variables.values():
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __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 = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __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;
  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = Py_TYPE(__pyx_t_6)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_6)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_6)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_6);
      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 = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_groups, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "netCDF4.pyx":2033
 * 
 *         for groups in _walk_grps(self):
 *             for group in groups:             # <<<<<<<<<<<<<<
 *                 for var in group.variables.values():
 *                     var.set_auto_mask(value)
 */
    if (PyList_CheckExact(__pyx_v_groups) || PyTuple_CheckExact(__pyx_v_groups)) {
      __pyx_t_5 = __pyx_v_groups; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_5)) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_5)) {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_1 = __pyx_t_8(__pyx_t_5);
        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 = 2033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "netCDF4.pyx":2034
 *         for groups in _walk_grps(self):
 *             for group in groups:
 *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
 *                     var.set_auto_mask(value)
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_2)) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_2)) {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_1 = __pyx_t_10(__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 = 2034; __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":2035
 *             for group in groups:
 *                 for var in group.variables.values():
 *                     var.set_auto_mask(value)             # <<<<<<<<<<<<<<
 * 
 *     def set_auto_scale(self, value):
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_mask); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2035; __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_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "netCDF4.pyx":2011
 * 
 * 
 *     def set_auto_mask(self, value):             # <<<<<<<<<<<<<<
 *         """
 * set_auto_mask(self, True_or_False)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("netCDF4.Dataset.set_auto_mask", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_var);
  __Pyx_XDECREF(__pyx_v_groups);
  __Pyx_XDECREF(__pyx_v_group);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2037
 *                     var.set_auto_mask(value)
 * 
 *     def set_auto_scale(self, value):             # <<<<<<<<<<<<<<
 *         """
 * set_auto_scale(self, True_or_False)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_65set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_7netCDF4_7Dataset_64set_auto_scale[] = "\nset_auto_scale(self, True_or_False)\n\nCall L{set_auto_scale} for all variables contained in this L{Dataset} or\nL{Group}, as well as for all variables in all its subgroups.\n\nB{Parameters}:\n\nB{C{True_or_False}} - Boolean determining if automatic variable scaling\nshall be applied for all variables.\n\nB{Notes}:\n\nCalling this function only affects existing variables. Variables created\nafter calling this function will follow the default behaviour.\n        ";
static PyObject *__pyx_pw_7netCDF4_7Dataset_65set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_auto_scale (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_64set_auto_scale(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_64set_auto_scale(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_var = NULL;
  PyObject *__pyx_v_groups = NULL;
  PyObject *__pyx_v_group = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_auto_scale", 0);

  /* "netCDF4.pyx":2055
 *         """
 * 
 *         for var in self.variables.values():             # <<<<<<<<<<<<<<
 *             var.set_auto_scale(value)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->variables, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__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 = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "netCDF4.pyx":2056
 * 
 *         for var in self.variables.values():
 *             var.set_auto_scale(value)             # <<<<<<<<<<<<<<
 * 
 *         for groups in _walk_grps(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; __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 = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "netCDF4.pyx":2058
 *             var.set_auto_scale(value)
 * 
 *         for groups in _walk_grps(self):             # <<<<<<<<<<<<<<
 *             for group in groups:
 *                 for var in group.variables.values():
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_walk_grps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __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 = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __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;
  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = Py_TYPE(__pyx_t_6)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_6)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_6)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_6);
      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 = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_groups, __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_scale(value)
 */
    if (PyList_CheckExact(__pyx_v_groups) || PyTuple_CheckExact(__pyx_v_groups)) {
      __pyx_t_5 = __pyx_v_groups; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_groups); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_5)) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_5)) {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_1 = __pyx_t_8(__pyx_t_5);
        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 = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "netCDF4.pyx":2060
 *         for groups in _walk_grps(self):
 *             for group in groups:
 *                 for var in group.variables.values():             # <<<<<<<<<<<<<<
 *                     var.set_auto_scale(value)
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_2)) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_2)) {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_1 = __pyx_t_10(__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 = 2060; __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":2061
 *             for group in groups:
 *                 for var in group.variables.values():
 *                     var.set_auto_scale(value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_set_auto_scale); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __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_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "netCDF4.pyx":2037
 *                     var.set_auto_mask(value)
 * 
 *     def set_auto_scale(self, value):             # <<<<<<<<<<<<<<
 *         """
 * set_auto_scale(self, True_or_False)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("netCDF4.Dataset.set_auto_scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_var);
  __Pyx_XDECREF(__pyx_v_groups);
  __Pyx_XDECREF(__pyx_v_group);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1398
 * L{Group} instance. C{None} for a the root group or L{Dataset} instance"""
 *     cdef object __weakref__
 *     cdef public int _grpid             # <<<<<<<<<<<<<<
 *     cdef public int _isopen
 *     cdef public groups, dimensions, variables, disk_format, path, parent,\
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_6_grpid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_6_grpid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6_grpid___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_6_grpid___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Dataset._grpid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6_grpid_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_6_grpid_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->_grpid = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("netCDF4.Dataset._grpid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1399
 *     cdef object __weakref__
 *     cdef public int _grpid
 *     cdef public int _isopen             # <<<<<<<<<<<<<<
 *     cdef public groups, dimensions, variables, disk_format, path, parent,\
 *     file_format, data_model, cmptypes, vltypes, keepweakref
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_7_isopen_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_7_isopen_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_7_isopen___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_7_isopen___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_isopen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Dataset._isopen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_7_isopen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_7_isopen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_7_isopen_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_7_isopen_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->_isopen = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("netCDF4.Dataset._isopen.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1400
 *     cdef public int _grpid
 *     cdef public int _isopen
 *     cdef public groups, dimensions, variables, disk_format, path, parent,\             # <<<<<<<<<<<<<<
 *     file_format, data_model, cmptypes, vltypes, keepweakref
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_6groups_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_6groups_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6groups___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_6groups___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->groups);
  __pyx_r = __pyx_v_self->groups;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_6groups_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_6groups_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6groups_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_6groups_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->groups);
  __Pyx_DECREF(__pyx_v_self->groups);
  __pyx_v_self->groups = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_6groups_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_6groups_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6groups_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_6groups_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->groups);
  __Pyx_DECREF(__pyx_v_self->groups);
  __pyx_v_self->groups = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_10dimensions_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_10dimensions_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10dimensions___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_10dimensions___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->dimensions);
  __pyx_r = __pyx_v_self->dimensions;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_10dimensions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_10dimensions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10dimensions_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_10dimensions_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->dimensions);
  __Pyx_DECREF(__pyx_v_self->dimensions);
  __pyx_v_self->dimensions = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_10dimensions_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_10dimensions_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10dimensions_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_10dimensions_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dimensions);
  __Pyx_DECREF(__pyx_v_self->dimensions);
  __pyx_v_self->dimensions = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_9variables_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_9variables_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_9variables___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_9variables___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->variables);
  __pyx_r = __pyx_v_self->variables;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_9variables_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_9variables_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_9variables_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_9variables_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->variables);
  __Pyx_DECREF(__pyx_v_self->variables);
  __pyx_v_self->variables = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_9variables_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_9variables_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_9variables_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_9variables_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->variables);
  __Pyx_DECREF(__pyx_v_self->variables);
  __pyx_v_self->variables = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_11disk_format_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_11disk_format_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11disk_format___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_11disk_format___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->disk_format);
  __pyx_r = __pyx_v_self->disk_format;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_11disk_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_11disk_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11disk_format_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_11disk_format_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->disk_format);
  __Pyx_DECREF(__pyx_v_self->disk_format);
  __pyx_v_self->disk_format = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_11disk_format_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_11disk_format_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11disk_format_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_11disk_format_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->disk_format);
  __Pyx_DECREF(__pyx_v_self->disk_format);
  __pyx_v_self->disk_format = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_4path_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_4path_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_4path___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_4path___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->path);
  __pyx_r = __pyx_v_self->path;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_4path_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_4path_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_4path_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_4path_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->path);
  __Pyx_DECREF(__pyx_v_self->path);
  __pyx_v_self->path = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_4path_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_4path_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_4path_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_4path_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->path);
  __Pyx_DECREF(__pyx_v_self->path);
  __pyx_v_self->path = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_6parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_6parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6parent___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_6parent___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->parent);
  __pyx_r = __pyx_v_self->parent;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_6parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_6parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6parent_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_6parent_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->parent);
  __Pyx_DECREF(__pyx_v_self->parent);
  __pyx_v_self->parent = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_6parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_6parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_6parent_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_6parent_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->parent);
  __Pyx_DECREF(__pyx_v_self->parent);
  __pyx_v_self->parent = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":1401
 *     cdef public int _isopen
 *     cdef public groups, dimensions, variables, disk_format, path, parent,\
 *     file_format, data_model, cmptypes, vltypes, keepweakref             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, filename, mode='r', clobber=True, format='NETCDF4',
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_11file_format_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_11file_format_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11file_format___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_11file_format___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->file_format);
  __pyx_r = __pyx_v_self->file_format;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_11file_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_11file_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11file_format_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_11file_format_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->file_format);
  __Pyx_DECREF(__pyx_v_self->file_format);
  __pyx_v_self->file_format = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_11file_format_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_11file_format_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11file_format_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_11file_format_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->file_format);
  __Pyx_DECREF(__pyx_v_self->file_format);
  __pyx_v_self->file_format = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_10data_model_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_10data_model_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10data_model___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_10data_model___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->data_model);
  __pyx_r = __pyx_v_self->data_model;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_10data_model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_10data_model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10data_model_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_10data_model_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->data_model);
  __Pyx_DECREF(__pyx_v_self->data_model);
  __pyx_v_self->data_model = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_10data_model_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_10data_model_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_10data_model_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_10data_model_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->data_model);
  __Pyx_DECREF(__pyx_v_self->data_model);
  __pyx_v_self->data_model = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_8cmptypes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_8cmptypes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_8cmptypes___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_8cmptypes___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->cmptypes);
  __pyx_r = __pyx_v_self->cmptypes;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_8cmptypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_8cmptypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_8cmptypes_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_8cmptypes_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->cmptypes);
  __Pyx_DECREF(__pyx_v_self->cmptypes);
  __pyx_v_self->cmptypes = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_8cmptypes_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_8cmptypes_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_8cmptypes_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_8cmptypes_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->cmptypes);
  __Pyx_DECREF(__pyx_v_self->cmptypes);
  __pyx_v_self->cmptypes = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_7vltypes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_7vltypes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_7vltypes___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_7vltypes___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->vltypes);
  __pyx_r = __pyx_v_self->vltypes;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_7vltypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_7vltypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_7vltypes_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_7vltypes_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->vltypes);
  __Pyx_DECREF(__pyx_v_self->vltypes);
  __pyx_v_self->vltypes = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_7vltypes_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_7vltypes_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_7vltypes_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_7vltypes_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->vltypes);
  __Pyx_DECREF(__pyx_v_self->vltypes);
  __pyx_v_self->vltypes = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_7Dataset_11keepweakref_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_7Dataset_11keepweakref_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11keepweakref___get__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_7Dataset_11keepweakref___get__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->keepweakref);
  __pyx_r = __pyx_v_self->keepweakref;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_11keepweakref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_11keepweakref_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11keepweakref_2__set__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_11keepweakref_2__set__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->keepweakref);
  __Pyx_DECREF(__pyx_v_self->keepweakref);
  __pyx_v_self->keepweakref = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_7Dataset_11keepweakref_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_7Dataset_11keepweakref_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_7Dataset_11keepweakref_4__del__(((struct __pyx_obj_7netCDF4_Dataset *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_7Dataset_11keepweakref_4__del__(struct __pyx_obj_7netCDF4_Dataset *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->keepweakref);
  __Pyx_DECREF(__pyx_v_self->keepweakref);
  __pyx_v_self->keepweakref = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2092
 * variables are available to a L{Group} instance (except the C{close}
 * method)."""
 *     def __init__(self, parent, name, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef int ierr
 *         cdef char *groupname
 */

/* Python wrapper */
static int __pyx_pw_7netCDF4_5Group_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7netCDF4_5Group_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_parent = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_name,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parent)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2092; __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 = 2092; __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 = 2092; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("netCDF4.Group.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_5Group___init__(((struct __pyx_obj_7netCDF4_Group *)__pyx_v_self), __pyx_v_parent, __pyx_v_name, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_5Group___init__(struct __pyx_obj_7netCDF4_Group *__pyx_v_self, PyObject *__pyx_v_parent, PyObject *__pyx_v_name, PyObject *__pyx_v_kwargs) {
  int __pyx_v_ierr;
  char *__pyx_v_groupname;
  PyObject *__pyx_v_bytestr = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "netCDF4.pyx":2096
 *         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); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2096; __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":2097
 *         # set data_model and file_format attributes.
 *         self.data_model = parent.data_model
 *         self.file_format = parent.file_format             # <<<<<<<<<<<<<<
 *         # full path to Group.
 *         self.path = posixpath.join(parent.path, name)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_file_format_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2097; __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":2099
 *         self.file_format = parent.file_format
 *         # full path to Group.
 *         self.path = posixpath.join(parent.path, name)             # <<<<<<<<<<<<<<
 *         # parent group.
 *         self.parent = parent
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_posixpath); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2099; __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_parent, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2099; __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_INCREF(__pyx_v_name);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __pyx_t_1 = 0;
  __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 = 2099; __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_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":2101
 *         self.path = posixpath.join(parent.path, name)
 *         # parent group.
 *         self.parent = parent             # <<<<<<<<<<<<<<
 *         # propagate weak reference setting from parent.
 *         self.keepweakref = parent.keepweakref
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.parent);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.parent);
  __pyx_v_self->__pyx_base.parent = __pyx_v_parent;

  /* "netCDF4.pyx":2103
 *         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 = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.keepweakref);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.keepweakref);
  __pyx_v_self->__pyx_base.keepweakref = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":2104
 *         # 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_4 = (__Pyx_PyDict_Contains(__pyx_n_s_id, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "netCDF4.pyx":2105
 *         self.keepweakref = parent.keepweakref
 *         if 'id' in kwargs:
 *             self._grpid = kwargs['id']             # <<<<<<<<<<<<<<
 *             # get compound and vlen types in this Group.
 *             self.cmptypes, self.vltypes = _get_types(self)
 */
    __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __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 = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_self->__pyx_base._grpid = __pyx_t_6;

    /* "netCDF4.pyx":2107
 *             self._grpid = kwargs['id']
 *             # get compound and vlen types in this Group.
 *             self.cmptypes, self.vltypes = _get_types(self)             # <<<<<<<<<<<<<<
 *             # get dimensions in this Group.
 *             self.dimensions = _get_dims(self)
 */
    __pyx_t_1 = __pyx_f_7netCDF4__get_types(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2107; __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 = 2107; __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_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2107; __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_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2107; __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_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2107; __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 = 2107; __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_2);
    __Pyx_GOTREF(__pyx_v_self->__pyx_base.vltypes);
    __Pyx_DECREF(__pyx_v_self->__pyx_base.vltypes);
    __pyx_v_self->__pyx_base.vltypes = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "netCDF4.pyx":2109
 *             self.cmptypes, self.vltypes = _get_types(self)
 *             # get dimensions in this Group.
 *             self.dimensions = _get_dims(self)             # <<<<<<<<<<<<<<
 *             # get variables in this Group.
 *             self.variables = _get_vars(self)
 */
    __pyx_t_1 = __pyx_f_7netCDF4__get_dims(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->__pyx_base.dimensions);
    __Pyx_DECREF(__pyx_v_self->__pyx_base.dimensions);
    __pyx_v_self->__pyx_base.dimensions = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "netCDF4.pyx":2111
 *             self.dimensions = _get_dims(self)
 *             # get variables in this Group.
 *             self.variables = _get_vars(self)             # <<<<<<<<<<<<<<
 *             # get groups in this Group.
 *             self.groups = _get_grps(self)
 */
    __pyx_t_1 = __pyx_f_7netCDF4__get_vars(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2111; __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":2113
 *             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 = 2113; __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":2115
 *             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 = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_bytestr = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "netCDF4.pyx":2116
 *         else:
 *             bytestr = _strencode(name)
 *             groupname = bytestr             # <<<<<<<<<<<<<<
 *             ierr = nc_def_grp(parent._grpid, groupname, &self._grpid)
 *             if ierr != NC_NOERR:
 */
    __pyx_t_9 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_groupname = __pyx_t_9;

    /* "netCDF4.pyx":2117
 *             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 = 2117; __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 = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_ierr = nc_def_grp(__pyx_t_6, __pyx_v_groupname, (&__pyx_v_self->__pyx_base._grpid));

    /* "netCDF4.pyx":2118
 *             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_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_5) {

      /* "netCDF4.pyx":2119
 *             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_9 = ((char *)nc_strerror(__pyx_v_ierr));
      __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_9, 0, strlen(__pyx_t_9), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 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_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = 2119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":2120
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             self.cmptypes = OrderedDict()             # <<<<<<<<<<<<<<
 *             self.vltypes = OrderedDict()
 *             self.dimensions = OrderedDict()
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->__pyx_base.cmptypes);
    __Pyx_DECREF(__pyx_v_self->__pyx_base.cmptypes);
    __pyx_v_self->__pyx_base.cmptypes = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "netCDF4.pyx":2121
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             self.cmptypes = OrderedDict()
 *             self.vltypes = OrderedDict()             # <<<<<<<<<<<<<<
 *             self.dimensions = OrderedDict()
 *             self.variables = OrderedDict()
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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":2122
 *             self.cmptypes = OrderedDict()
 *             self.vltypes = OrderedDict()
 *             self.dimensions = OrderedDict()             # <<<<<<<<<<<<<<
 *             self.variables = OrderedDict()
 *             self.groups = OrderedDict()
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); 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_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->__pyx_base.dimensions);
    __Pyx_DECREF(__pyx_v_self->__pyx_base.dimensions);
    __pyx_v_self->__pyx_base.dimensions = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "netCDF4.pyx":2123
 *             self.vltypes = OrderedDict()
 *             self.dimensions = OrderedDict()
 *             self.variables = OrderedDict()             # <<<<<<<<<<<<<<
 *             self.groups = OrderedDict()
 * 
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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":2124
 *             self.dimensions = OrderedDict()
 *             self.variables = OrderedDict()
 *             self.groups = OrderedDict()             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->__pyx_base.groups);
    __Pyx_DECREF(__pyx_v_self->__pyx_base.groups);
    __pyx_v_self->__pyx_base.groups = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":2092
 * variables are available to a L{Group} instance (except the C{close}
 * method)."""
 *     def __init__(self, parent, name, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef int ierr
 *         cdef char *groupname
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("netCDF4.Group.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bytestr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2126
 *             self.groups = OrderedDict()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 * close(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_5Group_3close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_5Group_2close[] = "\nclose(self)\n\noverrides L{Dataset} close method which does not apply to L{Group} \ninstances, raises IOError.";
static PyObject *__pyx_pw_7netCDF4_5Group_3close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_5Group_2close(((struct __pyx_obj_7netCDF4_Group *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_5Group_2close(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Group *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 0);

  /* "netCDF4.pyx":2132
 * 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)')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __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 = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":2126
 *             self.groups = OrderedDict()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         """
 * close(self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Group.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2167
 *     cdef public _data_model, _name, _grp
 * 
 *     def __init__(self, grp, name, size=None, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef int ierr
 *         cdef char *dimname
 */

/* Python wrapper */
static int __pyx_pw_7netCDF4_9Dimension_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7netCDF4_9Dimension_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_grp = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grp_2,&__pyx_n_s_name,&__pyx_n_s_size,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grp_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_grp = values[0];
    __pyx_v_name = values[1];
    __pyx_v_size = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("netCDF4.Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_9Dimension___init__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self), __pyx_v_grp, __pyx_v_name, __pyx_v_size, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_9Dimension___init__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_name, PyObject *__pyx_v_size, PyObject *__pyx_v_kwargs) {
  int __pyx_v_ierr;
  char *__pyx_v_dimname;
  size_t __pyx_v_lendim;
  PyObject *__pyx_v_bytestr = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  char *__pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "netCDF4.pyx":2171
 *         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 = 2171; __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 = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->_grpid = __pyx_t_2;

  /* "netCDF4.pyx":2174
 *         # make a weakref to group to avoid circular ref (issue 218)
 *         # keep strong reference the default behaviour (issue 251)
 *         if grp.keepweakref:             # <<<<<<<<<<<<<<
 *             self._grp = weakref.proxy(grp)
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_keepweakref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2174; __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 = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "netCDF4.pyx":2175
 *         # keep strong reference the default behaviour (issue 251)
 *         if grp.keepweakref:
 *             self._grp = weakref.proxy(grp)             # <<<<<<<<<<<<<<
 *         else:
 *             self._grp = grp
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); 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_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_proxy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2175; __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 = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_grp);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_grp);
    __Pyx_GIVEREF(__pyx_v_grp);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2175; __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_1); __pyx_t_1 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->_grp);
    __Pyx_DECREF(__pyx_v_self->_grp);
    __pyx_v_self->_grp = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "netCDF4.pyx":2177
 *             self._grp = weakref.proxy(grp)
 *         else:
 *             self._grp = grp             # <<<<<<<<<<<<<<
 *         self._data_model = grp.data_model
 *         self._name = name
 */
    __Pyx_INCREF(__pyx_v_grp);
    __Pyx_GIVEREF(__pyx_v_grp);
    __Pyx_GOTREF(__pyx_v_self->_grp);
    __Pyx_DECREF(__pyx_v_self->_grp);
    __pyx_v_self->_grp = __pyx_v_grp;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":2178
 *         else:
 *             self._grp = grp
 *         self._data_model = grp.data_model             # <<<<<<<<<<<<<<
 *         self._name = name
 *         if 'id' in kwargs:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_GOTREF(__pyx_v_self->_data_model);
  __Pyx_DECREF(__pyx_v_self->_data_model);
  __pyx_v_self->_data_model = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "netCDF4.pyx":2179
 *             self._grp = grp
 *         self._data_model = grp.data_model
 *         self._name = name             # <<<<<<<<<<<<<<
 *         if 'id' in kwargs:
 *             self._dimid = kwargs['id']
 */
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __Pyx_GOTREF(__pyx_v_self->_name);
  __Pyx_DECREF(__pyx_v_self->_name);
  __pyx_v_self->_name = __pyx_v_name;

  /* "netCDF4.pyx":2180
 *         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 = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = (__pyx_t_3 != 0);
  if (__pyx_t_6) {

    /* "netCDF4.pyx":2181
 *         self._name = name
 *         if 'id' in kwargs:
 *             self._dimid = kwargs['id']             # <<<<<<<<<<<<<<
 *         else:
 *             bytestr = _strencode(name)
 */
    __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_self->_dimid = __pyx_t_2;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "netCDF4.pyx":2183
 *             self._dimid = kwargs['id']
 *         else:
 *             bytestr = _strencode(name)             # <<<<<<<<<<<<<<
 *             dimname = bytestr
 *             if size is not None:
 */
    __pyx_t_5 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_bytestr = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "netCDF4.pyx":2184
 *         else:
 *             bytestr = _strencode(name)
 *             dimname = bytestr             # <<<<<<<<<<<<<<
 *             if size is not None:
 *                 lendim = size
 */
    __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_dimname = __pyx_t_7;

    /* "netCDF4.pyx":2185
 *             bytestr = _strencode(name)
 *             dimname = bytestr
 *             if size is not None:             # <<<<<<<<<<<<<<
 *                 lendim = size
 *             else:
 */
    __pyx_t_6 = (__pyx_v_size != Py_None);
    __pyx_t_3 = (__pyx_t_6 != 0);
    if (__pyx_t_3) {

      /* "netCDF4.pyx":2186
 *             dimname = bytestr
 *             if size is not None:
 *                 lendim = size             # <<<<<<<<<<<<<<
 *             else:
 *                 lendim = NC_UNLIMITED
 */
      __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_lendim = __pyx_t_8;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "netCDF4.pyx":2188
 *                 lendim = size
 *             else:
 *                 lendim = NC_UNLIMITED             # <<<<<<<<<<<<<<
 *             if grp.data_model != 'NETCDF4': grp._redef()
 *             ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid)
 */
      __pyx_v_lendim = NC_UNLIMITED;
    }
    __pyx_L5:;

    /* "netCDF4.pyx":2189
 *             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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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 = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, 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_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "netCDF4.pyx":2190
 *                 lendim = NC_UNLIMITED
 *             if grp.data_model != 'NETCDF4': grp._redef()
 *             ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid)             # <<<<<<<<<<<<<<
 *             if grp.data_model != 'NETCDF4': grp._enddef()
 *             if ierr != NC_NOERR:
 */
    __pyx_v_ierr = nc_def_dim(__pyx_v_self->_grpid, __pyx_v_dimname, __pyx_v_lendim, (&__pyx_v_self->_dimid));

    /* "netCDF4.pyx":2191
 *             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 = 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_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); 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_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2191; __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_5); __pyx_t_5 = 0;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "netCDF4.pyx":2192
 *             ierr = nc_def_dim(self._grpid, dimname, lendim, &self._dimid)
 *             if grp.data_model != 'NETCDF4': grp._enddef()
 *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 */
    __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_3) {

      /* "netCDF4.pyx":2193
 *             if grp.data_model != 'NETCDF4': grp._enddef()
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
      __pyx_t_7 = ((char *)nc_strerror(__pyx_v_ierr));
      __pyx_t_5 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2193; __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 = 2193; __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_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2193; __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 = 2193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  __pyx_L4:;

  /* "netCDF4.pyx":2167
 *     cdef public _data_model, _name, _grp
 * 
 *     def __init__(self, grp, name, size=None, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef int ierr
 *         cdef char *dimname
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("netCDF4.Dimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bytestr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2195
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         if python3:
 *            return self.__unicode__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9Dimension_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_9Dimension_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_2__str__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9Dimension_2__str__(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "netCDF4.pyx":2196
 * 
 *     def __str__(self):
 *         if python3:             # <<<<<<<<<<<<<<
 *            return self.__unicode__()
 *         else:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2196; __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 = 2196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2197
 *     def __str__(self):
 *         if python3:
 *            return self.__unicode__()             # <<<<<<<<<<<<<<
 *         else:
 *            return unicode(self).encode(default_encoding)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2197; __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":2199
 *            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 = 2199; __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_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2199; __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_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2199; __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_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2199; __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 = 2199; __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_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":2195
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def __str__(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_AddTraceback("netCDF4.Dimension.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2201
 *            return unicode(self).encode(default_encoding)
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         if not dir(self._grp):
 *             return 'Dimension object no longer valid'
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9Dimension_5__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7netCDF4_9Dimension_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_9Dimension_4__unicode__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9Dimension_4__unicode__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  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("__unicode__", 0);

  /* "netCDF4.pyx":2202
 * 
 *     def __unicode__(self):
 *         if not dir(self._grp):             # <<<<<<<<<<<<<<
 *             return 'Dimension object no longer valid'
 *         if self.isunlimited():
 */
  __pyx_t_1 = __pyx_v_self->_grp;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Dir(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2202; __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 = 2202; __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":2203
 *     def __unicode__(self):
 *         if not dir(self._grp):
 *             return 'Dimension object no longer valid'             # <<<<<<<<<<<<<<
 *         if self.isunlimited():
 *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_s_Dimension_object_no_longer_valid);
    __pyx_r = __pyx_kp_s_Dimension_object_no_longer_valid;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":2204
 *         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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2204; __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 = 2204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "netCDF4.pyx":2205
 *             return 'Dimension object no longer valid'
 *         if self.isunlimited():
 *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))             # <<<<<<<<<<<<<<
 *         else:
 *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_self->_name);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->_name);
    __Pyx_GIVEREF(__pyx_v_self->_name);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_name_s_size_s, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2205; __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_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "netCDF4.pyx":2207
 *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
 *         else:
 *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2207; __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);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_name_s_size_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2207; __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_6, __pyx_t_2); 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_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":2201
 *            return unicode(self).encode(default_encoding)
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         if not dir(self._grp):
 *             return 'Dimension object no longer valid'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("netCDF4.Dimension.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2209
 *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         # len(L{Dimension} instance) returns current size of dimension
 *         cdef int ierr
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_7netCDF4_9Dimension_7__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_7netCDF4_9Dimension_7__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_6__len__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_7netCDF4_9Dimension_6__len__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
  int __pyx_v_ierr;
  size_t __pyx_v_lengthp;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "netCDF4.pyx":2213
 *         cdef int ierr
 *         cdef size_t lengthp
 *         ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_inq_dimlen(__pyx_v_self->_grpid, __pyx_v_self->_dimid, (&__pyx_v_lengthp));

  /* "netCDF4.pyx":2214
 *         cdef size_t lengthp
 *         ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         return lengthp
 */
  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":2215
 *         ierr = nc_inq_dimlen(self._grpid, self._dimid, &lengthp)
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *         return lengthp
 * 
 */
    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2215; __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 = 2215; __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 = 2215; __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 = 2215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":2216
 *         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":2209
 *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         # len(L{Dimension} instance) returns current size of dimension
 *         cdef int ierr
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("netCDF4.Dimension.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2218
 *         return lengthp
 * 
 *     def group(self):             # <<<<<<<<<<<<<<
 *         """
 * group(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9Dimension_9group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_9Dimension_8group[] = "\ngroup(self)\n\nreturn the group that this L{Dimension} is a member of.";
static PyObject *__pyx_pw_7netCDF4_9Dimension_9group(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_8group(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9Dimension_8group(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("group", 0);

  /* "netCDF4.pyx":2223
 * 
 * return the group that this L{Dimension} is a member of."""
 *         return self._grp             # <<<<<<<<<<<<<<
 * 
 *     def isunlimited(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_grp);
  __pyx_r = __pyx_v_self->_grp;
  goto __pyx_L0;

  /* "netCDF4.pyx":2218
 *         return lengthp
 * 
 *     def group(self):             # <<<<<<<<<<<<<<
 *         """
 * group(self)
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2225
 *         return self._grp
 * 
 *     def isunlimited(self):             # <<<<<<<<<<<<<<
 *         """
 * isunlimited(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9Dimension_11isunlimited(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_9Dimension_10isunlimited[] = "\nisunlimited(self)\n\nreturns C{True} if the L{Dimension} instance is unlimited, C{False} otherwise.";
static PyObject *__pyx_pw_7netCDF4_9Dimension_11isunlimited(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_10isunlimited(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9Dimension_10isunlimited(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":2232
 *         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 = 2232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":2233
 *         cdef int unlimdimids[NC_MAX_DIMS]
 *         if self._data_model == 'NETCDF4':
 *             ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL)             # <<<<<<<<<<<<<<
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
    __pyx_v_ierr = nc_inq_unlimdims(__pyx_v_self->_grpid, (&__pyx_v_numunlimdims), NULL);

    /* "netCDF4.pyx":2234
 *         if self._data_model == 'NETCDF4':
 *             ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, NULL)
 *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             if numunlimdims == 0:
 */
    __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_1) {

      /* "netCDF4.pyx":2235
 *             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 = 2235; __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 = 2235; __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 = 2235; __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 = 2235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":2236
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             if numunlimdims == 0:             # <<<<<<<<<<<<<<
 *                 return False
 *             else:
 */
    __pyx_t_1 = ((__pyx_v_numunlimdims == 0) != 0);
    if (__pyx_t_1) {

      /* "netCDF4.pyx":2237
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             if numunlimdims == 0:
 *                 return False             # <<<<<<<<<<<<<<
 *             else:
 *                 dimid = self._dimid
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "netCDF4.pyx":2239
 *                 return False
 *             else:
 *                 dimid = self._dimid             # <<<<<<<<<<<<<<
 *                 ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
 *                 if ierr != NC_NOERR:
 */
      __pyx_t_5 = __pyx_v_self->_dimid;
      __pyx_v_dimid = __pyx_t_5;

      /* "netCDF4.pyx":2240
 *             else:
 *                 dimid = self._dimid
 *                 ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)             # <<<<<<<<<<<<<<
 *                 if ierr != NC_NOERR:
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
      __pyx_v_ierr = nc_inq_unlimdims(__pyx_v_self->_grpid, (&__pyx_v_numunlimdims), __pyx_v_unlimdimids);

      /* "netCDF4.pyx":2241
 *                 dimid = self._dimid
 *                 ierr = nc_inq_unlimdims(self._grpid, &numunlimdims, unlimdimids)
 *                 if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *                 unlimdim_ids = []
 */
      __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_1) {

        /* "netCDF4.pyx":2242
 *                 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 = 2242; __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 = 2242; __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 = 2242; __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 = 2242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":2243
 *                 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 = 2243; __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":2244
 *                     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":2245
 *                 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 = 2245; __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 = 2245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }

      /* "netCDF4.pyx":2246
 *                 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 = 2246; __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 = 2246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = (__pyx_t_1 != 0);
      if (__pyx_t_7) {

        /* "netCDF4.pyx":2247
 *                     unlimdim_ids.append(unlimdimids[n])
 *                 if dimid in unlimdim_ids:
 *                     return True             # <<<<<<<<<<<<<<
 *                 else:
 *                     return False
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_True);
        __pyx_r = Py_True;
        goto __pyx_L0;
      }
      /*else*/ {

        /* "netCDF4.pyx":2249
 *                     return True
 *                 else:
 *                     return False             # <<<<<<<<<<<<<<
 *         else: # if not NETCDF4, there is only one unlimited dimension.
 *             # nc_inq_unlimdims only works for NETCDF4.
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;
      }
    }
  }
  /*else*/ {

    /* "netCDF4.pyx":2252
 *         else: # if not NETCDF4, there is only one unlimited dimension.
 *             # nc_inq_unlimdims only works for NETCDF4.
 *             ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)             # <<<<<<<<<<<<<<
 *             if self._dimid == xdimid:
 *                 return True
 */
    __pyx_v_ierr = nc_inq(__pyx_v_self->_grpid, (&__pyx_v_ndims), (&__pyx_v_nvars), (&__pyx_v_ngatts), (&__pyx_v_xdimid));

    /* "netCDF4.pyx":2253
 *             # nc_inq_unlimdims only works for NETCDF4.
 *             ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
 *             if self._dimid == xdimid:             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
    __pyx_t_7 = ((__pyx_v_self->_dimid == __pyx_v_xdimid) != 0);
    if (__pyx_t_7) {

      /* "netCDF4.pyx":2254
 *             ierr = nc_inq(self._grpid, &ndims, &nvars, &ngatts, &xdimid)
 *             if self._dimid == xdimid:
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 return False
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "netCDF4.pyx":2256
 *                 return True
 *             else:
 *                 return False             # <<<<<<<<<<<<<<
 * 
 * cdef class Variable:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;
    }
  }

  /* "netCDF4.pyx":2225
 *         return self._grp
 * 
 *     def isunlimited(self):             # <<<<<<<<<<<<<<
 *         """
 * isunlimited(self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("netCDF4.Dimension.isunlimited", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_unlimdim_ids);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2164
 * C{isunlimited()} method of a L{Dimension} instance can be used to
 * determine if the dimension is unlimited"""
 *     cdef public int _dimid, _grpid             # <<<<<<<<<<<<<<
 *     cdef public _data_model, _name, _grp
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9Dimension_6_dimid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_9Dimension_6_dimid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_6_dimid___get__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9Dimension_6_dimid___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_dimid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Dimension._dimid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_9Dimension_6_dimid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_9Dimension_6_dimid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_6_dimid_2__set__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_9Dimension_6_dimid_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->_dimid = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("netCDF4.Dimension._dimid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9Dimension_6_grpid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_9Dimension_6_grpid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_6_grpid___get__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9Dimension_6_grpid___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Dimension._grpid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_9Dimension_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_9Dimension_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_6_grpid_2__set__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_9Dimension_6_grpid_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->_grpid = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("netCDF4.Dimension._grpid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2165
 * determine if the dimension is unlimited"""
 *     cdef public int _dimid, _grpid
 *     cdef public _data_model, _name, _grp             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, grp, name, size=None, **kwargs):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9Dimension_11_data_model_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_9Dimension_11_data_model_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_11_data_model___get__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9Dimension_11_data_model___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_data_model);
  __pyx_r = __pyx_v_self->_data_model;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_9Dimension_11_data_model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_9Dimension_11_data_model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_11_data_model_2__set__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_9Dimension_11_data_model_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_data_model);
  __Pyx_DECREF(__pyx_v_self->_data_model);
  __pyx_v_self->_data_model = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_9Dimension_11_data_model_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_9Dimension_11_data_model_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_11_data_model_4__del__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_9Dimension_11_data_model_4__del__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_data_model);
  __Pyx_DECREF(__pyx_v_self->_data_model);
  __pyx_v_self->_data_model = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9Dimension_5_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_9Dimension_5_name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_5_name___get__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9Dimension_5_name___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_name);
  __pyx_r = __pyx_v_self->_name;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_9Dimension_5_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_9Dimension_5_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_5_name_2__set__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_9Dimension_5_name_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_name);
  __Pyx_DECREF(__pyx_v_self->_name);
  __pyx_v_self->_name = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_9Dimension_5_name_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_9Dimension_5_name_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_5_name_4__del__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_9Dimension_5_name_4__del__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_name);
  __Pyx_DECREF(__pyx_v_self->_name);
  __pyx_v_self->_name = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_9Dimension_4_grp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_9Dimension_4_grp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_4_grp___get__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_9Dimension_4_grp___get__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_grp);
  __pyx_r = __pyx_v_self->_grp;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_9Dimension_4_grp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_9Dimension_4_grp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_4_grp_2__set__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_9Dimension_4_grp_2__set__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_grp);
  __Pyx_DECREF(__pyx_v_self->_grp);
  __pyx_v_self->_grp = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_9Dimension_4_grp_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_9Dimension_4_grp_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_9Dimension_4_grp_4__del__(((struct __pyx_obj_7netCDF4_Dimension *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_9Dimension_4_grp_4__del__(struct __pyx_obj_7netCDF4_Dimension *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_grp);
  __Pyx_DECREF(__pyx_v_self->_grp);
  __pyx_v_self->_grp = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2393
 *     _isvlen, _grp,_cmptype,_vltype
 * 
 *     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,             # <<<<<<<<<<<<<<
 *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
 *             chunksizes=None, endian='native', least_significant_digit=None,
 */

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_grp = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_datatype = 0;
  PyObject *__pyx_v_dimensions = 0;
  PyObject *__pyx_v_zlib = 0;
  PyObject *__pyx_v_complevel = 0;
  PyObject *__pyx_v_shuffle = 0;
  PyObject *__pyx_v_fletcher32 = 0;
  PyObject *__pyx_v_contiguous = 0;
  PyObject *__pyx_v_chunksizes = 0;
  PyObject *__pyx_v_endian = 0;
  PyObject *__pyx_v_least_significant_digit = 0;
  PyObject *__pyx_v_fill_value = 0;
  PyObject *__pyx_v_chunk_cache = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grp_2,&__pyx_n_s_name,&__pyx_n_s_datatype,&__pyx_n_s_dimensions,&__pyx_n_s_zlib,&__pyx_n_s_complevel,&__pyx_n_s_shuffle,&__pyx_n_s_fletcher32,&__pyx_n_s_contiguous,&__pyx_n_s_chunksizes,&__pyx_n_s_endian,&__pyx_n_s_least_significant_digit,&__pyx_n_s_fill_value,&__pyx_n_s_chunk_cache,0};
    PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    values[3] = ((PyObject *)__pyx_empty_tuple);
    values[4] = ((PyObject *)Py_False);
    values[5] = ((PyObject *)__pyx_int_4);

    /* "netCDF4.pyx":2394
 * 
 *     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,
 *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,             # <<<<<<<<<<<<<<
 *             chunksizes=None, endian='native', least_significant_digit=None,
 *             fill_value=None, chunk_cache=None, **kwargs):
 */
    values[6] = ((PyObject *)Py_True);
    values[7] = ((PyObject *)Py_False);
    values[8] = ((PyObject *)Py_False);

    /* "netCDF4.pyx":2395
 *     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,
 *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
 *             chunksizes=None, endian='native', least_significant_digit=None,             # <<<<<<<<<<<<<<
 *             fill_value=None, chunk_cache=None, **kwargs):
 *         cdef int ierr, ndims, icontiguous, ideflate_level, numdims
 */
    values[9] = ((PyObject *)Py_None);
    values[10] = ((PyObject *)__pyx_n_s_native);
    values[11] = ((PyObject *)Py_None);

    /* "netCDF4.pyx":2396
 *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
 *             chunksizes=None, endian='native', least_significant_digit=None,
 *             fill_value=None, chunk_cache=None, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef int ierr, ndims, icontiguous, ideflate_level, numdims
 *         cdef char *varname
 */
    values[12] = ((PyObject *)Py_None);
    values[13] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grp_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2393; __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 = 2393; __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 = 2393; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
        case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
        case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
        case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_grp = values[0];
    __pyx_v_name = values[1];
    __pyx_v_datatype = values[2];
    __pyx_v_dimensions = values[3];
    __pyx_v_zlib = values[4];
    __pyx_v_complevel = values[5];
    __pyx_v_shuffle = values[6];
    __pyx_v_fletcher32 = values[7];
    __pyx_v_contiguous = values[8];
    __pyx_v_chunksizes = values[9];
    __pyx_v_endian = values[10];
    __pyx_v_least_significant_digit = values[11];
    __pyx_v_fill_value = values[12];
    __pyx_v_chunk_cache = values[13];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 14, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2393; __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":2393
 *     _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_chunk_cache, PyObject *__pyx_v_kwargs) {
  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;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  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":2405
 *         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 = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2406
 *         # 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":2410
 *         # 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 = 2410; __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 = 2410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!__pyx_t_2) {
    __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 = 2410; __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 = 2410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_1) {
      __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 = 2410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = __pyx_t_4;
    } else {
      __pyx_t_5 = __pyx_t_1;
    }
    __pyx_t_1 = __pyx_t_5;
  } else {
    __pyx_t_1 = __pyx_t_2;
  }
  if (__pyx_t_1) {

    /* "netCDF4.pyx":2411
 *         # 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 = 2411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_dimensions);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dimensions);
    __Pyx_GIVEREF(__pyx_v_dimensions);
    __Pyx_DECREF_SET(__pyx_v_dimensions, __pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "netCDF4.pyx":2412
 *         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 = 2412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_self->_grpid = __pyx_t_6;

  /* "netCDF4.pyx":2415
 *         # 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 = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "netCDF4.pyx":2416
 *         # keep strong reference the default behaviour (issue 251)
 *         if grp.keepweakref:
 *             self._grp = weakref.proxy(grp)             # <<<<<<<<<<<<<<
 *         else:
 *             self._grp = grp
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_weakref); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_proxy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __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 = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_grp);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_grp);
    __Pyx_GIVEREF(__pyx_v_grp);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __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_3); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_8);
    __Pyx_GOTREF(__pyx_v_self->_grp);
    __Pyx_DECREF(__pyx_v_self->_grp);
    __pyx_v_self->_grp = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "netCDF4.pyx":2418
 *             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_L5:;

  /* "netCDF4.pyx":2420
 *             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_2 = (!(__pyx_t_1 != 0));
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2421
 *         # 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_1 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_VLType)); 
    __pyx_t_5 = (!(__pyx_t_1 != 0));
    __pyx_t_1 = __pyx_t_5;
  } else {
    __pyx_t_1 = __pyx_t_2;
  }
  if (__pyx_t_1) {

    /* "netCDF4.pyx":2422
 *         if (not isinstance(datatype, CompoundType) and \
 *             not isinstance(datatype, VLType)) and \
 *             datatype != str and \             # <<<<<<<<<<<<<<
 *             type(datatype) != numpy.dtype:
 *             datatype = numpy.dtype(datatype)
 */
    __pyx_t_8 = PyObject_RichCompare(__pyx_v_datatype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2422; __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 = 2422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_2) {

      /* "netCDF4.pyx":2423
 *             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_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_datatype)), __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_4 = __pyx_t_5;
    } else {
      __pyx_t_4 = __pyx_t_2;
    }
    __pyx_t_2 = __pyx_t_4;
  } else {
    __pyx_t_2 = __pyx_t_1;
  }
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2424
 *             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_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __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 = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_datatype);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_datatype);
    __Pyx_GIVEREF(__pyx_v_datatype);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_7);
    __pyx_t_7 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "netCDF4.pyx":2427
 *         # 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_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_datatype, __pyx_t_8); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2428
 *         # 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_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2428; __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_datatype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_5 = __pyx_t_4;
    } else {
      __pyx_t_5 = __pyx_t_1;
    }
    if (!__pyx_t_5) {

      /* "netCDF4.pyx":2429
 *         if (isinstance(datatype, numpy.dtype) and
 *             ((datatype.kind == 'S' and datatype.itemsize > 1) or
 *               datatype.kind == 'U')):             # <<<<<<<<<<<<<<
 *             datatype = str
 * 	# check if endian keyword consistent with datatype specification.
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_kind); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_U, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_4 = __pyx_t_1;
    } else {
      __pyx_t_4 = __pyx_t_5;
    }
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_2;
  }
  if (__pyx_t_5) {

    /* "netCDF4.pyx":2430
 *             ((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_L7;
  }
  __pyx_L7:;

  /* "netCDF4.pyx":2432
 *             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_7 = __Pyx_GetAttr3(__pyx_v_datatype, __pyx_n_s_byteorder, Py_None); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_dtype_endian = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "netCDF4.pyx":2433
 * 	# 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_5 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__49, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {
    __Pyx_INCREF(__pyx_n_s_native);
    __Pyx_DECREF_SET(__pyx_v_dtype_endian, __pyx_n_s_native);
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "netCDF4.pyx":2434
 *         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_5 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__50, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {
    __Pyx_INCREF(__pyx_n_s_big);
    __Pyx_DECREF_SET(__pyx_v_dtype_endian, __pyx_n_s_big);
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "netCDF4.pyx":2435
 *         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_5 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__51, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {
    __Pyx_INCREF(__pyx_n_s_little);
    __Pyx_DECREF_SET(__pyx_v_dtype_endian, __pyx_n_s_little);
    goto __pyx_L10;
  }
  __pyx_L10:;

  /* "netCDF4.pyx":2436
 *         if dtype_endian == '>': dtype_endian='big'
 *         if dtype_endian == '<': dtype_endian='little'
 *         if dtype_endian == '|': dtype_endian=None             # <<<<<<<<<<<<<<
 *         if dtype_endian is not None and dtype_endian != endian:
 *             # endian keyword prevails, issue warning
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_dtype_endian, __pyx_kp_s__52, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {
    __Pyx_INCREF(Py_None);
    __Pyx_DECREF_SET(__pyx_v_dtype_endian, Py_None);
    goto __pyx_L11;
  }
  __pyx_L11:;

  /* "netCDF4.pyx":2437
 *         if dtype_endian == '<': dtype_endian='little'
 *         if dtype_endian == '|': dtype_endian=None
 *         if dtype_endian is not None and dtype_endian != endian:             # <<<<<<<<<<<<<<
 *             # endian keyword prevails, issue warning
 *             msg = 'endian-ness of dtype and endian kwarg do not match, using endian kwarg'
 */
  __pyx_t_5 = (__pyx_v_dtype_endian != Py_None);
  if (__pyx_t_5) {
    __pyx_t_7 = PyObject_RichCompare(__pyx_v_dtype_endian, __pyx_v_endian, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_5;
  }
  if (__pyx_t_4) {

    /* "netCDF4.pyx":2439
 *         if dtype_endian is not None and dtype_endian != endian:
 *             # endian keyword prevails, issue warning
 *             msg = 'endian-ness of dtype and endian kwarg do not match, using endian kwarg'             # <<<<<<<<<<<<<<
 *             #msg = 'endian-ness of dtype and endian kwarg do not match, dtype over-riding endian kwarg'
 *             warnings.warn(msg)
 */
    __Pyx_INCREF(__pyx_kp_s_endian_ness_of_dtype_and_endian);
    __pyx_v_msg = __pyx_kp_s_endian_ness_of_dtype_and_endian;

    /* "netCDF4.pyx":2441
 *             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 = 2441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_warn); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __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 = 2441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_msg);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_msg);
    __Pyx_GIVEREF(__pyx_v_msg);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "netCDF4.pyx":2444
 *             #endian = dtype_endian # dtype prevails
 *         # check validity of datatype.
 *         self._isprimitive = False             # <<<<<<<<<<<<<<
 *         self._iscompound = False
 *         self._isvlen = False
 */
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  __Pyx_GOTREF(__pyx_v_self->_isprimitive);
  __Pyx_DECREF(__pyx_v_self->_isprimitive);
  __pyx_v_self->_isprimitive = Py_False;

  /* "netCDF4.pyx":2445
 *         # 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":2446
 *         self._isprimitive = False
 *         self._iscompound = False
 *         self._isvlen = False             # <<<<<<<<<<<<<<
 *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
 *                       or datatype == str:
 */
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  __Pyx_GOTREF(__pyx_v_self->_isvlen);
  __Pyx_DECREF(__pyx_v_self->_isvlen);
  __pyx_v_self->_isvlen = Py_False;

  /* "netCDF4.pyx":2447
 *         self._iscompound = False
 *         self._isvlen = False
 *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\             # <<<<<<<<<<<<<<
 *                       or datatype == str:
 *             if isinstance(datatype, CompoundType):
 */
  __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_CompoundType)); 
  if (!__pyx_t_4) {

    /* "netCDF4.pyx":2448
 *         self._isvlen = False
 *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
 *                       or datatype == str:             # <<<<<<<<<<<<<<
 *             if isinstance(datatype, CompoundType):
 *                self._iscompound = True
 */
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_VLType)); 
    if (!__pyx_t_5) {
      __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 = 2448; __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 = 2448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __pyx_t_2;
    } else {
      __pyx_t_1 = __pyx_t_5;
    }
    __pyx_t_5 = __pyx_t_1;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  if (__pyx_t_5) {

    /* "netCDF4.pyx":2449
 *         if isinstance(datatype, CompoundType) or isinstance(datatype, VLType)\
 *                       or datatype == str:
 *             if isinstance(datatype, CompoundType):             # <<<<<<<<<<<<<<
 *                self._iscompound = True
 *                self._cmptype = datatype
 */
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_CompoundType)); 
    __pyx_t_4 = (__pyx_t_5 != 0);
    if (__pyx_t_4) {

      /* "netCDF4.pyx":2450
 *                       or datatype == str:
 *             if isinstance(datatype, CompoundType):
 *                self._iscompound = True             # <<<<<<<<<<<<<<
 *                self._cmptype = datatype
 *             if isinstance(datatype, VLType) or datatype==str:
 */
      __Pyx_INCREF(Py_True);
      __Pyx_GIVEREF(Py_True);
      __Pyx_GOTREF(__pyx_v_self->_iscompound);
      __Pyx_DECREF(__pyx_v_self->_iscompound);
      __pyx_v_self->_iscompound = Py_True;

      /* "netCDF4.pyx":2451
 *             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_L14;
    }
    __pyx_L14:;

    /* "netCDF4.pyx":2452
 *                self._iscompound = True
 *                self._cmptype = datatype
 *             if isinstance(datatype, VLType) or datatype==str:             # <<<<<<<<<<<<<<
 *                self._isvlen = True
 *                self._vltype = datatype
 */
    __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_datatype, ((PyObject*)__pyx_ptype_7netCDF4_VLType)); 
    if (!__pyx_t_4) {
      __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 = 2452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __pyx_t_5;
    } else {
      __pyx_t_1 = __pyx_t_4;
    }
    if (__pyx_t_1) {

      /* "netCDF4.pyx":2453
 *                self._cmptype = datatype
 *             if isinstance(datatype, VLType) or datatype==str:
 *                self._isvlen = True             # <<<<<<<<<<<<<<
 *                self._vltype = datatype
 *             if datatype==str:
 */
      __Pyx_INCREF(Py_True);
      __Pyx_GIVEREF(Py_True);
      __Pyx_GOTREF(__pyx_v_self->_isvlen);
      __Pyx_DECREF(__pyx_v_self->_isvlen);
      __pyx_v_self->_isvlen = Py_True;

      /* "netCDF4.pyx":2454
 *             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_L15;
    }
    __pyx_L15:;

    /* "netCDF4.pyx":2455
 *                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 = 2455; __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 = 2455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "netCDF4.pyx":2456
 *                self._vltype = datatype
 *             if datatype==str:
 *                 if grp.data_model != 'NETCDF4':             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         'Variable length strings are only supported for the '
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2456; __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 = 2456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "netCDF4.pyx":2457
 *             if datatype==str:
 *                 if grp.data_model != 'NETCDF4':
 *                     raise ValueError(             # <<<<<<<<<<<<<<
 *                         'Variable length strings are only supported for the '
 *                         'NETCDF4 format. For other formats, consider using '
 */
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2457; __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 = 2457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":2462
 *                         'netCDF4.stringtochar to convert string arrays into '
 *                         'character arrays with an additional dimension.')
 *                 datatype = VLType(self._grp, str, None)             # <<<<<<<<<<<<<<
 *                 self._vltype = datatype
 *             xtype = datatype._nc_type
 */
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __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_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_VLType)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_datatype, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "netCDF4.pyx":2463
 *                         'character arrays with an additional dimension.')
 *                 datatype = VLType(self._grp, str, None)
 *                 self._vltype = datatype             # <<<<<<<<<<<<<<
 *             xtype = datatype._nc_type
 *             # dtype variable attribute is a numpy datatype object.
 */
      __Pyx_INCREF(__pyx_v_datatype);
      __Pyx_GIVEREF(__pyx_v_datatype);
      __Pyx_GOTREF(__pyx_v_self->_vltype);
      __Pyx_DECREF(__pyx_v_self->_vltype);
      __pyx_v_self->_vltype = __pyx_v_datatype;
      goto __pyx_L16;
    }
    __pyx_L16:;

    /* "netCDF4.pyx":2464
 *                 datatype = VLType(self._grp, str, None)
 *                 self._vltype = datatype
 *             xtype = datatype._nc_type             # <<<<<<<<<<<<<<
 *             # dtype variable attribute is a numpy datatype object.
 *             self.dtype = datatype.dtype
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_nc_type); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_PyInt_As_nc_type(__pyx_t_7); if (unlikely((__pyx_t_9 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_xtype = __pyx_t_9;

    /* "netCDF4.pyx":2466
 *             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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->dtype);
    __Pyx_DECREF(__pyx_v_self->dtype);
    __pyx_v_self->dtype = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L13;
  }

  /* "netCDF4.pyx":2467
 *             # dtype variable attribute is a numpy datatype object.
 *             self.dtype = datatype.dtype
 *         elif datatype.str[1:] in _supportedtypes:             # <<<<<<<<<<<<<<
 *             self._isprimitive = True
 *             # find netCDF primitive data type corresponding to
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_datatype, __pyx_n_s_str); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_7, 1, 0, NULL, NULL, &__pyx_slice__54, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_t_3, __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = (__pyx_t_1 != 0);
  if (__pyx_t_4) {

    /* "netCDF4.pyx":2468
 *             self.dtype = datatype.dtype
 *         elif datatype.str[1:] in _supportedtypes:
 *             self._isprimitive = True             # <<<<<<<<<<<<<<
 *             # find netCDF primitive data type corresponding to
 *             # specified numpy data type.
 */
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    __Pyx_GOTREF(__pyx_v_self->_isprimitive);
    __Pyx_DECREF(__pyx_v_self->_isprimitive);
    __pyx_v_self->_isprimitive = Py_True;

    /* "netCDF4.pyx":2471
 *             # 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_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __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 = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_3, 1, 0, NULL, NULL, &__pyx_slice__55, 1, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_GetItem(__pyx_t_7, __pyx_t_8); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __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_8); __pyx_t_8 = 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 = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_xtype = __pyx_t_9;

    /* "netCDF4.pyx":2473
 *             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_L13;
  }
  /*else*/ {

    /* "netCDF4.pyx":2475
 *             self.dtype = datatype
 *         else:
 *             raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype))             # <<<<<<<<<<<<<<
 *         if 'id' in kwargs:
 *             self._varid = kwargs['id']
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_supportedtypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2475; __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 = 2475; __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_INCREF(__pyx_v_datatype);
    PyTuple_SET_ITEM(__pyx_t_8, 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_8); 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_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 = 2475; __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 = 2475; __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 = 2475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L13:;

  /* "netCDF4.pyx":2476
 *         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 = (__Pyx_PyDict_Contains(__pyx_n_s_id, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = (__pyx_t_4 != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":2477
 *             raise TypeError('illegal primitive data type, must be one of %s, got %s' % (_supportedtypes,datatype))
 *         if 'id' in kwargs:
 *             self._varid = kwargs['id']             # <<<<<<<<<<<<<<
 *         else:
 *             bytestr = _strencode(name)
 */
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_id); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2477; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_self->_varid = __pyx_t_6;
    goto __pyx_L18;
  }
  /*else*/ {

    /* "netCDF4.pyx":2479
 *             self._varid = kwargs['id']
 *         else:
 *             bytestr = _strencode(name)             # <<<<<<<<<<<<<<
 *             varname = bytestr
 *             ndims = len(dimensions)
 */
    __pyx_t_3 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_bytestr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "netCDF4.pyx":2480
 *         else:
 *             bytestr = _strencode(name)
 *             varname = bytestr             # <<<<<<<<<<<<<<
 *             ndims = len(dimensions)
 *             # find dimension ids.
 */
    __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_varname = __pyx_t_10;

    /* "netCDF4.pyx":2481
 *             bytestr = _strencode(name)
 *             varname = bytestr
 *             ndims = len(dimensions)             # <<<<<<<<<<<<<<
 *             # find dimension ids.
 *             if ndims:
 */
    __pyx_t_11 = PyObject_Length(__pyx_v_dimensions); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_ndims = __pyx_t_11;

    /* "netCDF4.pyx":2483
 *             ndims = len(dimensions)
 *             # find dimension ids.
 *             if ndims:             # <<<<<<<<<<<<<<
 *                 for n from 0 <= n < ndims:
 *                     dimname = dimensions[n]
 */
    __pyx_t_1 = (__pyx_v_ndims != 0);
    if (__pyx_t_1) {

      /* "netCDF4.pyx":2484
 *             # 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_6 = __pyx_v_ndims;
      for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_6; __pyx_v_n++) {

        /* "netCDF4.pyx":2485
 *             if ndims:
 *                 for n from 0 <= n < ndims:
 *                     dimname = dimensions[n]             # <<<<<<<<<<<<<<
 *                     # look for dimension in this group, and if not
 *                     # found there, look in parent (and it's parent, etc, back to root).
 */
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_dimensions, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2485; __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":2488
 *                     # 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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); 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_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_grp);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_grp);
        __Pyx_GIVEREF(__pyx_v_grp);
        __Pyx_INCREF(__pyx_v_dimname);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_dimname);
        __Pyx_GIVEREF(__pyx_v_dimname);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "netCDF4.pyx":2489
 *                     # 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_4 = (__pyx_t_1 != 0);
        if (__pyx_t_4) {

          /* "netCDF4.pyx":2490
 *                     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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_path); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_dimname);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_dimname);
          __Pyx_GIVEREF(__pyx_v_dimname);
          PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_7);
          __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_dimension_s_not_defined_in_group, __pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __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 = 2490; __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 = 0;
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2490; __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 = 2490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "netCDF4.pyx":2491
 *                     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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_dimid); 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_t_12 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__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_v_dimids[__pyx_v_n]) = __pyx_t_12;
      }
      goto __pyx_L19;
    }
    __pyx_L19:;

    /* "netCDF4.pyx":2495
 *             # 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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_4) {
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2495; __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_8); __pyx_t_8 = 0;
      goto __pyx_L23;
    }
    __pyx_L23:;

    /* "netCDF4.pyx":2497
 *             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_4 = (__pyx_v_ndims != 0);
    if (__pyx_t_4) {

      /* "netCDF4.pyx":2498
 *             # define variable.
 *             if ndims:
 *                 ierr = nc_def_var(self._grpid, varname, xtype, ndims,             # <<<<<<<<<<<<<<
 *                                   dimids, &self._varid)
 *             else: # a scalar variable.
 */
      __pyx_v_ierr = nc_def_var(__pyx_v_self->_grpid, __pyx_v_varname, __pyx_v_xtype, __pyx_v_ndims, __pyx_v_dimids, (&__pyx_v_self->_varid));
      goto __pyx_L24;
    }
    /*else*/ {

      /* "netCDF4.pyx":2501
 *                                   dimids, &self._varid)
 *             else: # a scalar variable.
 *                 ierr = nc_def_var(self._grpid, varname, xtype, ndims,             # <<<<<<<<<<<<<<
 *                                   NULL, &self._varid)
 *             # set chunk cache size if desired
 */
      __pyx_v_ierr = nc_def_var(__pyx_v_self->_grpid, __pyx_v_varname, __pyx_v_xtype, __pyx_v_ndims, NULL, (&__pyx_v_self->_varid));
    }
    __pyx_L24:;

    /* "netCDF4.pyx":2507
 *             # 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_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_startswith); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2507; __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_PyObject_Call(__pyx_t_7, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_4) {
      __pyx_t_1 = (__pyx_v_chunk_cache != Py_None);
      __pyx_t_5 = __pyx_t_1;
    } else {
      __pyx_t_5 = __pyx_t_4;
    }
    if (__pyx_t_5) {

      /* "netCDF4.pyx":2508
 *             # open.
 *             if grp.data_model.startswith('NETCDF4') and chunk_cache is not None:
 *                 ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,             # <<<<<<<<<<<<<<
 *                         &nelemsp, &preemptionp)
 *                 if ierr != NC_NOERR:
 */
      __pyx_v_ierr = nc_get_var_chunk_cache(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_sizep), (&__pyx_v_nelemsp), (&__pyx_v_preemptionp));

      /* "netCDF4.pyx":2510
 *                 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_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_5) {

        /* "netCDF4.pyx":2511
 *                         &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_8 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2511; __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 = 2511; __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 = 2511; __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 = 2511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":2513
 *                     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 = 2513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_sizep = __pyx_t_13;

      /* "netCDF4.pyx":2514
 *                 # reset chunk cache size, leave other parameters unchanged.
 *                 sizep = chunk_cache
 *                 ierr = nc_set_var_chunk_cache(self._grpid, self._varid, sizep,             # <<<<<<<<<<<<<<
 *                         nelemsp, preemptionp)
 *                 if ierr != NC_NOERR:
 */
      __pyx_v_ierr = nc_set_var_chunk_cache(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_sizep, __pyx_v_nelemsp, __pyx_v_preemptionp);

      /* "netCDF4.pyx":2516
 *                 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_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_5) {

        /* "netCDF4.pyx":2517
 *                         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_8 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2517; __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 = 2517; __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 = 2517; __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 = 2517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      goto __pyx_L25;
    }
    __pyx_L25:;

    /* "netCDF4.pyx":2518
 *                 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_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_5) {

      /* "netCDF4.pyx":2519
 *                     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_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_5) {
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2519; __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_7); __pyx_t_7 = 0;
        goto __pyx_L29;
      }
      __pyx_L29:;

      /* "netCDF4.pyx":2520
 *             if ierr != NC_NOERR:
 *                 if grp.data_model != 'NETCDF4': grp._enddef()
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *             # set zlib, shuffle, chunking, fletcher32 and endian
 *             # variable settings.
 */
      __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
      __pyx_t_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 = 2520; __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 = 2520; __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 = 2520; __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 = 2520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":2527
 *             # 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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_NETCDF4, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_5) {
      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_NETCDF4_CLASSIC, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = __pyx_t_4;
    } else {
      __pyx_t_1 = __pyx_t_5;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = (__pyx_t_1 != 0);
    if (__pyx_t_5) {

      /* "netCDF4.pyx":2529
 *             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_5 = __Pyx_PyObject_IsTrue(__pyx_v_zlib); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_5) {
        __pyx_t_1 = (__pyx_v_ndims != 0);
      } else {
        __pyx_t_1 = __pyx_t_5;
      }
      if (__pyx_t_1) {

        /* "netCDF4.pyx":2530
 *                 # 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_6 = __Pyx_PyInt_As_int(__pyx_v_complevel); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_v_ideflate_level = __pyx_t_6;

        /* "netCDF4.pyx":2531
 *                 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_1 = __Pyx_PyObject_IsTrue(__pyx_v_shuffle); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_1) {

          /* "netCDF4.pyx":2532
 *                     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_L32;
        }
        /*else*/ {

          /* "netCDF4.pyx":2534
 *                         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_L32:;

        /* "netCDF4.pyx":2535
 *                     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_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
        if (__pyx_t_1) {

          /* "netCDF4.pyx":2536
 *                         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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2536; __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 = 2536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (__pyx_t_1) {
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2536; __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_8); __pyx_t_8 = 0;
            goto __pyx_L34;
          }
          __pyx_L34:;

          /* "netCDF4.pyx":2537
 *                     if ierr != NC_NOERR:
 *                         if grp.data_model != 'NETCDF4': grp._enddef()
 *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *                 # set checksum.
 *                 if fletcher32 and ndims: # don't bother for scalar variable
 */
          __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
          __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2537; __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 = 2537; __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 = 2537; __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 = 2537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L31;
      }
      __pyx_L31:;

      /* "netCDF4.pyx":2539
 *                         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_1 = __Pyx_PyObject_IsTrue(__pyx_v_fletcher32); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_1) {
        __pyx_t_5 = (__pyx_v_ndims != 0);
      } else {
        __pyx_t_5 = __pyx_t_1;
      }
      if (__pyx_t_5) {

        /* "netCDF4.pyx":2540
 *                 # set checksum.
 *                 if fletcher32 and ndims: # don't bother for scalar variable
 *                     ierr = nc_def_var_fletcher32(self._grpid, self._varid, 1)             # <<<<<<<<<<<<<<
 *                     if ierr != NC_NOERR:
 *                         if grp.data_model != 'NETCDF4': grp._enddef()
 */
        __pyx_v_ierr = nc_def_var_fletcher32(__pyx_v_self->_grpid, __pyx_v_self->_varid, 1);

        /* "netCDF4.pyx":2541
 *                 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_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
        if (__pyx_t_5) {

          /* "netCDF4.pyx":2542
 *                     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_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (__pyx_t_5) {
            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2542; __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_7); __pyx_t_7 = 0;
            goto __pyx_L37;
          }
          __pyx_L37:;

          /* "netCDF4.pyx":2543
 *                     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_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 = 2543; __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 = 2543; __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 = 2543; __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 = 2543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L35;
      }
      __pyx_L35:;

      /* "netCDF4.pyx":2545
 *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *                 # set chunking stuff.
 *                 if ndims: # don't bother for scalar variable.             # <<<<<<<<<<<<<<
 *                     if contiguous:
 *                         icontiguous = NC_CONTIGUOUS
 */
      __pyx_t_5 = (__pyx_v_ndims != 0);
      if (__pyx_t_5) {

        /* "netCDF4.pyx":2546
 *                 # set chunking stuff.
 *                 if ndims: # don't bother for scalar variable.
 *                     if contiguous:             # <<<<<<<<<<<<<<
 *                         icontiguous = NC_CONTIGUOUS
 *                         if chunksizes is not None:
 */
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_contiguous); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_5) {

          /* "netCDF4.pyx":2547
 *                 if ndims: # don't bother for scalar variable.
 *                     if contiguous:
 *                         icontiguous = NC_CONTIGUOUS             # <<<<<<<<<<<<<<
 *                         if chunksizes is not None:
 *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')
 */
          __pyx_v_icontiguous = NC_CONTIGUOUS;

          /* "netCDF4.pyx":2548
 *                     if contiguous:
 *                         icontiguous = NC_CONTIGUOUS
 *                         if chunksizes is not None:             # <<<<<<<<<<<<<<
 *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')
 *                     else:
 */
          __pyx_t_5 = (__pyx_v_chunksizes != Py_None);
          __pyx_t_1 = (__pyx_t_5 != 0);
          if (__pyx_t_1) {

            /* "netCDF4.pyx":2549
 *                         icontiguous = NC_CONTIGUOUS
 *                         if chunksizes is not None:
 *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')             # <<<<<<<<<<<<<<
 *                     else:
 *                         icontiguous = NC_CHUNKED
 */
            __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2549; __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 = 2549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          goto __pyx_L39;
        }
        /*else*/ {

          /* "netCDF4.pyx":2551
 *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')
 *                     else:
 *                         icontiguous = NC_CHUNKED             # <<<<<<<<<<<<<<
 *                     if chunksizes is None:
 *                         chunksizesp = NULL
 */
          __pyx_v_icontiguous = NC_CHUNKED;
        }
        __pyx_L39:;

        /* "netCDF4.pyx":2552
 *                     else:
 *                         icontiguous = NC_CHUNKED
 *                     if chunksizes is None:             # <<<<<<<<<<<<<<
 *                         chunksizesp = NULL
 *                     else:
 */
        __pyx_t_1 = (__pyx_v_chunksizes == Py_None);
        __pyx_t_5 = (__pyx_t_1 != 0);
        if (__pyx_t_5) {

          /* "netCDF4.pyx":2553
 *                         icontiguous = NC_CHUNKED
 *                     if chunksizes is None:
 *                         chunksizesp = NULL             # <<<<<<<<<<<<<<
 *                     else:
 *                         if len(chunksizes) != len(dimensions):
 */
          __pyx_v_chunksizesp = NULL;
          goto __pyx_L41;
        }
        /*else*/ {

          /* "netCDF4.pyx":2555
 *                         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 = 2555; __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 = 2555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_5 = ((__pyx_t_11 != __pyx_t_14) != 0);
          if (__pyx_t_5) {

            /* "netCDF4.pyx":2556
 *                     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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (__pyx_t_5) {
              __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2556; __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_8); __pyx_t_8 = 0;
              goto __pyx_L43;
            }
            __pyx_L43:;

            /* "netCDF4.pyx":2557
 *                         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_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; __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 = 2557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }

          /* "netCDF4.pyx":2558
 *                             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":2559
 *                             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_6 = __pyx_v_ndims;
          for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_6; __pyx_v_n++) {

            /* "netCDF4.pyx":2560
 *                         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_8 = __Pyx_GetItemInt(__pyx_v_chunksizes, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2560; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_13 = __Pyx_PyInt_As_size_t(__pyx_t_8); if (unlikely((__pyx_t_13 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            (__pyx_v_chunksizesp[__pyx_v_n]) = __pyx_t_13;
          }
        }
        __pyx_L41:;

        /* "netCDF4.pyx":2561
 *                         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_5 = (__pyx_v_chunksizes != Py_None);
        if (!__pyx_t_5) {
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_contiguous); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_4 = __pyx_t_1;
        } else {
          __pyx_t_4 = __pyx_t_5;
        }
        if (__pyx_t_4) {

          /* "netCDF4.pyx":2562
 *                             chunksizesp[n] = chunksizes[n]
 *                     if chunksizes is not None or contiguous:
 *                         ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp)             # <<<<<<<<<<<<<<
 *                         free(chunksizesp)
 *                         if ierr != NC_NOERR:
 */
          __pyx_v_ierr = nc_def_var_chunking(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_icontiguous, __pyx_v_chunksizesp);

          /* "netCDF4.pyx":2563
 *                     if chunksizes is not None or contiguous:
 *                         ierr = nc_def_var_chunking(self._grpid, self._varid, icontiguous, chunksizesp)
 *                         free(chunksizesp)             # <<<<<<<<<<<<<<
 *                         if ierr != NC_NOERR:
 *                             if grp.data_model != 'NETCDF4': grp._enddef()
 */
          free(__pyx_v_chunksizesp);

          /* "netCDF4.pyx":2564
 *                         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_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
          if (__pyx_t_4) {

            /* "netCDF4.pyx":2565
 *                         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_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (__pyx_t_4) {
              __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2565; __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_7); __pyx_t_7 = 0;
              goto __pyx_L48;
            }
            __pyx_L48:;

            /* "netCDF4.pyx":2566
 *                         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_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 = 2566; __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 = 2566; __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 = 2566; __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 = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          goto __pyx_L46;
        }
        __pyx_L46:;
        goto __pyx_L38;
      }
      __pyx_L38:;

      /* "netCDF4.pyx":2568
 *                             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_4 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_4) {

        /* "netCDF4.pyx":2569
 *                 # 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_L49;
      }

      /* "netCDF4.pyx":2570
 *                 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_4 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_4) {

        /* "netCDF4.pyx":2571
 *                     ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_LITTLE)
 *                 elif endian == 'big':
 *                     ierr = nc_def_var_endian(self._grpid, self._varid, NC_ENDIAN_BIG)             # <<<<<<<<<<<<<<
 *                 elif endian == 'native':
 *                     pass # this is the default format.
 */
        __pyx_v_ierr = nc_def_var_endian(__pyx_v_self->_grpid, __pyx_v_self->_varid, NC_ENDIAN_BIG);
        goto __pyx_L49;
      }

      /* "netCDF4.pyx":2572
 *                 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_PyString_Equals(__pyx_v_endian, __pyx_n_s_native, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_4) {
        goto __pyx_L49;
      }
      /*else*/ {

        /* "netCDF4.pyx":2575
 *                     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_7 = __Pyx_PyString_Format(__pyx_kp_s_endian_keyword_argument_must_be, __pyx_v_endian); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2575; __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 = 2575; __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 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2575; __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 = 2575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L49:;

      /* "netCDF4.pyx":2576
 *                 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_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_4) {

        /* "netCDF4.pyx":2577
 *                     raise ValueError("'endian' keyword argument must be 'little','big' or 'native', got '%s'" % endian)
 *                 if ierr != NC_NOERR:
 *                     if grp.data_model != 'NETCDF4': grp._enddef()             # <<<<<<<<<<<<<<
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             else:
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_4) {
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2577; __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_8); __pyx_t_8 = 0;
          goto __pyx_L51;
        }
        __pyx_L51:;

        /* "netCDF4.pyx":2578
 *                 if ierr != NC_NOERR:
 *                     if grp.data_model != 'NETCDF4': grp._enddef()
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *             else:
 *                 if endian != 'native':
 */
        __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
        __pyx_t_8 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2578; __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 = 2578; __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 = 2578; __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 = 2578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      goto __pyx_L30;
    }
    /*else*/ {

      /* "netCDF4.pyx":2580
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             else:
 *                 if endian != 'native':             # <<<<<<<<<<<<<<
 *                     msg="only endian='native' allowed for NETCDF3 files"
 *                     raise RuntimeError(msg)
 */
      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_endian, __pyx_n_s_native, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_4) {

        /* "netCDF4.pyx":2581
 *             else:
 *                 if endian != 'native':
 *                     msg="only endian='native' allowed for NETCDF3 files"             # <<<<<<<<<<<<<<
 *                     raise RuntimeError(msg)
 *             # set a fill value for this variable if fill_value keyword
 */
        __Pyx_INCREF(__pyx_kp_s_only_endian_native_allowed_for_N);
        __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_kp_s_only_endian_native_allowed_for_N);

        /* "netCDF4.pyx":2582
 *                 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_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_msg);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_msg);
        __Pyx_GIVEREF(__pyx_v_msg);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2582; __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 = 2582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
    }
    __pyx_L30:;

    /* "netCDF4.pyx":2586
 *             # 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_4 = (__pyx_v_fill_value != Py_None);
    __pyx_t_5 = (__pyx_t_4 != 0);
    if (__pyx_t_5) {

      /* "netCDF4.pyx":2587
 *             # 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.
 *                     ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL)
 */
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_fill_value); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = ((!__pyx_t_5) != 0);
      if (__pyx_t_4) {
        __pyx_t_7 = ((PyObject*)&PyBool_Type);
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_5 = PyObject_IsInstance(__pyx_v_fill_value, __pyx_t_7); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_1 = (__pyx_t_5 != 0);
      } else {
        __pyx_t_1 = __pyx_t_4;
      }
      if (__pyx_t_1) {

        /* "netCDF4.pyx":2589
 *                 if not fill_value and isinstance(fill_value,bool):
 *                     # no filling for this variable if fill_value==False.
 *                     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);

        /* "netCDF4.pyx":2590
 *                     # no filling for this variable if fill_value==False.
 *                     ierr = nc_def_var_fill(self._grpid, self._varid, 1, NULL)
 *                     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                         if grp.data_model != 'NETCDF4': grp._enddef()
 *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
        __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
        if (__pyx_t_1) {

          /* "netCDF4.pyx":2591
 *                     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_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __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 = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (__pyx_t_1) {
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; __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_8); __pyx_t_8 = 0;
            goto __pyx_L56;
          }
          __pyx_L56:;

          /* "netCDF4.pyx":2592
 *                     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_8 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2592; __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 = 2592; __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 = 2592; __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 = 2592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L54;
      }
      /*else*/ {

        /* "netCDF4.pyx":2595
 *                 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_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_1) {

          /* "netCDF4.pyx":2596
 *                     # cast fill_value to type of variable.
 *                     if self._isprimitive:
 *                         fillval = numpy.array(fill_value, self.dtype)             # <<<<<<<<<<<<<<
 *                         _set_att(self._grp, self._varid, '_FillValue', fillval)
 *                     else:
 */
          __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); 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);
          __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 = 2596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_fill_value);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_fill_value);
          __Pyx_GIVEREF(__pyx_v_fill_value);
          __Pyx_INCREF(__pyx_v_self->dtype);
          PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_self->dtype);
          __Pyx_GIVEREF(__pyx_v_self->dtype);
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, 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_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_v_fillval = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "netCDF4.pyx":2597
 *                     if self._isprimitive:
 *                         fillval = numpy.array(fill_value, self.dtype)
 *                         _set_att(self._grp, self._varid, '_FillValue', fillval)             # <<<<<<<<<<<<<<
 *                     else:
 *                         raise AttributeError("cannot set _FillValue attribute for VLEN or compound variable")
 */
          __pyx_t_3 = __pyx_v_self->_grp;
          __Pyx_INCREF(__pyx_t_3);
          __pyx_t_8 = __pyx_f_7netCDF4__set_att(__pyx_t_3, __pyx_v_self->_varid, __pyx_n_s_FillValue, __pyx_v_fillval); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L57;
        }
        /*else*/ {

          /* "netCDF4.pyx":2599
 *                         _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_8 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; __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 = 2599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_L57:;
      }
      __pyx_L54:;
      goto __pyx_L53;
    }
    __pyx_L53:;

    /* "netCDF4.pyx":2600
 *                     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_1 = (__pyx_v_least_significant_digit != Py_None);
    __pyx_t_4 = (__pyx_t_1 != 0);
    if (__pyx_t_4) {

      /* "netCDF4.pyx":2601
 *                         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 = 2601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L58;
    }
    __pyx_L58:;

    /* "netCDF4.pyx":2603
 *                 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_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_4) {
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); 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_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L59;
    }
    __pyx_L59:;
  }
  __pyx_L18:;

  /* "netCDF4.pyx":2605
 *             if grp.data_model != 'NETCDF4': grp._enddef()
 *         # count how many unlimited dimensions there are.
 *         self._nunlimdim = 0             # <<<<<<<<<<<<<<
 *         for dimname in dimensions:
 *             # look in current group, and parents for dim.
 */
  __pyx_v_self->_nunlimdim = 0;

  /* "netCDF4.pyx":2606
 *         # count how many unlimited dimensions there are.
 *         self._nunlimdim = 0
 *         for dimname in dimensions:             # <<<<<<<<<<<<<<
 *             # look in current group, and parents for dim.
 *             dim = _find_dim(self._grp, dimname)
 */
  if (PyList_CheckExact(__pyx_v_dimensions) || PyTuple_CheckExact(__pyx_v_dimensions)) {
    __pyx_t_3 = __pyx_v_dimensions; __Pyx_INCREF(__pyx_t_3); __pyx_t_14 = 0;
    __pyx_t_15 = NULL;
  } else {
    __pyx_t_14 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_dimensions); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_15 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_8 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_8); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_8); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_8 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_8 = __pyx_t_15(__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 = 2606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_8);
    }
    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "netCDF4.pyx":2608
 *         for dimname in dimensions:
 *             # look in current group, and parents for dim.
 *             dim = _find_dim(self._grp, dimname)             # <<<<<<<<<<<<<<
 *             if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1
 *         # set ndim attribute (number of dimensions).
 */
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PyTuple_New(2); 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_INCREF(__pyx_v_self->_grp);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self->_grp);
    __Pyx_GIVEREF(__pyx_v_self->_grp);
    __Pyx_INCREF(__pyx_v_dimname);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_dimname);
    __Pyx_GIVEREF(__pyx_v_dimname);
    __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_16);
    __pyx_t_16 = 0;

    /* "netCDF4.pyx":2609
 *             # look in current group, and parents for dim.
 *             dim = _find_dim(self._grp, dimname)
 *             if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1             # <<<<<<<<<<<<<<
 *         # set ndim attribute (number of dimensions).
 *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
 */
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_4) {
      __pyx_v_self->_nunlimdim = (__pyx_v_self->_nunlimdim + 1);
      goto __pyx_L62;
    }
    __pyx_L62:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "netCDF4.pyx":2611
 *             if dim.isunlimited(): self._nunlimdim = self._nunlimdim + 1
 *         # set ndim attribute (number of dimensions).
 *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_inq_varndims(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_numdims));

  /* "netCDF4.pyx":2612
 *         # set ndim attribute (number of dimensions).
 *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         self.ndim = numdims
 */
  __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_4) {

    /* "netCDF4.pyx":2613
 *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *         self.ndim = numdims
 *         self._name = name
 */
    __pyx_t_10 = ((char *)nc_strerror(__pyx_v_ierr));
    __pyx_t_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 = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_7, 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_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_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 = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":2614
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         self.ndim = numdims             # <<<<<<<<<<<<<<
 *         self._name = name
 *         # default for automatically applying scale_factor and
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_numdims); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->ndim);
  __Pyx_DECREF(__pyx_v_self->ndim);
  __pyx_v_self->ndim = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "netCDF4.pyx":2615
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         self.ndim = numdims
 *         self._name = name             # <<<<<<<<<<<<<<
 *         # default for automatically applying scale_factor and
 *         # add_offset, and converting to/from masked arrays is True.
 */
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __Pyx_GOTREF(__pyx_v_self->_name);
  __Pyx_DECREF(__pyx_v_self->_name);
  __pyx_v_self->_name = __pyx_v_name;

  /* "netCDF4.pyx":2618
 *         # default for automatically applying scale_factor and
 *         # add_offset, and converting to/from masked arrays is True.
 *         self.scale = True             # <<<<<<<<<<<<<<
 *         self.mask = True
 * 
 */
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  __Pyx_GOTREF(__pyx_v_self->scale);
  __Pyx_DECREF(__pyx_v_self->scale);
  __pyx_v_self->scale = Py_True;

  /* "netCDF4.pyx":2619
 *         # add_offset, and converting to/from masked arrays is True.
 *         self.scale = True
 *         self.mask = True             # <<<<<<<<<<<<<<
 * 
 *     def __array__(self):
 */
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  __Pyx_GOTREF(__pyx_v_self->mask);
  __Pyx_DECREF(__pyx_v_self->mask);
  __pyx_v_self->mask = Py_True;

  /* "netCDF4.pyx":2393
 *     _isvlen, _grp,_cmptype,_vltype
 * 
 *     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,             # <<<<<<<<<<<<<<
 *             complevel=4, shuffle=True, fletcher32=False, contiguous=False,
 *             chunksizes=None, endian='native', least_significant_digit=None,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __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":2621
 *         self.mask = True
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         # numpy special method that returns a numpy array.
 * 	# allows numpy ufuncs to work faster on Variable objects
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_3__array__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_3__array__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__array__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_2__array__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_2__array__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__array__", 0);

  /* "netCDF4.pyx":2625
 * 	# allows numpy ufuncs to work faster on Variable objects
 * 	# (issue 216).
 *         return self[...]             # <<<<<<<<<<<<<<
 * 
 *     def __str__(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 = 2625; __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":2621
 *         self.mask = True
 * 
 *     def __array__(self):             # <<<<<<<<<<<<<<
 *         # numpy special method that returns a numpy array.
 * 	# allows numpy ufuncs to work faster on Variable objects
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Variable.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2627
 *         return self[...]
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         if python3:
 *            return self.__unicode__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_4__str__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_4__str__(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "netCDF4.pyx":2628
 * 
 *     def __str__(self):
 *         if python3:             # <<<<<<<<<<<<<<
 *            return self.__unicode__()
 *         else:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2628; __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 = 2628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2629
 *     def __str__(self):
 *         if python3:
 *            return self.__unicode__()             # <<<<<<<<<<<<<<
 *         else:
 *            return unicode(self).encode(default_encoding)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2629; __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":2631
 *            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 = 2631; __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_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __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_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __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_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __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 = 2631; __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_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":2627
 *         return self[...]
 * 
 *     def __str__(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_AddTraceback("netCDF4.Variable.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2633
 *            return unicode(self).encode(default_encoding)
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         cdef int ierr, no_fill
 *         if not dir(self._grp):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_7__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_7__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_6__unicode__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_6__unicode__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_v_ierr;
  int __pyx_v_no_fill;
  PyObject *__pyx_v_ncdump_var = NULL;
  PyObject *__pyx_v_dimnames = NULL;
  PyObject *__pyx_v_attrs = NULL;
  PyObject *__pyx_v_unlimdims = NULL;
  PyObject *__pyx_v_dimname = NULL;
  PyObject *__pyx_v_dim = NULL;
  PyObject *__pyx_v_fillval = NULL;
  PyObject *__pyx_v_msg = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  char *__pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  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":2635
 *     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 = 2635; __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 = 2635; __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":2636
 *         cdef int ierr, no_fill
 *         if not dir(self._grp):
 *             return 'Variable object no longer valid'             # <<<<<<<<<<<<<<
 *         ncdump_var = ['%r\n' % type(self)]
 *         dimnames = tuple([_tostr(dimname) for dimname in self.dimensions])
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_s_Variable_object_no_longer_valid);
    __pyx_r = __pyx_kp_s_Variable_object_no_longer_valid;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":2637
 *         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 = 2637; __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 = 2637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_v_ncdump_var = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":2638
 *             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 = 2638; __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 = 2638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_7 && 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 = 2638; __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 = 2638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_5)) {
      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 = 2638; __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 = 2638; __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 = 2638; __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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_tostr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_dimname);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_dimname);
    __Pyx_GIVEREF(__pyx_v_dimname);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2638; __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_8); __pyx_t_8 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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 = 2638; __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":2639
 *         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 = 2639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);

  /* "netCDF4.pyx":2640
 *         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_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
    __pyx_t_1 = __pyx_t_9; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  for (;;) {
    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_9); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_9 = __pyx_t_7(__pyx_t_1);
      if (unlikely(!__pyx_t_9)) {
        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 = 2640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "netCDF4.pyx":2639
 *         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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __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);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __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_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __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_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2639; __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;
  __pyx_v_attrs = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "netCDF4.pyx":2641
 *         attrs = ['    %s: %s\n' % (name,self.getncattr(name)) for name in\
 *                 self.ncattrs()]
 *         if self._iscompound:             # <<<<<<<<<<<<<<
 *             ncdump_var.append('%s %s(%s)\n' %\
 *             ('compound',self._name,', '.join(dimnames)))
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "netCDF4.pyx":2643
 *         if self._iscompound:
 *             ncdump_var.append('%s %s(%s)\n' %\
 *             ('compound',self._name,', '.join(dimnames)))             # <<<<<<<<<<<<<<
 *         elif self._isvlen:
 *             ncdump_var.append('%s %s(%s)\n' %\
 */
    __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_compound);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_compound);
    __Pyx_GIVEREF(__pyx_n_s_compound);
    __Pyx_INCREF(__pyx_v_self->_name);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->_name);
    __Pyx_GIVEREF(__pyx_v_self->_name);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;

    /* "netCDF4.pyx":2642
 *                 self.ncattrs()]
 *         if self._iscompound:
 *             ncdump_var.append('%s %s(%s)\n' %\             # <<<<<<<<<<<<<<
 *             ('compound',self._name,', '.join(dimnames)))
 *         elif self._isvlen:
 */
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L8;
  }

  /* "netCDF4.pyx":2644
 *             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 = 2644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "netCDF4.pyx":2646
 *         elif self._isvlen:
 *             ncdump_var.append('%s %s(%s)\n' %\
 *             ('vlen',self._name,', '.join(dimnames)))             # <<<<<<<<<<<<<<
 *         else:
 *             ncdump_var.append('%s %s(%s)\n' %\
 */
    __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_vlen);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_vlen);
    __Pyx_GIVEREF(__pyx_n_s_vlen);
    __Pyx_INCREF(__pyx_v_self->_name);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->_name);
    __Pyx_GIVEREF(__pyx_v_self->_name);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;

    /* "netCDF4.pyx":2645
 *             ('compound',self._name,', '.join(dimnames)))
 *         elif self._isvlen:
 *             ncdump_var.append('%s %s(%s)\n' %\             # <<<<<<<<<<<<<<
 *             ('vlen',self._name,', '.join(dimnames)))
 *         else:
 */
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s_2, __pyx_t_1); 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_1); __pyx_t_1 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L8;
  }
  /*else*/ {

    /* "netCDF4.pyx":2649
 *         else:
 *             ncdump_var.append('%s %s(%s)\n' %\
 *             (self.dtype,self._name,', '.join(dimnames)))             # <<<<<<<<<<<<<<
 *         ncdump_var = ncdump_var + attrs
 *         if self._iscompound:
 */
    __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_dimnames); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2649; __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);
    __Pyx_INCREF(__pyx_v_self->_name);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->_name);
    __Pyx_GIVEREF(__pyx_v_self->_name);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;

    /* "netCDF4.pyx":2648
 *             ('vlen',self._name,', '.join(dimnames)))
 *         else:
 *             ncdump_var.append('%s %s(%s)\n' %\             # <<<<<<<<<<<<<<
 *             (self.dtype,self._name,', '.join(dimnames)))
 *         ncdump_var = ncdump_var + attrs
 */
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_L8:;

  /* "netCDF4.pyx":2650
 *             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 = 2650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF_SET(__pyx_v_ncdump_var, ((PyObject*)__pyx_t_5));
  __pyx_t_5 = 0;

  /* "netCDF4.pyx":2651
 *             (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 = 2651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "netCDF4.pyx":2652
 *         ncdump_var = ncdump_var + attrs
 *         if self._iscompound:
 *             ncdump_var.append('compound data type: %s\n' % self.dtype)             # <<<<<<<<<<<<<<
 *         elif self._isvlen:
 *             ncdump_var.append('vlen data type: %s\n' % self.dtype)
 */
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_compound_data_type_s, __pyx_v_self->dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9;
  }

  /* "netCDF4.pyx":2653
 *         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 = 2653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "netCDF4.pyx":2654
 *             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 = 2654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_5); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "netCDF4.pyx":2655
 *         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 = 2655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_unlimdims = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "netCDF4.pyx":2656
 *             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 = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_7(__pyx_t_1);
      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 = 2656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_dimname, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "netCDF4.pyx":2657
 *         unlimdims = []
 *         for dimname in self.dimensions:
 *             dim = _find_dim(self._grp, dimname)             # <<<<<<<<<<<<<<
 *             if dim.isunlimited():
 *                 unlimdims.append(dimname)
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_self->_grp);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->_grp);
    __Pyx_GIVEREF(__pyx_v_self->_grp);
    __Pyx_INCREF(__pyx_v_dimname);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_dimname);
    __Pyx_GIVEREF(__pyx_v_dimname);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "netCDF4.pyx":2658
 *         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_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_isunlimited); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_4) {

      /* "netCDF4.pyx":2659
 *             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_10 = __Pyx_PyList_Append(__pyx_v_unlimdims, __pyx_v_dimname); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L12;
    }
    __pyx_L12:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "netCDF4.pyx":2660
 *             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_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__15, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2660; __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_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_path_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_2); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "netCDF4.pyx":2661
 *                 unlimdims.append(dimname)
 *         if (self._grp.path != '/'): ncdump_var.append('path = %s\n' % self._grp.path)
 *         ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))             # <<<<<<<<<<<<<<
 *         ncdump_var.append('current shape = %s\n' % repr(self.shape))
 *         ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
 */
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_unlimdims); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_unlimited_dimensions_s_2, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "netCDF4.pyx":2662
 *         if (self._grp.path != '/'): ncdump_var.append('path = %s\n' % self._grp.path)
 *         ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))
 *         ncdump_var.append('current shape = %s\n' % repr(self.shape))             # <<<<<<<<<<<<<<
 *         ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
 *         if ierr != NC_NOERR:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __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_PyString_Format(__pyx_kp_s_current_shape_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "netCDF4.pyx":2663
 *         ncdump_var.append('unlimited dimensions: %s\n' % ', '.join(unlimdims))
 *         ncdump_var.append('current shape = %s\n' % repr(self.shape))
 *         ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_inq_var_fill(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_no_fill), NULL);

  /* "netCDF4.pyx":2664
 *         ncdump_var.append('current shape = %s\n' % repr(self.shape))
 *         ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         if self._isprimitive:
 */
  __pyx_t_4 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_4) {

    /* "netCDF4.pyx":2665
 *         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_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 = 2665; __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 = 2665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 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_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = 2665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":2666
 *         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 = 2666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "netCDF4.pyx":2667
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         if self._isprimitive:
 *             if no_fill != 1:             # <<<<<<<<<<<<<<
 *                 try:
 *                     fillval = self._FillValue
 */
    __pyx_t_4 = ((__pyx_v_no_fill != 1) != 0);
    if (__pyx_t_4) {

      /* "netCDF4.pyx":2668
 *         if self._isprimitive:
 *             if no_fill != 1:
 *                 try:             # <<<<<<<<<<<<<<
 *                     fillval = self._FillValue
 *                     msg = 'filling on'
 */
      {
        __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":2669
 *             if no_fill != 1:
 *                 try:
 *                     fillval = self._FillValue             # <<<<<<<<<<<<<<
 *                     msg = 'filling on'
 *                 except AttributeError:
 */
          __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 = 2669; __pyx_clineno = __LINE__; goto __pyx_L17_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_v_fillval = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "netCDF4.pyx":2670
 *                 try:
 *                     fillval = self._FillValue
 *                     msg = 'filling on'             # <<<<<<<<<<<<<<
 *                 except AttributeError:
 *                     fillval = default_fillvals[self.dtype.str[1:]]
 */
          __Pyx_INCREF(__pyx_kp_s_filling_on);
          __pyx_v_msg = __pyx_kp_s_filling_on;
        }
        __Pyx_XDECREF(__pyx_t_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_L24_try_end;
        __pyx_L17_error:;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "netCDF4.pyx":2671
 *                     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_15 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_15) {
          __Pyx_AddTraceback("netCDF4.Variable.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2671; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_8);

          /* "netCDF4.pyx":2672
 *                     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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __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 = 2672; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_16 = __Pyx_PyObject_GetSlice(__pyx_t_9, 1, 0, NULL, NULL, &__pyx_slice__60, 1, 0, 1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_9 = PyObject_GetItem(__pyx_t_5, __pyx_t_16); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;};
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF_SET(__pyx_v_fillval, __pyx_t_9);
          __pyx_t_9 = 0;

          /* "netCDF4.pyx":2673
 *                 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_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_16 = __Pyx_PyObject_GetSlice(__pyx_t_9, 1, 0, NULL, NULL, &__pyx_slice__61, 1, 0, 1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_16, __pyx_n_s_u1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
          if (!__pyx_t_4) {
            __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_16, __pyx_n_s_i1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
            __pyx_t_17 = __pyx_t_3;
          } else {
            __pyx_t_17 = __pyx_t_4;
          }
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __pyx_t_4 = (__pyx_t_17 != 0);
          if (__pyx_t_4) {

            /* "netCDF4.pyx":2674
 *                     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_16 = __Pyx_PyString_Format(__pyx_kp_s_filling_on_default__FillValue_of, __pyx_v_fillval); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2674; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_t_16);
            __pyx_t_16 = 0;
            goto __pyx_L27;
          }
          /*else*/ {

            /* "netCDF4.pyx":2676
 *                         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_16 = __Pyx_PyString_Format(__pyx_kp_s_filling_on_default__FillValue_of_2, __pyx_v_fillval); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2676; __pyx_clineno = __LINE__; goto __pyx_L19_except_error;}
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_t_16);
            __pyx_t_16 = 0;
          }
          __pyx_L27:;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L18_exception_handled;
        }
        goto __pyx_L19_except_error;
        __pyx_L19_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_L18_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_L24_try_end:;
      }

      /* "netCDF4.pyx":2677
 *                     else:
 *                         msg = 'filling on, default _FillValue of %s used\n' % fillval
 *                 ncdump_var.append(msg)             # <<<<<<<<<<<<<<
 *             else:
 *                 ncdump_var.append('filling off\n')
 */
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_v_msg); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L16;
    }
    /*else*/ {

      /* "netCDF4.pyx":2679
 *                 ncdump_var.append(msg)
 *             else:
 *                 ncdump_var.append('filling off\n')             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ncdump_var, __pyx_kp_s_filling_off); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L16:;
    goto __pyx_L15;
  }
  __pyx_L15:;

  /* "netCDF4.pyx":2682
 * 
 * 
 *         return ''.join(ncdump_var)             # <<<<<<<<<<<<<<
 * 
 *     def _getdims(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_v_ncdump_var); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "netCDF4.pyx":2633
 *            return unicode(self).encode(default_encoding)
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         cdef int ierr, no_fill
 *         if not dir(self._grp):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("netCDF4.Variable.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ncdump_var);
  __Pyx_XDECREF(__pyx_v_dimnames);
  __Pyx_XDECREF(__pyx_v_attrs);
  __Pyx_XDECREF(__pyx_v_unlimdims);
  __Pyx_XDECREF(__pyx_v_dimname);
  __Pyx_XDECREF(__pyx_v_dim);
  __Pyx_XDECREF(__pyx_v_fillval);
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2684
 *         return ''.join(ncdump_var)
 * 
 *     def _getdims(self):             # <<<<<<<<<<<<<<
 *         # Private method to get variables's dimension names
 *         cdef int ierr, numdims, n, nn
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_9_getdims(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_9_getdims(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_getdims (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_8_getdims(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_8_getdims(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_v_ierr;
  int __pyx_v_numdims;
  int __pyx_v_nn;
  char __pyx_v_namstring[(NC_MAX_NAME + 1)];
  int __pyx_v_dimids[NC_MAX_DIMS];
  PyObject *__pyx_v_dimensions = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_getdims", 0);

  /* "netCDF4.pyx":2690
 *         cdef int dimids[NC_MAX_DIMS]
 *         # get number of dimensions for this variable.
 *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_inq_varndims(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_numdims));

  /* "netCDF4.pyx":2691
 *         # get number of dimensions for this variable.
 *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         # get dimension ids.
 */
  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":2692
 *         ierr = nc_inq_varndims(self._grpid, self._varid, &numdims)
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *         # get dimension ids.
 *         ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)
 */
    __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2692; __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 = 2692; __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 = 2692; __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 = 2692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":2694
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         # get dimension ids.
 *         ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_inq_vardimid(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_dimids);

  /* "netCDF4.pyx":2695
 *         # get dimension ids.
 *         ierr = nc_inq_vardimid(self._grpid, self._varid, dimids)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         # loop over dimensions, retrieve names.
 */
  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":2696
 *         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 = 2696; __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 = 2696; __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 = 2696; __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 = 2696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":2698
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         # loop over dimensions, retrieve names.
 *         dimensions = ()             # <<<<<<<<<<<<<<
 *         for nn from 0 <= nn < numdims:
 *             ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
 */
  __Pyx_INCREF(__pyx_empty_tuple);
  __pyx_v_dimensions = __pyx_empty_tuple;

  /* "netCDF4.pyx":2699
 *         # loop over dimensions, retrieve names.
 *         dimensions = ()
 *         for nn from 0 <= nn < numdims:             # <<<<<<<<<<<<<<
 *             ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
 *             if ierr != NC_NOERR:
 */
  __pyx_t_5 = __pyx_v_numdims;
  for (__pyx_v_nn = 0; __pyx_v_nn < __pyx_t_5; __pyx_v_nn++) {

    /* "netCDF4.pyx":2700
 *         dimensions = ()
 *         for nn from 0 <= nn < numdims:
 *             ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)             # <<<<<<<<<<<<<<
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
    __pyx_v_ierr = nc_inq_dimname(__pyx_v_self->_grpid, (__pyx_v_dimids[__pyx_v_nn]), __pyx_v_namstring);

    /* "netCDF4.pyx":2701
 *         for nn from 0 <= nn < numdims:
 *             ierr = nc_inq_dimname(self._grpid, dimids[nn], namstring)
 *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             name = namstring.decode(default_encoding,unicode_error)
 */
    __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_1) {

      /* "netCDF4.pyx":2702
 *             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 = 2702; __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 = 2702; __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 = 2702; __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 = 2702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":2703
 *             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_3 = __Pyx_PyBytes_FromString(__pyx_v_namstring); 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_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2703; __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_GetModuleGlobalName(__pyx_n_s_default_encoding); 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 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); 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_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2703; __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);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_3 = 0;
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "netCDF4.pyx":2704
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             name = namstring.decode(default_encoding,unicode_error)
 *             dimensions = dimensions + (name,)             # <<<<<<<<<<<<<<
 *         return dimensions
 * 
 */
    __pyx_t_6 = PyTuple_New(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);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __pyx_t_7 = PyNumber_Add(__pyx_v_dimensions, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_dimensions, ((PyObject*)__pyx_t_7));
    __pyx_t_7 = 0;
  }

  /* "netCDF4.pyx":2705
 *             name = namstring.decode(default_encoding,unicode_error)
 *             dimensions = dimensions + (name,)
 *         return dimensions             # <<<<<<<<<<<<<<
 * 
 *     property datatype:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dimensions);
  __pyx_r = __pyx_v_dimensions;
  goto __pyx_L0;

  /* "netCDF4.pyx":2684
 *         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_AddTraceback("netCDF4.Variable._getdims", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dimensions);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2709
 *     property datatype:
 *         """numpy data type (for primitive data types) or VLType/CompoundType instance (for compound or vlen data types)"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self._iscompound:
 *                 return self._cmptype
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_8datatype_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_8datatype_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_8datatype___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_8datatype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "netCDF4.pyx":2710
 *         """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 = 2710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":2711
 *         def __get__(self):
 *             if self._iscompound:
 *                 return self._cmptype             # <<<<<<<<<<<<<<
 *             elif self._isvlen:
 *                 return self._vltype
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_cmptype);
    __pyx_r = __pyx_v_self->_cmptype;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":2712
 *             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 = 2712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":2713
 *                 return self._cmptype
 *             elif self._isvlen:
 *                 return self._vltype             # <<<<<<<<<<<<<<
 *             elif self._isprimitive:
 *                 return self.dtype
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_vltype);
    __pyx_r = __pyx_v_self->_vltype;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":2714
 *             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 = 2714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":2715
 *                 return self._vltype
 *             elif self._isprimitive:
 *                 return self.dtype             # <<<<<<<<<<<<<<
 * 
 *     property shape:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->dtype);
    __pyx_r = __pyx_v_self->dtype;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":2709
 *     property datatype:
 *         """numpy data type (for primitive data types) or VLType/CompoundType instance (for compound or vlen data types)"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self._iscompound:
 *                 return self._cmptype
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("netCDF4.Variable.datatype.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2719
 *     property shape:
 *         """find current sizes of all variable dimensions"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             shape = ()
 *             for dimname in self._getdims():
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_5shape_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_5shape___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_5shape___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_v_shape = NULL;
  PyObject *__pyx_v_dimname = NULL;
  PyObject *__pyx_v_dim = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "netCDF4.pyx":2720
 *         """find current sizes of all variable dimensions"""
 *         def __get__(self):
 *             shape = ()             # <<<<<<<<<<<<<<
 *             for dimname in self._getdims():
 *                 # look in current group, and parents for dim.
 */
  __Pyx_INCREF(__pyx_empty_tuple);
  __pyx_v_shape = __pyx_empty_tuple;

  /* "netCDF4.pyx":2721
 *         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_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getdims); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__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 = 2721; __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;

    /* "netCDF4.pyx":2723
 *             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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_dim); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyTuple_New(2); 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_INCREF(__pyx_v_self->_grp);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->_grp);
    __Pyx_GIVEREF(__pyx_v_self->_grp);
    __Pyx_INCREF(__pyx_v_dimname);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_dimname);
    __Pyx_GIVEREF(__pyx_v_dimname);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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":2724
 *                 # 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 = 2724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2724; __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 = 0;
    __pyx_t_6 = PyNumber_Add(__pyx_v_shape, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_shape, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "netCDF4.pyx":2725
 *                 dim = _find_dim(self._grp,dimname)
 *                 shape = shape + (len(dim),)
 *             return shape             # <<<<<<<<<<<<<<
 *         def __set__(self,value):
 *             raise AttributeError("shape cannot be altered")
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_shape);
  __pyx_r = __pyx_v_shape;
  goto __pyx_L0;

  /* "netCDF4.pyx":2719
 *     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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2726
 *                 shape = shape + (len(dim),)
 *             return shape
 *         def __set__(self,value):             # <<<<<<<<<<<<<<
 *             raise AttributeError("shape cannot be altered")
 * 
 */

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_5shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_5shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_5shape_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_5shape_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "netCDF4.pyx":2727
 *             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__62, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2727; __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 = 2727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":2726
 *                 shape = shape + (len(dim),)
 *             return shape
 *         def __set__(self,value):             # <<<<<<<<<<<<<<
 *             raise AttributeError("shape cannot be altered")
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Variable.shape.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2731
 *     property size:
 *         """Return the number of stored elements."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return numpy.prod(self.shape)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_4size___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_4size___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "netCDF4.pyx":2732
 *         """Return the number of stored elements."""
 *         def __get__(self):
 *             return numpy.prod(self.shape)             # <<<<<<<<<<<<<<
 * 
 *     property dimensions:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_prod); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2732; __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_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2732; __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 = 2732; __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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2732; __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":2731
 *     property size:
 *         """Return the number of stored elements."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return numpy.prod(self.shape)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("netCDF4.Variable.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2736
 *     property dimensions:
 *         """get variables's dimension names"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._getdims()
 *         def __set__(self,value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_10dimensions_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_10dimensions_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_10dimensions___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_10dimensions___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "netCDF4.pyx":2737
 *         """get variables's dimension names"""
 *         def __get__(self):
 *             return self._getdims()             # <<<<<<<<<<<<<<
 *         def __set__(self,value):
 *             raise AttributeError("dimensions cannot be altered")
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getdims); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2737; __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":2736
 *     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_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":2738
 *         def __get__(self):
 *             return self._getdims()
 *         def __set__(self,value):             # <<<<<<<<<<<<<<
 *             raise AttributeError("dimensions cannot be altered")
 * 
 */

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_10dimensions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_10dimensions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_10dimensions_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_10dimensions_2__set__(CYTHON_UNUSED struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "netCDF4.pyx":2739
 *             return self._getdims()
 *         def __set__(self,value):
 *             raise AttributeError("dimensions cannot be altered")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __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 = 2739; __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 = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":2738
 *         def __get__(self):
 *             return self._getdims()
 *         def __set__(self,value):             # <<<<<<<<<<<<<<
 *             raise AttributeError("dimensions cannot be altered")
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Variable.dimensions.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2742
 * 
 * 
 *     def group(self):             # <<<<<<<<<<<<<<
 *         """
 * group(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_11group(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_10group[] = "\ngroup(self)\n\nreturn the group that this L{Variable} is a member of.";
static PyObject *__pyx_pw_7netCDF4_8Variable_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_8Variable_10group(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_10group(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("group", 0);

  /* "netCDF4.pyx":2747
 * 
 * return the group that this L{Variable} is a member of."""
 *         return self._grp             # <<<<<<<<<<<<<<
 * 
 *     def ncattrs(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_grp);
  __pyx_r = __pyx_v_self->_grp;
  goto __pyx_L0;

  /* "netCDF4.pyx":2742
 * 
 * 
 *     def group(self):             # <<<<<<<<<<<<<<
 *         """
 * group(self)
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2749
 *         return self._grp
 * 
 *     def ncattrs(self):             # <<<<<<<<<<<<<<
 *         """
 * ncattrs(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_13ncattrs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_12ncattrs[] = "\nncattrs(self)\n\nreturn netCDF attribute names for this L{Variable} in a list.";
static PyObject *__pyx_pw_7netCDF4_8Variable_13ncattrs(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_12ncattrs(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_12ncattrs(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ncattrs", 0);

  /* "netCDF4.pyx":2754
 * 
 * return netCDF attribute names for this L{Variable} in a list."""
 *         return _get_att_names(self._grpid, self._varid)             # <<<<<<<<<<<<<<
 * 
 *     def setncattr(self,name,value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7netCDF4__get_att_names(__pyx_v_self->_grpid, __pyx_v_self->_varid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2754; __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":2749
 *         return self._grp
 * 
 *     def ncattrs(self):             # <<<<<<<<<<<<<<
 *         """
 * ncattrs(self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Variable.ncattrs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2756
 *         return _get_att_names(self._grpid, self._varid)
 * 
 *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
 *         """
 * setncattr(self,name,value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_15setncattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_14setncattr[] = "\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_15setncattr(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 = 2756; __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 = 2756; __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 = 2756; __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_14setncattr(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), __pyx_v_name, __pyx_v_value);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_14setncattr(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setncattr", 0);

  /* "netCDF4.pyx":2763
 * 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 = 2763; __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 = 2763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2763; __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_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":2764
 * 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_3 = __pyx_v_self->_grp;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_f_7netCDF4__set_att(__pyx_t_3, __pyx_v_self->_varid, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "netCDF4.pyx":2765
 *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
 *         _set_att(self._grp, self._varid, name, value)
 *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()             # <<<<<<<<<<<<<<
 * 
 *     def setncatts(self,attdict):
 */
  __pyx_t_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 = 2765; __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 = 2765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 2765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "netCDF4.pyx":2756
 *         return _get_att_names(self._grpid, self._varid)
 * 
 *     def setncattr(self,name,value):             # <<<<<<<<<<<<<<
 *         """
 * setncattr(self,name,value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("netCDF4.Variable.setncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2767
 *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
 * 
 *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
 *         """
 * setncatts(self,attdict)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_17setncatts(PyObject *__pyx_v_self, PyObject *__pyx_v_attdict); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_16setncatts[] = "\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_17setncatts(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_16setncatts(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_attdict));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_16setncatts(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;
  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;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setncatts", 0);

  /* "netCDF4.pyx":2775
 * 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 = 2775; __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 = 2775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2775; __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_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":2776
 * 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 = 2776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (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 = 2776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (!__pyx_t_5 && 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 = 2776; __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 = 2776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      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 = 2776; __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 = 2776; __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 = 2776; __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 = 2776; __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_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2776; __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 = 2776; __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_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      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 = 2776; __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 = 2776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "netCDF4.pyx":2777
 *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
 *         for name, value in attdict.items():
 *             _set_att(self._grp, self._varid, name, value)             # <<<<<<<<<<<<<<
 *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
 * 
 */
    __pyx_t_1 = __pyx_v_self->_grp;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_7 = __pyx_f_7netCDF4__set_att(__pyx_t_1, __pyx_v_self->_varid, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2777; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "netCDF4.pyx":2778
 *         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 = 2778; __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 = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_enddef); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "netCDF4.pyx":2767
 *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
 * 
 *     def setncatts(self,attdict):             # <<<<<<<<<<<<<<
 *         """
 * setncatts(self,attdict)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2780
 *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
 * 
 *     def getncattr(self,name):             # <<<<<<<<<<<<<<
 *         """
 * getncattr(self,name)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_19getncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_18getncattr[] = "\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_19getncattr(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_18getncattr(((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_18getncattr(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":2787
 * netCDF attribute with the same name as one of the reserved python
 * attributes."""
 *         return _get_att(self._grp, self._varid, name)             # <<<<<<<<<<<<<<
 * 
 *     def delncattr(self, name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->_grp;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_7netCDF4__get_att(__pyx_t_1, __pyx_v_self->_varid, __pyx_v_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2787; __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":2780
 *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
 * 
 *     def getncattr(self,name):             # <<<<<<<<<<<<<<
 *         """
 * getncattr(self,name)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("netCDF4.Variable.getncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2789
 *         return _get_att(self._grp, self._varid, name)
 * 
 *     def delncattr(self, name):             # <<<<<<<<<<<<<<
 *         """
 * delncattr(self,name,value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_21delncattr(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_20delncattr[] = "\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_21delncattr(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_20delncattr(((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_20delncattr(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("delncattr", 0);

  /* "netCDF4.pyx":2797
 * attributes."""
 *         cdef char *attname
 *         bytestr = _strencode(name)             # <<<<<<<<<<<<<<
 *         attname = bytestr
 *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
 */
  __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytestr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":2798
 *         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 = 2798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_attname = __pyx_t_2;

  /* "netCDF4.pyx":2799
 *         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 = 2799; __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 = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_redef); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; __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_4); __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":2800
 *         attname = bytestr
 *         if self._grp.data_model != 'NETCDF4': self._grp._redef()
 *         ierr = nc_del_att(self._grpid, self._varid, attname)             # <<<<<<<<<<<<<<
 *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
 *         if ierr != NC_NOERR:
 */
  __pyx_v_ierr = nc_del_att(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_attname);

  /* "netCDF4.pyx":2801
 *         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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_NETCDF4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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 = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2801; __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":2802
 *         ierr = nc_del_att(self._grpid, self._varid, attname)
 *         if self._grp.data_model != 'NETCDF4': self._grp._enddef()
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 */
  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":2803
 *         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 = 2803; __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 = 2803; __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 = 2803; __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 = 2803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":2789
 *         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_AddTraceback("netCDF4.Variable.delncattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bytestr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2805
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def filters(self):             # <<<<<<<<<<<<<<
 *         """
 * filters(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_23filters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_22filters[] = "\nfilters(self)\n\nreturn dictionary containing HDF5 filter parameters.";
static PyObject *__pyx_pw_7netCDF4_8Variable_23filters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("filters (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_22filters(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_22filters(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_v_ierr;
  int __pyx_v_ideflate;
  int __pyx_v_ishuffle;
  int __pyx_v_ideflate_level;
  int __pyx_v_ifletcher32;
  PyObject *__pyx_v_filtdict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  char *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("filters", 0);

  /* "netCDF4.pyx":2811
 * return dictionary containing HDF5 filter parameters."""
 *         cdef int ierr,ideflate,ishuffle,ideflate_level,ifletcher32
 *         filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False}             # <<<<<<<<<<<<<<
 *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
 *         ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2811; __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 = 2811; __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 = 2811; __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 = 2811; __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 = 2811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_filtdict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":2812
 *         cdef int ierr,ideflate,ishuffle,ideflate_level,ifletcher32
 *         filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False}
 *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return             # <<<<<<<<<<<<<<
 *         ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
 *         if ierr != NC_NOERR:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2812; __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_CLASSIC, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {
    __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 = 2812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":2813
 *         filtdict = {'zlib':False,'shuffle':False,'complevel':0,'fletcher32':False}
 *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
 *         ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_inq_var_deflate(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_ishuffle), (&__pyx_v_ideflate), (&__pyx_v_ideflate_level));

  /* "netCDF4.pyx":2814
 *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return
 *         ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
 */
  __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2815
 *         ierr = nc_inq_var_deflate(self._grpid, self._varid, &ishuffle, &ideflate, &ideflate_level)
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *         ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
 *         if ierr != NC_NOERR:
 */
    __pyx_t_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 = 2815; __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 = 2815; __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 = 2815; __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 = 2815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":2816
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_inq_var_fletcher32(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_ifletcher32));

  /* "netCDF4.pyx":2817
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         ierr = nc_inq_var_fletcher32(self._grpid, self._varid, &ifletcher32)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         if ideflate:
 */
  __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2818
 *         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_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 = 2818; __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 = 2818; __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 = 2818; __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 = 2818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":2819
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         if ideflate:             # <<<<<<<<<<<<<<
 *             filtdict['zlib']=True
 *             filtdict['complevel']=ideflate_level
 */
  __pyx_t_2 = (__pyx_v_ideflate != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2820
 *             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 = 2820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "netCDF4.pyx":2821
 *         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 = 2821; __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 = 2821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "netCDF4.pyx":2822
 *             filtdict['zlib']=True
 *             filtdict['complevel']=ideflate_level
 *         if ishuffle:             # <<<<<<<<<<<<<<
 *             filtdict['shuffle']=True
 *         if ifletcher32:
 */
  __pyx_t_2 = (__pyx_v_ishuffle != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2823
 *             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 = 2823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "netCDF4.pyx":2824
 *         if ishuffle:
 *             filtdict['shuffle']=True
 *         if ifletcher32:             # <<<<<<<<<<<<<<
 *             filtdict['fletcher32']=True
 *         return filtdict
 */
  __pyx_t_2 = (__pyx_v_ifletcher32 != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2825
 *             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 = 2825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "netCDF4.pyx":2826
 *         if ifletcher32:
 *             filtdict['fletcher32']=True
 *         return filtdict             # <<<<<<<<<<<<<<
 * 
 *     def endian(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_filtdict);
  __pyx_r = __pyx_v_filtdict;
  goto __pyx_L0;

  /* "netCDF4.pyx":2805
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def filters(self):             # <<<<<<<<<<<<<<
 *         """
 * filters(self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2828
 *         return filtdict
 * 
 *     def endian(self):             # <<<<<<<<<<<<<<
 *         """
 * endian(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_25endian(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_24endian[] = "\nendian(self)\n\nreturn endian-ness (little,big,native) of variable (as stored in HDF5 file).";
static PyObject *__pyx_pw_7netCDF4_8Variable_25endian(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_24endian(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_24endian(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;
  int __pyx_t_4;
  char *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("endian", 0);

  /* "netCDF4.pyx":2834
 * return endian-ness (little,big,native) of variable (as stored in HDF5 file)."""
 *         cdef int ierr, iendian
 *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:             # <<<<<<<<<<<<<<
 *             return 'native'
 *         ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4_CLASSIC, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {
    __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 = 2834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2835
 *         cdef int ierr, iendian
 *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
 *             return 'native'             # <<<<<<<<<<<<<<
 *         ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
 *         if ierr != NC_NOERR:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_native);
    __pyx_r = __pyx_n_s_native;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":2836
 *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']:
 *             return 'native'
 *         ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_inq_var_endian(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_iendian));

  /* "netCDF4.pyx":2837
 *             return 'native'
 *         ierr = nc_inq_var_endian(self._grpid, self._varid, &iendian)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         if iendian == NC_ENDIAN_LITTLE:
 */
  __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2838
 *         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_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 = 2838; __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 = 2838; __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 = 2838; __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 = 2838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":2841
 *         if iendian == NC_ENDIAN_LITTLE:
 *             return 'little'
 *         elif iendian == NC_ENDIAN_BIG:             # <<<<<<<<<<<<<<
 *             return 'big'
 *         else:
 */
  switch (__pyx_v_iendian) {

    /* "netCDF4.pyx":2839
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         if iendian == NC_ENDIAN_LITTLE:             # <<<<<<<<<<<<<<
 *             return 'little'
 *         elif iendian == NC_ENDIAN_BIG:
 */
    case NC_ENDIAN_LITTLE:

    /* "netCDF4.pyx":2840
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         if iendian == NC_ENDIAN_LITTLE:
 *             return 'little'             # <<<<<<<<<<<<<<
 *         elif iendian == NC_ENDIAN_BIG:
 *             return 'big'
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_little);
    __pyx_r = __pyx_n_s_little;
    goto __pyx_L0;
    break;

    /* "netCDF4.pyx":2841
 *         if iendian == NC_ENDIAN_LITTLE:
 *             return 'little'
 *         elif iendian == NC_ENDIAN_BIG:             # <<<<<<<<<<<<<<
 *             return 'big'
 *         else:
 */
    case NC_ENDIAN_BIG:

    /* "netCDF4.pyx":2842
 *             return 'little'
 *         elif iendian == NC_ENDIAN_BIG:
 *             return 'big'             # <<<<<<<<<<<<<<
 *         else:
 *             return 'native'
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_big);
    __pyx_r = __pyx_n_s_big;
    goto __pyx_L0;
    break;
    default:

    /* "netCDF4.pyx":2844
 *             return 'big'
 *         else:
 *             return 'native'             # <<<<<<<<<<<<<<
 * 
 *     def chunking(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_native);
    __pyx_r = __pyx_n_s_native;
    goto __pyx_L0;
    break;
  }

  /* "netCDF4.pyx":2828
 *         return filtdict
 * 
 *     def endian(self):             # <<<<<<<<<<<<<<
 *         """
 * endian(self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2846
 *             return 'native'
 * 
 *     def chunking(self):             # <<<<<<<<<<<<<<
 *         """
 * chunking(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_27chunking(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_26chunking[] = "\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_27chunking(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_26chunking(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_26chunking(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;
  int __pyx_t_5;
  char *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("chunking", 0);

  /* "netCDF4.pyx":2856
 *         cdef int ierr, icontiguous, ndims
 *         cdef size_t *chunksizesp
 *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None             # <<<<<<<<<<<<<<
 *         ndims = self.ndim
 *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_grp, __pyx_n_s_data_model); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_NETCDF4_CLASSIC, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {
    __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 = 2856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__pyx_t_4 != 0);
  if (__pyx_t_2) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":2857
 *         cdef size_t *chunksizesp
 *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None
 *         ndims = self.ndim             # <<<<<<<<<<<<<<
 *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
 *         ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
 */
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_self->ndim); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ndims = __pyx_t_5;

  /* "netCDF4.pyx":2858
 *         if self._grp.data_model not in ['NETCDF4_CLASSIC','NETCDF4']: return None
 *         ndims = self.ndim
 *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)             # <<<<<<<<<<<<<<
 *         ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
 *         if ierr != NC_NOERR:
 */
  __pyx_v_chunksizesp = ((size_t *)malloc(((sizeof(size_t)) * __pyx_v_ndims)));

  /* "netCDF4.pyx":2859
 *         ndims = self.ndim
 *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
 *         ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_inq_var_chunking(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_icontiguous), __pyx_v_chunksizesp);

  /* "netCDF4.pyx":2860
 *         chunksizesp = <size_t *>malloc(sizeof(size_t) * ndims)
 *         ierr = nc_inq_var_chunking(self._grpid, self._varid, &icontiguous, chunksizesp)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         chunksizes=[]
 */
  __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2861
 *         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_6 = ((char *)nc_strerror(__pyx_v_ierr));
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2861; __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 = 2861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_7, 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_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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 = 2861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":2862
 *         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 = 2862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_chunksizes = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":2863
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         chunksizes=[]
 *         for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
 *             chunksizes.append(chunksizesp[n])
 *         free(chunksizesp)
 */
  __pyx_t_5 = __pyx_v_ndims;
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_5; __pyx_v_n++) {

    /* "netCDF4.pyx":2864
 *         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 = 2864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_chunksizes, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "netCDF4.pyx":2865
 *         for n from 0 <= n < ndims:
 *             chunksizes.append(chunksizesp[n])
 *         free(chunksizesp)             # <<<<<<<<<<<<<<
 *         if icontiguous:
 *             return 'contiguous'
 */
  free(__pyx_v_chunksizesp);

  /* "netCDF4.pyx":2866
 *             chunksizes.append(chunksizesp[n])
 *         free(chunksizesp)
 *         if icontiguous:             # <<<<<<<<<<<<<<
 *             return 'contiguous'
 *         else:
 */
  __pyx_t_2 = (__pyx_v_icontiguous != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":2867
 *         free(chunksizesp)
 *         if icontiguous:
 *             return 'contiguous'             # <<<<<<<<<<<<<<
 *         else:
 *             return chunksizes
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_contiguous);
    __pyx_r = __pyx_n_s_contiguous;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "netCDF4.pyx":2869
 *             return 'contiguous'
 *         else:
 *             return chunksizes             # <<<<<<<<<<<<<<
 * 
 *     def get_var_chunk_cache(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_chunksizes);
    __pyx_r = __pyx_v_chunksizes;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":2846
 *             return 'native'
 * 
 *     def chunking(self):             # <<<<<<<<<<<<<<
 *         """
 * chunking(self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("netCDF4.Variable.chunking", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_chunksizes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2871
 *             return chunksizes
 * 
 *     def get_var_chunk_cache(self):             # <<<<<<<<<<<<<<
 *         """
 * get_var_chunk_cache(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_29get_var_chunk_cache(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_28get_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_29get_var_chunk_cache(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_var_chunk_cache (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_28get_var_chunk_cache(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_28get_var_chunk_cache(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_v_ierr;
  size_t __pyx_v_sizep;
  size_t __pyx_v_nelemsp;
  float __pyx_v_preemptionp;
  size_t __pyx_v_size;
  size_t __pyx_v_nelems;
  PyObject *__pyx_v_preemption = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  char *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_var_chunk_cache", 0);

  /* "netCDF4.pyx":2881
 *         cdef size_t sizep, nelemsp
 *         cdef float preemptionp
 *         ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,             # <<<<<<<<<<<<<<
 *                &nelemsp, &preemptionp)
 *         if ierr != NC_NOERR:
 */
  __pyx_v_ierr = nc_get_var_chunk_cache(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_sizep), (&__pyx_v_nelemsp), (&__pyx_v_preemptionp));

  /* "netCDF4.pyx":2883
 *         ierr = nc_get_var_chunk_cache(self._grpid, self._varid, &sizep,
 *                &nelemsp, &preemptionp)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         size = sizep; nelems = nelemsp; preemption = preemptionp
 */
  __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":2884
 *                &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 = 2884; __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 = 2884; __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 = 2884; __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 = 2884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":2885
 *         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 = 2885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_preemption = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "netCDF4.pyx":2886
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         size = sizep; nelems = nelemsp; preemption = preemptionp
 *         return (size,nelems,preemption)             # <<<<<<<<<<<<<<
 * 
 *     def set_var_chunk_cache(self,size=None,nelems=None,preemption=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2886; __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 = 2886; __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 = 2886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_preemption);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_preemption);
  __Pyx_GIVEREF(__pyx_v_preemption);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "netCDF4.pyx":2871
 *             return chunksizes
 * 
 *     def get_var_chunk_cache(self):             # <<<<<<<<<<<<<<
 *         """
 * get_var_chunk_cache(self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("netCDF4.Variable.get_var_chunk_cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_preemption);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2888
 *         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_31set_var_chunk_cache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_30set_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_31set_var_chunk_cache(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size = 0;
  PyObject *__pyx_v_nelems = 0;
  PyObject *__pyx_v_preemption = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_var_chunk_cache (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_nelems,&__pyx_n_s_preemption,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nelems);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_preemption);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_var_chunk_cache") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2888; __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 = 2888; __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_30set_var_chunk_cache(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), __pyx_v_size, __pyx_v_nelems, __pyx_v_preemption);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_30set_var_chunk_cache(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_size, PyObject *__pyx_v_nelems, PyObject *__pyx_v_preemption) {
  int __pyx_v_ierr;
  size_t __pyx_v_sizep;
  size_t __pyx_v_nelemsp;
  float __pyx_v_preemptionp;
  PyObject *__pyx_v_size_orig = NULL;
  PyObject *__pyx_v_nelems_orig = NULL;
  PyObject *__pyx_v_preemption_orig = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  size_t __pyx_t_9;
  float __pyx_t_10;
  char *__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_var_chunk_cache", 0);

  /* "netCDF4.pyx":2899
 *         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(((PyObject *)__pyx_v_self), __pyx_n_s_get_var_chunk_cache); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  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 != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __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_3 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_1 = 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_1);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __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 = 2899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    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 = 2899; __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 = 2899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_size_orig = __pyx_t_1;
  __pyx_t_1 = 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":2900
 *         # 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":2901
 *         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 = 2901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_sizep = __pyx_t_9;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "netCDF4.pyx":2903
 *             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 = 2903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_sizep = __pyx_t_9;
  }
  __pyx_L5:;

  /* "netCDF4.pyx":2904
 *         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":2905
 *             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 = 2905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_nelemsp = __pyx_t_9;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "netCDF4.pyx":2907
 *             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 = 2907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_nelemsp = __pyx_t_9;
  }
  __pyx_L6:;

  /* "netCDF4.pyx":2908
 *         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":2909
 *             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 = 2909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_preemptionp = __pyx_t_10;
    goto __pyx_L7;
  }
  /*else*/ {

    /* "netCDF4.pyx":2911
 *             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 = 2911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_preemptionp = __pyx_t_10;
  }
  __pyx_L7:;

  /* "netCDF4.pyx":2912
 *         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":2914
 *         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":2915
 *                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_2 = __Pyx_decode_c_string(__pyx_t_11, 0, strlen(__pyx_t_11), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_4, 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_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2915; __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 = 2915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":2888
 *         return (size,nelems,preemption)
 * 
 *     def set_var_chunk_cache(self,size=None,nelems=None,preemption=None):             # <<<<<<<<<<<<<<
 *         """
 * set_var_chunk_cache(self,size=None,nelems=None,preemption=None)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("netCDF4.Variable.set_var_chunk_cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_size_orig);
  __Pyx_XDECREF(__pyx_v_nelems_orig);
  __Pyx_XDECREF(__pyx_v_preemption_orig);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2917
 *             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_33__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_33__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_32__delattr__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_32__delattr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__delattr__", 0);

  /* "netCDF4.pyx":2919
 *     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 = 2919; __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 = 2919; __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":2920
 *         # if it's a netCDF attribute, remove it
 *         if name not in _private_atts:
 *             self.delncattr(name)             # <<<<<<<<<<<<<<
 *         else:
 *             raise AttributeError(
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delncattr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; __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);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; __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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "netCDF4.pyx":2923
 *         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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2923; __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 = 2923; __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(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2923; __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 = 2923; __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_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_is_one_of_the_reserved_attrib, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "netCDF4.pyx":2922
 *             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_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2922; __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_AttributeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2922; __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 = 2922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "netCDF4.pyx":2917
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 *     def __delattr__(self,name):             # <<<<<<<<<<<<<<
 *         # if it's a netCDF attribute, remove it
 *         if name not in _private_atts:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("netCDF4.Variable.__delattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2925
 *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
 * 
 *     def __setattr__(self,name,value):             # <<<<<<<<<<<<<<
 *         # if name in _private_atts, it is stored at the python
 *         # level and not in the netCDF file.
 */

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_35__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_35__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_34__setattr__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_name), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_34__setattr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_msg = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setattr__", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "netCDF4.pyx":2928
 *         # 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 = 2928; __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 = 2928; __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":2931
 *             # 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 = 2931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_3) {

      /* "netCDF4.pyx":2932
 *             # 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 = 2932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_msg = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "netCDF4.pyx":2934
 *                 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 = 2934; __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 = 2934; __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 = 2934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":2941
 *                 #    "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_PyString_Equals(__pyx_v_name, __pyx_n_s_missing_value, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = __pyx_t_2;
    } else {
      __pyx_t_5 = __pyx_t_3;
    }
    if (__pyx_t_5) {

      /* "netCDF4.pyx":2942
 *                 #    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 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2942; __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 = 2942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __Pyx_INCREF(__pyx_v_self->dtype);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->dtype);
      __Pyx_GIVEREF(__pyx_v_self->dtype);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2942; __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_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_6);
      __pyx_t_6 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "netCDF4.pyx":2943
 *             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_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setncattr); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __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 = 2943; __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;
  }

  /* "netCDF4.pyx":2944
 *                 value = numpy.array(value, self.dtype)
 *             self.setncattr(name, value)
 *         elif not name.endswith('__'):             # <<<<<<<<<<<<<<
 *             if hasattr(self,name):
 *                 raise AttributeError(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((!__pyx_t_5) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":2945
 *             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_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_name); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (__pyx_t_5) {

      /* "netCDF4.pyx":2947
 *             if hasattr(self,name):
 *                 raise AttributeError(
 *                 "'%s' is one of the reserved attributes %s, cannot rebind. Use setncattr instead." % (name, tuple(_private_atts)))             # <<<<<<<<<<<<<<
 *             else:
 *                 self.__dict__[name]=value
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2947; __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(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2947; __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 = 2947; __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_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "netCDF4.pyx":2946
 *         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_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2946; __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 = 2946; __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 = 2946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    /*else*/ {

      /* "netCDF4.pyx":2949
 *                 "'%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 = 2949; __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 = 2949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":2925
 *             "'%s' is one of the reserved attributes %s, cannot delete. Use delncattr instead." % (name, tuple(_private_atts)))
 * 
 *     def __setattr__(self,name,value):             # <<<<<<<<<<<<<<
 *         # if name in _private_atts, it is stored at the python
 *         # level and not in the netCDF file.
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __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":2951
 *                 self.__dict__[name]=value
 * 
 *     def __getattr__(self,name):             # <<<<<<<<<<<<<<
 *         # if name in _private_atts, it is stored at the python
 *         # level and not in the netCDF file.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_37__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_37__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_36__getattr__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_36__getattr__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_names = NULL;
  PyObject *__pyx_v_values = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = 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":2954
 *         # 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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); 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_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2954; __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 = 2954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__66, NULL); 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_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 = 2954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_3;
  }
  if (__pyx_t_5) {

    /* "netCDF4.pyx":2956
 *         if name.startswith('__') and name.endswith('__'):
 *             # if __dict__ requested, return a dict with netCDF attributes.
 *             if name == '__dict__':             # <<<<<<<<<<<<<<
 *                 names = self.ncattrs()
 *                 values = []
 */
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_dict, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_5) {

      /* "netCDF4.pyx":2957
 *             # if __dict__ requested, return a dict with netCDF attributes.
 *             if name == '__dict__':
 *                 names = self.ncattrs()             # <<<<<<<<<<<<<<
 *                 values = []
 *                 for name in names:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_names = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "netCDF4.pyx":2958
 *             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 = 2958; __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":2959
 *                 names = self.ncattrs()
 *                 values = []
 *                 for name in names:             # <<<<<<<<<<<<<<
 *                     values.append(_get_att(self._grp, self._varid, name))
 *                 return OrderedDict(zip(names,values))
 */
      if (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 = 2959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext;
      }
      for (;;) {
        if (!__pyx_t_7 && 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 = 2959; __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 = 2959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_2)) {
          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 = 2959; __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 = 2959; __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 = 2959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "netCDF4.pyx":2960
 *                 values = []
 *                 for name in names:
 *                     values.append(_get_att(self._grp, self._varid, name))             # <<<<<<<<<<<<<<
 *                 return OrderedDict(zip(names,values))
 *             else:
 */
        __pyx_t_1 = __pyx_v_self->_grp;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_8 = __pyx_f_7netCDF4__get_att(__pyx_t_1, __pyx_v_self->_varid, __pyx_v_name); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_8); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2960; __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;

      /* "netCDF4.pyx":2961
 *                 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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = PyTuple_New(2); 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_INCREF(__pyx_v_names);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_names);
      __Pyx_GIVEREF(__pyx_v_names);
      __Pyx_INCREF(__pyx_v_values);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_values);
      __Pyx_GIVEREF(__pyx_v_values);
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __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_t_1 = PyTuple_New(1); 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);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2961; __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_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L0;
    }
    /*else*/ {

      /* "netCDF4.pyx":2963
 *                 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 = 2963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }

  /* "netCDF4.pyx":2964
 *             else:
 *                 raise AttributeError
 *         elif name in _private_atts:             # <<<<<<<<<<<<<<
 *             return self.__dict__[name]
 *         else:
 */
  __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_private_atts); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_t_10, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_3 = (__pyx_t_5 != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":2965
 *                 raise AttributeError
 *         elif name in _private_atts:
 *             return self.__dict__[name]             # <<<<<<<<<<<<<<
 *         else:
 *             return self.getncattr(name)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_1 = PyObject_GetItem(__pyx_t_10, __pyx_v_name); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2965; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "netCDF4.pyx":2967
 *             return self.__dict__[name]
 *         else:
 *             return self.getncattr(name)             # <<<<<<<<<<<<<<
 * 
 *     def renameAttribute(self, oldname, newname):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getncattr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __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 = 2967; __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);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; __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_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":2951
 *                 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_8);
  __Pyx_XDECREF(__pyx_t_10);
  __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":2969
 *             return self.getncattr(name)
 * 
 *     def renameAttribute(self, oldname, newname):             # <<<<<<<<<<<<<<
 *         """
 * renameAttribute(self, oldname, newname)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_39renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_38renameAttribute[] = "\nrenameAttribute(self, oldname, newname)\n\nrename a L{Variable} attribute named C{oldname} to C{newname}.";
static PyObject *__pyx_pw_7netCDF4_8Variable_39renameAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_oldname = 0;
  PyObject *__pyx_v_newname = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("renameAttribute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_oldname,&__pyx_n_s_newname,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_oldname)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_newname)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("renameAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2969; __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 = 2969; __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 = 2969; __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_38renameAttribute(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_38renameAttribute(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname) {
  int __pyx_v_ierr;
  char *__pyx_v_oldnamec;
  char *__pyx_v_newnamec;
  PyObject *__pyx_v_bytestr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("renameAttribute", 0);

  /* "netCDF4.pyx":2977
 *         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 = 2977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytestr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":2978
 *         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 = 2978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_oldnamec = __pyx_t_2;

  /* "netCDF4.pyx":2979
 *         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 = 2979; __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":2980
 *         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 = 2980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newnamec = __pyx_t_2;

  /* "netCDF4.pyx":2981
 *         bytestr = _strencode(newname)
 *         newnamec = bytestr
 *         ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_v_ierr = nc_rename_att(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_oldnamec, __pyx_v_newnamec);

  /* "netCDF4.pyx":2982
 *         newnamec = bytestr
 *         ierr = nc_rename_att(self._grpid, self._varid, oldnamec, newnamec)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 * 
 */
  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":2983
 *         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 = 2983; __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 = 2983; __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 = 2983; __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 = 2983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":2969
 *             return self.getncattr(name)
 * 
 *     def renameAttribute(self, oldname, newname):             # <<<<<<<<<<<<<<
 *         """
 * renameAttribute(self, oldname, newname)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("netCDF4.Variable.renameAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bytestr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2985
 *             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_41__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_elem); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_41__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_elem) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_40__getitem__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_elem));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_40__getitem__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_elem) {
  PyObject *__pyx_v_start = NULL;
  PyObject *__pyx_v_count = NULL;
  PyObject *__pyx_v_stride = NULL;
  PyObject *__pyx_v_put_ind = NULL;
  PyObject *__pyx_v_datashape = NULL;
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_v_squeeze = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_a = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_datout = NULL;
  PyObject *__pyx_v_shape = NULL;
  int __pyx_v_valid_scaleoffset;
  PyObject *__pyx_v_msg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  double __pyx_t_17;
  int __pyx_t_18;
  int __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "netCDF4.pyx":2991
 *         # 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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_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 = 2991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_elem);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_elem);
  __Pyx_GIVEREF(__pyx_v_elem);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2991; __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;
  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 != 4)) {
      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2991; __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_1 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 3); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[4] = {&__pyx_t_3,&__pyx_t_1,&__pyx_t_4,&__pyx_t_5};
      for (i=0; i < 4; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[4] = {&__pyx_t_3,&__pyx_t_1,&__pyx_t_4,&__pyx_t_5};
    __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
    for (index=0; index < 4; index++) {
      PyObject* item = __pyx_t_7(__pyx_t_6); if (unlikely(!item)) goto __pyx_L3_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_start = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_count = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_stride = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_put_ind = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "netCDF4.pyx":2992
 *         # 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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2992; __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 = 2992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_count);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_count);
  __Pyx_GIVEREF(__pyx_v_count);
  __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 = 2992; __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_v_datashape = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "netCDF4.pyx":2993
 *         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_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_8) {

    /* "netCDF4.pyx":2994
 *         datashape = _out_array_shape(count)
 *         if self._isvlen:
 *             data = numpy.empty(datashape, dtype='O')             # <<<<<<<<<<<<<<
 *         else:
 *             data = numpy.empty(datashape, dtype=self.dtype)
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2994; __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(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_datashape);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_datashape);
    __Pyx_GIVEREF(__pyx_v_datashape);
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2994; __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_O) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2994; __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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_data = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "netCDF4.pyx":2996
 *             data = numpy.empty(datashape, dtype='O')
 *         else:
 *             data = numpy.empty(datashape, dtype=self.dtype)             # <<<<<<<<<<<<<<
 * 
 *         # Determine which dimensions need to be
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2996; __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 = 2996; __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_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_v_self->dtype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2996; __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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_data = __pyx_t_5;
    __pyx_t_5 = 0;
  }
  __pyx_L5:;

  /* "netCDF4.pyx":3002
 *         # 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_squeeze = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "netCDF4.pyx":3003
 *         # 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_4 = __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 = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, -1, NULL, NULL, &__pyx_slice__68, 0, 1, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_10(__pyx_t_1);
      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 = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
    __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4);
    __pyx_t_4 = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "netCDF4.pyx":3004
 *         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_5 = PyObject_RichCompare(__pyx_v_n, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_8) {
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(Py_Ellipsis);
      PyTuple_SET_ITEM(__pyx_t_5, 0, Py_Ellipsis);
      __Pyx_GIVEREF(Py_Ellipsis);
      __Pyx_INCREF(__pyx_v_i);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      __pyx_t_2 = PyObject_GetItem(__pyx_v_put_ind, __pyx_t_5); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3004; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ravel); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3004; __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_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3004; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_12 = __pyx_t_11;
    } else {
      __pyx_t_12 = __pyx_t_8;
    }
    if (__pyx_t_12) {

      /* "netCDF4.pyx":3005
 *         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 = 3005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }
    __pyx_L8:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "netCDF4.pyx":3008
 * 
 *         # 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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_12) {
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_1 = __pyx_int_1;
  } else {
    __Pyx_INCREF(__pyx_v_self->ndim);
    __pyx_t_1 = __pyx_v_self->ndim;
  }
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_GIVEREF(__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 = 3008; __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 = 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 = 3008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "netCDF4.pyx":3009
 *         # 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_12) {
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_1 = __pyx_int_1;
  } else {
    __Pyx_INCREF(__pyx_v_self->ndim);
    __pyx_t_1 = __pyx_v_self->ndim;
  }
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3009; __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_1);
  __Pyx_GIVEREF(__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 = 3009; __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_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3009; __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_SET(__pyx_v_count, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "netCDF4.pyx":3010
 *         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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); 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_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_12) {
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_1 = __pyx_int_1;
  } else {
    __Pyx_INCREF(__pyx_v_self->ndim);
    __pyx_t_1 = __pyx_v_self->ndim;
  }
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_GIVEREF(__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 = 3010; __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 = 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 = 3010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_stride, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "netCDF4.pyx":3011
 *         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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_12) {
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_1 = __pyx_int_1;
  } else {
    __Pyx_INCREF(__pyx_v_self->ndim);
    __pyx_t_1 = __pyx_v_self->ndim;
  }
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3011; __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_1);
  __Pyx_GIVEREF(__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 = 3011; __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_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3011; __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_SET(__pyx_v_put_ind, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "netCDF4.pyx":3014
 * 
 *         # 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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); 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_t_1 = PyTuple_New(4); 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_INCREF(__pyx_v_start);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_start);
  __Pyx_GIVEREF(__pyx_v_start);
  __Pyx_INCREF(__pyx_v_count);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_count);
  __Pyx_GIVEREF(__pyx_v_count);
  __Pyx_INCREF(__pyx_v_stride);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_stride);
  __Pyx_GIVEREF(__pyx_v_stride);
  __Pyx_INCREF(__pyx_v_put_ind);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_put_ind);
  __Pyx_GIVEREF(__pyx_v_put_ind);
  __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 = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); 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_10 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_10(__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 = 3014; __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 != 4)) {
        if (size > 4) __Pyx_RaiseTooManyValuesError(4);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3014; __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_5 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 3); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 3); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      #else
      {
        Py_ssize_t i;
        PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_5,&__pyx_t_3,&__pyx_t_6};
        for (i=0; i < 4; i++) {
          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(item);
          *(temps[i]) = item;
        }
      }
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_5,&__pyx_t_3,&__pyx_t_6};
      __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = Py_TYPE(__pyx_t_13)->tp_iternext;
      for (index=0; index < 4; index++) {
        PyObject* item = __pyx_t_7(__pyx_t_13); if (unlikely(!item)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(item);
        *(temps[index]) = item;
      }
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_13), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L12_unpacking_done;
      __pyx_L11_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L12_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "netCDF4.pyx":3015
 *         # 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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_a);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_a);
    __Pyx_GIVEREF(__pyx_v_a);
    __Pyx_INCREF(__pyx_v_b);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_b);
    __Pyx_GIVEREF(__pyx_v_b);
    __Pyx_INCREF(__pyx_v_c);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_c);
    __Pyx_GIVEREF(__pyx_v_c);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3015; __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_6); __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_datout, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "netCDF4.pyx":3016
 *         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_12 = PyObject_HasAttr(__pyx_v_datout, __pyx_n_s_shape); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_8 = (!(__pyx_t_12 != 0));
    if (!__pyx_t_8) {
      __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 = 3016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datout, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3016; __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_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_11 = __pyx_t_12;
    } else {
      __pyx_t_11 = __pyx_t_8;
    }
    if (__pyx_t_11) {

      /* "netCDF4.pyx":3017
 *             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_L13;
    }
    /*else*/ {

      /* "netCDF4.pyx":3019
 *                 data = datout
 *             else:
 *                 shape = getattr(data[tuple(i)], 'shape', ())             # <<<<<<<<<<<<<<
 *                 data[tuple(i)] = datout.reshape(shape)
 * 
 */
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_i);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3019; __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_GetAttr3(__pyx_t_2, __pyx_n_s_shape, __pyx_empty_tuple); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_shape, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "netCDF4.pyx":3020
 *             else:
 *                 shape = getattr(data[tuple(i)], 'shape', ())
 *                 data[tuple(i)] = datout.reshape(shape)             # <<<<<<<<<<<<<<
 * 
 *         # Remove extra singleton dimensions.
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datout, __pyx_n_s_reshape); 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);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_shape);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
      __Pyx_GIVEREF(__pyx_v_shape);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __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 = 3020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_i);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_2, NULL); 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);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_data, __pyx_t_6, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3020; __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_L13:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "netCDF4.pyx":3023
 * 
 *         # Remove extra singleton dimensions.
 *         if hasattr(data,'shape'):             # <<<<<<<<<<<<<<
 *             data = data[tuple(squeeze)]
 *         if self.ndim == 0:
 */
  __pyx_t_11 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = (__pyx_t_11 != 0);
  if (__pyx_t_8) {

    /* "netCDF4.pyx":3024
 *         # Remove extra singleton dimensions.
 *         if hasattr(data,'shape'):
 *             data = data[tuple(squeeze)]             # <<<<<<<<<<<<<<
 *         if self.ndim == 0:
 *             # Make sure a numpy scalar is returned instead of a 1-d array of
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_squeeze);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_squeeze);
    __Pyx_GIVEREF(__pyx_v_squeeze);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_GetItem(__pyx_v_data, __pyx_t_3); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __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_data, __pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L14;
  }
  __pyx_L14:;

  /* "netCDF4.pyx":3025
 *         if hasattr(data,'shape'):
 *             data = data[tuple(squeeze)]
 *         if self.ndim == 0:             # <<<<<<<<<<<<<<
 *             # Make sure a numpy scalar is returned instead of a 1-d array of
 *             # length 1.
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->ndim, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "netCDF4.pyx":3028
 *             # Make sure a numpy scalar is returned instead of a 1-d array of
 *             # length 1.
 *             data = data[0]             # <<<<<<<<<<<<<<
 * 
 *         # if auto_scale mode set to True, (through
 */
    __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 = 3028; __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_L15;
  }
  __pyx_L15:;

  /* "netCDF4.pyx":3038
 *         # 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_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":3039
 *         # 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_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 = 3039; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
      __pyx_t_11 = (__pyx_t_8 != 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 = 3039; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_17 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3039; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L24;
      }
      __pyx_L24:;

      /* "netCDF4.pyx":3040
 *         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 = 3040; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
      __pyx_t_8 = (__pyx_t_11 != 0);
      if (__pyx_t_8) {
        __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 = 3040; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_17 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L25;
      }
      __pyx_L25:;

      /* "netCDF4.pyx":3041
 *             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_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_L23_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "netCDF4.pyx":3042
 *             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_3, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3042; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_6);

      /* "netCDF4.pyx":3043
 *             valid_scaleoffset = True
 *         except:
 *             valid_scaleoffset = False             # <<<<<<<<<<<<<<
 *             if self.scale:
 *                 msg = 'invalid scale_factor or add_offset attribute, no unpacking done...'
 */
      __pyx_v_valid_scaleoffset = 0;

      /* "netCDF4.pyx":3044
 *         except:
 *             valid_scaleoffset = False
 *             if self.scale:             # <<<<<<<<<<<<<<
 *                 msg = 'invalid scale_factor or add_offset attribute, no unpacking done...'
 *                 warnings.warn(msg)
 */
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3044; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
      if (__pyx_t_8) {

        /* "netCDF4.pyx":3045
 *             valid_scaleoffset = False
 *             if self.scale:
 *                 msg = 'invalid scale_factor or add_offset attribute, no unpacking done...'             # <<<<<<<<<<<<<<
 *                 warnings.warn(msg)
 *         if self.mask and self._isprimitive:
 */
        __Pyx_INCREF(__pyx_kp_s_invalid_scale_factor_or_add_offs);
        __pyx_v_msg = __pyx_kp_s_invalid_scale_factor_or_add_offs;

        /* "netCDF4.pyx":3046
 *             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 = 3046; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warn); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3046; __pyx_clineno = __LINE__; goto __pyx_L18_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __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 = 3046; __pyx_clineno = __LINE__; goto __pyx_L18_except_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_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3046; __pyx_clineno = __LINE__; goto __pyx_L18_except_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(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L28;
      }
      __pyx_L28:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L17_exception_handled;
    }
    __pyx_L18_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_L17_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_L23_try_end:;
  }

  /* "netCDF4.pyx":3047
 *                 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_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_8) {
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = __pyx_t_11;
  } else {
    __pyx_t_12 = __pyx_t_8;
  }
  if (__pyx_t_12) {

    /* "netCDF4.pyx":3048
 *                 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_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toma); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3048; __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 = 3048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    __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 = 3048; __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_DECREF_SET(__pyx_v_data, __pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L29;
  }
  __pyx_L29:;

  /* "netCDF4.pyx":3049
 *         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_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_12) {
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_8) {
      __pyx_t_11 = __pyx_v_valid_scaleoffset;
      __pyx_t_18 = __pyx_t_11;
    } else {
      __pyx_t_18 = __pyx_t_8;
    }
    __pyx_t_8 = __pyx_t_18;
  } else {
    __pyx_t_8 = __pyx_t_12;
  }
  if (__pyx_t_8) {

    /* "netCDF4.pyx":3051
 *         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_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 = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_8) {
      __pyx_t_12 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_12) {

        /* "netCDF4.pyx":3052
 *             # 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_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 = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_float_0_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_18 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!__pyx_t_18) {
          __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 = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_float_1_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_19 = __pyx_t_11;
        } else {
          __pyx_t_19 = __pyx_t_18;
        }
        __pyx_t_18 = __pyx_t_19;
      } else {
        __pyx_t_18 = __pyx_t_12;
      }
      __pyx_t_12 = __pyx_t_18;
    } else {
      __pyx_t_12 = __pyx_t_8;
    }
    if (__pyx_t_12) {

      /* "netCDF4.pyx":3053
 *             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_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 = 3053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyNumber_Multiply(__pyx_v_data, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __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 = 3053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_6);
      __pyx_t_6 = 0;
      goto __pyx_L31;
    }

    /* "netCDF4.pyx":3055
 *                 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_12 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_12) {
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_float_1_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_18 = __pyx_t_8;
    } else {
      __pyx_t_18 = __pyx_t_12;
    }
    if (__pyx_t_18) {

      /* "netCDF4.pyx":3056
 *             # 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_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 = 3056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyNumber_Multiply(__pyx_v_data, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_6);
      __pyx_t_6 = 0;
      goto __pyx_L31;
    }

    /* "netCDF4.pyx":3058
 *                 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_18 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_18) {
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_float_0_0, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = __pyx_t_12;
    } else {
      __pyx_t_8 = __pyx_t_18;
    }
    if (__pyx_t_8) {

      /* "netCDF4.pyx":3059
 *             # 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_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 = 3059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_data, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_6);
      __pyx_t_6 = 0;
      goto __pyx_L31;
    }
    __pyx_L31:;
    goto __pyx_L30;
  }
  __pyx_L30:;

  /* "netCDF4.pyx":3060
 *             elif hasattr(self, 'add_offset') and self.add_offset != 0.0:
 *                 data += self.add_offset
 *         return data             # <<<<<<<<<<<<<<
 * 
 *     def _toma(self,data):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_data);
  __pyx_r = __pyx_v_data;
  goto __pyx_L0;

  /* "netCDF4.pyx":2985
 *             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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_13);
  __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":3062
 *         return data
 * 
 *     def _toma(self,data):             # <<<<<<<<<<<<<<
 *         cdef int ierr, no_fill
 *         # private function for creating a masked array, masking missing_values
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_43_toma(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_43_toma(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_toma (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_42_toma(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_42_toma(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_data) {
  int __pyx_v_ierr;
  int __pyx_v_no_fill;
  PyObject *__pyx_v_totalmask = NULL;
  PyObject *__pyx_v_fill_value = NULL;
  PyObject *__pyx_v_mval = NULL;
  PyObject *__pyx_v_hasmval = NULL;
  PyObject *__pyx_v_mvalisnan = NULL;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_mask = NULL;
  PyObject *__pyx_v_fval = NULL;
  PyObject *__pyx_v_fvalisnan = NULL;
  PyObject *__pyx_v_fillval = NULL;
  PyObject *__pyx_v_has_fillval = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  char *__pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_toma", 0);
  __Pyx_INCREF(__pyx_v_data);

  /* "netCDF4.pyx":3066
 *         # 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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3066; __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_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_bool); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __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 = 3066; __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);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_totalmask = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "netCDF4.pyx":3067
 *         # and/or _FillValues.
 *         totalmask = numpy.zeros(data.shape, numpy.bool)
 *         fill_value = None             # <<<<<<<<<<<<<<
 *         if hasattr(self, 'missing_value'):
 *             mval = numpy.array(self.missing_value, self.dtype)
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_fill_value = Py_None;

  /* "netCDF4.pyx":3068
 *         totalmask = numpy.zeros(data.shape, numpy.bool)
 *         fill_value = None
 *         if hasattr(self, 'missing_value'):             # <<<<<<<<<<<<<<
 *             mval = numpy.array(self.missing_value, self.dtype)
 *             if mval.shape == (): # mval a scalar.
 */
  __pyx_t_5 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "netCDF4.pyx":3069
 *         fill_value = None
 *         if hasattr(self, 'missing_value'):
 *             mval = numpy.array(self.missing_value, self.dtype)             # <<<<<<<<<<<<<<
 *             if mval.shape == (): # mval a scalar.
 *                 hasmval = data==mval
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_self->dtype);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->dtype);
    __Pyx_GIVEREF(__pyx_v_self->dtype);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3069; __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_2); __pyx_t_2 = 0;
    __pyx_v_mval = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "netCDF4.pyx":3070
 *         if hasattr(self, 'missing_value'):
 *             mval = numpy.array(self.missing_value, self.dtype)
 *             if mval.shape == (): # mval a scalar.             # <<<<<<<<<<<<<<
 *                 hasmval = data==mval
 *                 # is scalar missing value a NaN?
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mval, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_6) {

      /* "netCDF4.pyx":3071
 *             mval = numpy.array(self.missing_value, self.dtype)
 *             if mval.shape == (): # mval a scalar.
 *                 hasmval = data==mval             # <<<<<<<<<<<<<<
 *                 # is scalar missing value a NaN?
 *                 try:
 */
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_data, __pyx_v_mval, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_hasmval = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "netCDF4.pyx":3073
 *                 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_7, &__pyx_t_8, &__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        /*try:*/ {

          /* "netCDF4.pyx":3074
 *                 # 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_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isnan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L5_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[0]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_v_mval);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_mval);
          __Pyx_GIVEREF(__pyx_v_mval);
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3074; __pyx_clineno = __LINE__; goto __pyx_L5_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_v_mvalisnan = __pyx_t_3;
          __pyx_t_3 = 0;
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L12_try_end;
        __pyx_L5_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_3); __pyx_t_3 = 0;

        /* "netCDF4.pyx":3075
 *                 try:
 *                     mvalisnan = numpy.isnan(mval)
 *                 except TypeError: # isnan fails on some dtypes (issue 206)             # <<<<<<<<<<<<<<
 *                     mvalisnan = False
 *             else: # mval a vector.
 */
        __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
        if (__pyx_t_10) {
          __Pyx_AddTraceback("netCDF4.Variable._toma", __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 = 3075; __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":3076
 *                     mvalisnan = numpy.isnan(mval)
 *                 except TypeError: # isnan fails on some dtypes (issue 206)
 *                     mvalisnan = False             # <<<<<<<<<<<<<<
 *             else: # mval a vector.
 *                 hasmval = numpy.zeros(data.shape, numpy.bool)
 */
          __Pyx_INCREF(Py_False);
          __Pyx_XDECREF_SET(__pyx_v_mvalisnan, Py_False);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L6_exception_handled;
        }
        goto __pyx_L7_except_error;
        __pyx_L7_except_error:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_L6_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        __pyx_L12_try_end:;
      }
      goto __pyx_L4;
    }
    /*else*/ {

      /* "netCDF4.pyx":3078
 *                     mvalisnan = False
 *             else: # mval a vector.
 *                 hasmval = numpy.zeros(data.shape, numpy.bool)             # <<<<<<<<<<<<<<
 *                 for m in mval:
 *                     m =  numpy.array(m)
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __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_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_bool); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __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(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_4 = 0;
      __pyx_t_1 = 0;
      __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 = 3078; __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_v_hasmval = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "netCDF4.pyx":3079
 *             else: # mval a vector.
 *                 hasmval = numpy.zeros(data.shape, numpy.bool)
 *                 for m in mval:             # <<<<<<<<<<<<<<
 *                     m =  numpy.array(m)
 *                     hasmval += data == m
 */
      if (PyList_CheckExact(__pyx_v_mval) || PyTuple_CheckExact(__pyx_v_mval)) {
        __pyx_t_1 = __pyx_v_mval; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0;
        __pyx_t_12 = NULL;
      } else {
        __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_mval); 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_12 = Py_TYPE(__pyx_t_1)->tp_iternext;
      }
      for (;;) {
        if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_1)) {
          if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_1)) {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_3 = __pyx_t_12(__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 = 3079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "netCDF4.pyx":3080
 *                 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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __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(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_m);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_m);
        __Pyx_GIVEREF(__pyx_v_m);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_m, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "netCDF4.pyx":3081
 *                 for m in mval:
 *                     m =  numpy.array(m)
 *                     hasmval += data == m             # <<<<<<<<<<<<<<
 *             if mval.shape == () and mvalisnan:
 *                 mask = numpy.isnan(data)
 */
        __pyx_t_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_m, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_hasmval, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_hasmval, __pyx_t_3);
        __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L4:;

    /* "netCDF4.pyx":3082
 *                     m =  numpy.array(m)
 *                     hasmval += data == m
 *             if mval.shape == () and mvalisnan:             # <<<<<<<<<<<<<<
 *                 mask = numpy.isnan(data)
 *             elif hasmval.any():
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mval, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_6) {
      if (unlikely(!__pyx_v_mvalisnan)) { __Pyx_RaiseUnboundLocalError("mvalisnan"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_mvalisnan); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_13 = __pyx_t_5;
    } else {
      __pyx_t_13 = __pyx_t_6;
    }
    if (__pyx_t_13) {

      /* "netCDF4.pyx":3083
 *                     hasmval += data == m
 *             if mval.shape == () and mvalisnan:
 *                 mask = numpy.isnan(data)             # <<<<<<<<<<<<<<
 *             elif hasmval.any():
 *                 mask = hasmval
 */
      __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __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 = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __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 = 3083; __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_v_mask = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L17;
    }

    /* "netCDF4.pyx":3084
 *             if mval.shape == () and mvalisnan:
 *                 mask = numpy.isnan(data)
 *             elif hasmval.any():             # <<<<<<<<<<<<<<
 *                 mask = hasmval
 *             else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_hasmval, __pyx_n_s_any); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __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_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_13) {

      /* "netCDF4.pyx":3085
 *                 mask = numpy.isnan(data)
 *             elif hasmval.any():
 *                 mask = hasmval             # <<<<<<<<<<<<<<
 *             else:
 *                 mask = None
 */
      __Pyx_INCREF(__pyx_v_hasmval);
      __pyx_v_mask = __pyx_v_hasmval;
      goto __pyx_L17;
    }
    /*else*/ {

      /* "netCDF4.pyx":3087
 *                 mask = hasmval
 *             else:
 *                 mask = None             # <<<<<<<<<<<<<<
 *             if mask is not None:
 *                 fill_value = mval
 */
      __Pyx_INCREF(Py_None);
      __pyx_v_mask = Py_None;
    }
    __pyx_L17:;

    /* "netCDF4.pyx":3088
 *             else:
 *                 mask = None
 *             if mask is not None:             # <<<<<<<<<<<<<<
 *                 fill_value = mval
 *                 totalmask += mask
 */
    __pyx_t_13 = (__pyx_v_mask != Py_None);
    __pyx_t_6 = (__pyx_t_13 != 0);
    if (__pyx_t_6) {

      /* "netCDF4.pyx":3089
 *                 mask = None
 *             if mask is not None:
 *                 fill_value = mval             # <<<<<<<<<<<<<<
 *                 totalmask += mask
 *         if hasattr(self, '_FillValue'):
 */
      __Pyx_INCREF(__pyx_v_mval);
      __Pyx_DECREF_SET(__pyx_v_fill_value, __pyx_v_mval);

      /* "netCDF4.pyx":3090
 *             if mask is not None:
 *                 fill_value = mval
 *                 totalmask += mask             # <<<<<<<<<<<<<<
 *         if hasattr(self, '_FillValue'):
 *             fval = numpy.array(self._FillValue, self.dtype)
 */
      __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L18;
    }
    __pyx_L18:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":3091
 *                 fill_value = mval
 *                 totalmask += mask
 *         if hasattr(self, '_FillValue'):             # <<<<<<<<<<<<<<
 *             fval = numpy.array(self._FillValue, self.dtype)
 *             # is _FillValue a NaN?
 */
  __pyx_t_6 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = (__pyx_t_6 != 0);
  if (__pyx_t_13) {

    /* "netCDF4.pyx":3092
 *                 totalmask += mask
 *         if hasattr(self, '_FillValue'):
 *             fval = numpy.array(self._FillValue, self.dtype)             # <<<<<<<<<<<<<<
 *             # is _FillValue a NaN?
 *             try:
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __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 = 3092; __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(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(2); 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);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __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_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3092; __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_fval = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "netCDF4.pyx":3094
 *             fval = numpy.array(self._FillValue, self.dtype)
 *             # is _FillValue a NaN?
 *             try:             # <<<<<<<<<<<<<<
 *                 fvalisnan = numpy.isnan(fval)
 *             except TypeError: # isnan fails on some dtypes (issue 202)
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "netCDF4.pyx":3095
 *             # is _FillValue a NaN?
 *             try:
 *                 fvalisnan = numpy.isnan(fval)             # <<<<<<<<<<<<<<
 *             except TypeError: # isnan fails on some dtypes (issue 202)
 *                 fvalisnan = False
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3095; __pyx_clineno = __LINE__; goto __pyx_L20_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 = 3095; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3095; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_fval);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_fval);
        __Pyx_GIVEREF(__pyx_v_fval);
        __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 = 3095; __pyx_clineno = __LINE__; goto __pyx_L20_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_v_fvalisnan = __pyx_t_4;
        __pyx_t_4 = 0;
      }
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L27_try_end;
      __pyx_L20_error:;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "netCDF4.pyx":3096
 *             try:
 *                 fvalisnan = numpy.isnan(fval)
 *             except TypeError: # isnan fails on some dtypes (issue 202)             # <<<<<<<<<<<<<<
 *                 fvalisnan = False
 *             if fvalisnan:
 */
      __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
      if (__pyx_t_10) {
        __Pyx_AddTraceback("netCDF4.Variable._toma", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3096; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_1);

        /* "netCDF4.pyx":3097
 *                 fvalisnan = numpy.isnan(fval)
 *             except TypeError: # isnan fails on some dtypes (issue 202)
 *                 fvalisnan = False             # <<<<<<<<<<<<<<
 *             if fvalisnan:
 *                 mask = numpy.isnan(data)
 */
        __Pyx_INCREF(Py_False);
        __Pyx_XDECREF_SET(__pyx_v_fvalisnan, Py_False);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L21_exception_handled;
      }
      goto __pyx_L22_except_error;
      __pyx_L22_except_error:;
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L21_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      __pyx_L27_try_end:;
    }

    /* "netCDF4.pyx":3098
 *             except TypeError: # isnan fails on some dtypes (issue 202)
 *                 fvalisnan = False
 *             if fvalisnan:             # <<<<<<<<<<<<<<
 *                 mask = numpy.isnan(data)
 *             elif (data == fval).any():
 */
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_fvalisnan); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_13) {

      /* "netCDF4.pyx":3099
 *                 fvalisnan = False
 *             if fvalisnan:
 *                 mask = numpy.isnan(data)             # <<<<<<<<<<<<<<
 *             elif (data == fval).any():
 *                 mask = data==fval
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isnan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3099; __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(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3099; __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_XDECREF_SET(__pyx_v_mask, __pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L30;
    }

    /* "netCDF4.pyx":3100
 *             if fvalisnan:
 *                 mask = numpy.isnan(data)
 *             elif (data == fval).any():             # <<<<<<<<<<<<<<
 *                 mask = data==fval
 *             else:
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fval, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_any); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3100; __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_Call(__pyx_t_1, __pyx_empty_tuple, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_13) {

      /* "netCDF4.pyx":3101
 *                 mask = numpy.isnan(data)
 *             elif (data == fval).any():
 *                 mask = data==fval             # <<<<<<<<<<<<<<
 *             else:
 *                 mask = None
 */
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fval, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_XDECREF_SET(__pyx_v_mask, __pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L30;
    }
    /*else*/ {

      /* "netCDF4.pyx":3103
 *                 mask = data==fval
 *             else:
 *                 mask = None             # <<<<<<<<<<<<<<
 *             if mask is not None:
 *                 if fill_value is None:
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_mask, Py_None);
    }
    __pyx_L30:;

    /* "netCDF4.pyx":3104
 *             else:
 *                 mask = None
 *             if mask is not None:             # <<<<<<<<<<<<<<
 *                 if fill_value is None:
 *                     fill_value = fval
 */
    __pyx_t_13 = (__pyx_v_mask != Py_None);
    __pyx_t_6 = (__pyx_t_13 != 0);
    if (__pyx_t_6) {

      /* "netCDF4.pyx":3105
 *                 mask = None
 *             if mask is not None:
 *                 if fill_value is None:             # <<<<<<<<<<<<<<
 *                     fill_value = fval
 *                 totalmask += mask
 */
      __pyx_t_6 = (__pyx_v_fill_value == Py_None);
      __pyx_t_13 = (__pyx_t_6 != 0);
      if (__pyx_t_13) {

        /* "netCDF4.pyx":3106
 *             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_L32;
      }
      __pyx_L32:;

      /* "netCDF4.pyx":3107
 *                 if fill_value is None:
 *                     fill_value = fval
 *                 totalmask += mask             # <<<<<<<<<<<<<<
 *         # issue 209: don't return masked array if variable filling
 * 	# is disabled.
 */
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_totalmask, __pyx_t_4);
      __pyx_t_4 = 0;
      goto __pyx_L31;
    }
    __pyx_L31:;
    goto __pyx_L19;
  }
  /*else*/ {

    /* "netCDF4.pyx":3111
 * 	# is disabled.
 *         else:
 *              ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)             # <<<<<<<<<<<<<<
 *              if ierr != NC_NOERR:
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
    __pyx_v_ierr = nc_inq_var_fill(__pyx_v_self->_grpid, __pyx_v_self->_varid, (&__pyx_v_no_fill), NULL);

    /* "netCDF4.pyx":3112
 *         else:
 *              ierr = nc_inq_var_fill(self._grpid,self._varid,&no_fill,NULL)
 *              if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                  raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *              # if no_fill is not 1, and not a byte variable, then use default fill value.
 */
    __pyx_t_13 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_13) {

      /* "netCDF4.pyx":3113
 *              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_14 = ((char *)nc_strerror(__pyx_v_ierr));
      __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_14, 0, strlen(__pyx_t_14), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3113; __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 = 3113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":3126
 *              # 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 = default_fillvals[self.dtype.str[1:]]
 *                  has_fillval = data == fillval
 */
    __pyx_t_13 = ((__pyx_v_no_fill != 1) != 0);
    if (__pyx_t_13) {
      __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 = 3126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_4, 1, 0, NULL, NULL, &__pyx_slice__69, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3126; __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_PyString_Equals(__pyx_t_1, __pyx_n_s_u1, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_6) {
        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_i1, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_15 = __pyx_t_5;
      } else {
        __pyx_t_15 = __pyx_t_6;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_6 = (__pyx_t_15 != 0);
      __pyx_t_15 = __pyx_t_6;
    } else {
      __pyx_t_15 = __pyx_t_13;
    }
    if (__pyx_t_15) {

      /* "netCDF4.pyx":3127
 *              # value unless a _FillValue attribute is set explicitly."
 *              if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']:
 *                  fillval = default_fillvals[self.dtype.str[1:]]             # <<<<<<<<<<<<<<
 *                  has_fillval = data == fillval
 *                  # if data is an array scalar, has_fillval will be a boolean.
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3127; __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 = 3127; __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__70, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3127; __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 = 3127; __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_v_fillval = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "netCDF4.pyx":3128
 *              if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']:
 *                  fillval = default_fillvals[self.dtype.str[1:]]
 *                  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_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fillval, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_has_fillval = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "netCDF4.pyx":3131
 *                  # 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_4 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_has_fillval)), ((PyObject*)&PyBool_Type), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_15) {
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3131; __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 = 3131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_has_fillval);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_has_fillval);
        __Pyx_GIVEREF(__pyx_v_has_fillval);
        __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 = 3131; __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_DECREF_SET(__pyx_v_has_fillval, __pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L35;
      }
      __pyx_L35:;

      /* "netCDF4.pyx":3132
 *                  # in that case convert to an array.
 *                  if type(has_fillval) == bool: has_fillval=numpy.asarray(has_fillval)
 *                  if has_fillval.any():             # <<<<<<<<<<<<<<
 *                      mask=data==fillval
 *                      if fill_value is None:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_has_fillval, __pyx_n_s_any); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_15) {

        /* "netCDF4.pyx":3133
 *                  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_4 = PyObject_RichCompare(__pyx_v_data, __pyx_v_fillval, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_XDECREF_SET(__pyx_v_mask, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "netCDF4.pyx":3134
 *                  if has_fillval.any():
 *                      mask=data==fillval
 *                      if fill_value is None:             # <<<<<<<<<<<<<<
 *                          fill_value = fillval
 *                      totalmask += mask
 */
        __pyx_t_15 = (__pyx_v_fill_value == Py_None);
        __pyx_t_13 = (__pyx_t_15 != 0);
        if (__pyx_t_13) {

          /* "netCDF4.pyx":3135
 *                      mask=data==fillval
 *                      if fill_value is None:
 *                          fill_value = fillval             # <<<<<<<<<<<<<<
 *                      totalmask += mask
 *         # all values where data == missing_value or _FillValue are
 */
          __Pyx_INCREF(__pyx_v_fillval);
          __Pyx_DECREF_SET(__pyx_v_fill_value, __pyx_v_fillval);
          goto __pyx_L37;
        }
        __pyx_L37:;

        /* "netCDF4.pyx":3136
 *                      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_4 = PyNumber_InPlaceAdd(__pyx_v_totalmask, __pyx_v_mask); 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_DECREF_SET(__pyx_v_totalmask, __pyx_t_4);
        __pyx_t_4 = 0;
        goto __pyx_L36;
      }
      __pyx_L36:;
      goto __pyx_L34;
    }
    __pyx_L34:;
  }
  __pyx_L19:;

  /* "netCDF4.pyx":3140
 *         # 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_13 = (__pyx_v_fill_value != Py_None);
  __pyx_t_15 = (__pyx_t_13 != 0);
  if (__pyx_t_15) {

    /* "netCDF4.pyx":3141
 *         # otherwise _FillValue.
 *         if fill_value is not None:
 *             data = ma.masked_array(data,mask=totalmask,fill_value=fill_value)             # <<<<<<<<<<<<<<
 *         return data
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_masked_array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __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 = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_mask, __pyx_v_totalmask) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3141; __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;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L38;
  }
  __pyx_L38:;

  /* "netCDF4.pyx":3142
 *         if fill_value is not None:
 *             data = ma.masked_array(data,mask=totalmask,fill_value=fill_value)
 *         return data             # <<<<<<<<<<<<<<
 * 
 *     def _assign_vlen(self, elem, data):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_data);
  __pyx_r = __pyx_v_data;
  goto __pyx_L0;

  /* "netCDF4.pyx":3062
 *         return data
 * 
 *     def _toma(self,data):             # <<<<<<<<<<<<<<
 *         cdef int ierr, no_fill
 *         # private function for creating a masked array, masking missing_values
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_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":3144
 *         return data
 * 
 *     def _assign_vlen(self, elem, data):             # <<<<<<<<<<<<<<
 *         """private method to assign data to a single item in a VLEN variable"""
 *         cdef size_t startp[NC_MAX_DIMS]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_45_assign_vlen(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_44_assign_vlen[] = "private method to assign data to a single item in a VLEN variable";
static PyObject *__pyx_pw_7netCDF4_8Variable_45_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 = 3144; __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 = 3144; __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 = 3144; __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_44_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_44_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":3152
 *         cdef char **strdata
 *         cdef ndarray data2
 *         if not self._isvlen:             # <<<<<<<<<<<<<<
 *             raise TypeError('_assign_vlen method only for use with VLEN variables')
 *         ndims = self.ndim
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":3153
 *         cdef ndarray data2
 *         if not self._isvlen:
 *             raise TypeError('_assign_vlen method only for use with VLEN variables')             # <<<<<<<<<<<<<<
 *         ndims = self.ndim
 *         msg="single element VLEN slices must be specified by integers only"
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3153; __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 = 3153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":3154
 *         if not self._isvlen:
 *             raise TypeError('_assign_vlen method only for use with VLEN variables')
 *         ndims = self.ndim             # <<<<<<<<<<<<<<
 *         msg="single element VLEN slices must be specified by integers only"
 *         # check to see that elem is a tuple of integers.
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_self->ndim); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ndims = __pyx_t_4;

  /* "netCDF4.pyx":3155
 *             raise TypeError('_assign_vlen method only for use with VLEN variables')
 *         ndims = self.ndim
 *         msg="single element VLEN slices must be specified by integers only"             # <<<<<<<<<<<<<<
 *         # check to see that elem is a tuple of integers.
 *         # handle negative integers.
 */
  __Pyx_INCREF(__pyx_kp_s_single_element_VLEN_slices_must);
  __pyx_v_msg = __pyx_kp_s_single_element_VLEN_slices_must;

  /* "netCDF4.pyx":3158
 *         # check to see that elem is a tuple of integers.
 *         # handle negative integers.
 *         if isinstance(elem, int):             # <<<<<<<<<<<<<<
 *             if ndims > 1:
 *                 raise IndexError(msg)
 */
  __pyx_t_2 = PyInt_Check(__pyx_v_elem); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":3159
 *         # handle negative integers.
 *         if isinstance(elem, int):
 *             if ndims > 1:             # <<<<<<<<<<<<<<
 *                 raise IndexError(msg)
 *             if elem < 0:
 */
    __pyx_t_1 = ((__pyx_v_ndims > 1) != 0);
    if (__pyx_t_1) {

      /* "netCDF4.pyx":3160
 *         if isinstance(elem, int):
 *             if ndims > 1:
 *                 raise IndexError(msg)             # <<<<<<<<<<<<<<
 *             if elem < 0:
 *                 if self.shape[0]+elem >= 0:
 */
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3160; __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 = 3160; __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 = 3160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":3161
 *             if ndims > 1:
 *                 raise IndexError(msg)
 *             if elem < 0:             # <<<<<<<<<<<<<<
 *                 if self.shape[0]+elem >= 0:
 *                     elem = self.shape[0]+elem
 */
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_elem, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3161; __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 = 3161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "netCDF4.pyx":3162
 *                 raise IndexError(msg)
 *             if elem < 0:
 *                 if self.shape[0]+elem >= 0:             # <<<<<<<<<<<<<<
 *                     elem = self.shape[0]+elem
 *                 else:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; __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 = 3162; __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 = 3162; __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 = 3162; __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 = 3162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "netCDF4.pyx":3163
 *             if elem < 0:
 *                 if self.shape[0]+elem >= 0:
 *                     elem = self.shape[0]+elem             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise IndexError("Illegal index")
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; __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 = 3163; __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 = 3163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_elem, __pyx_t_3);
        __pyx_t_3 = 0;
        goto __pyx_L7;
      }
      /*else*/ {

        /* "netCDF4.pyx":3165
 *                     elem = self.shape[0]+elem
 *                 else:
 *                     raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
 *         elif isinstance(elem, tuple):
 *             if len(elem) != ndims:
 */
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __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 = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L7:;
      goto __pyx_L6;
    }
    __pyx_L6:;
    goto __pyx_L4;
  }

  /* "netCDF4.pyx":3166
 *                 else:
 *                     raise IndexError("Illegal index")
 *         elif isinstance(elem, tuple):             # <<<<<<<<<<<<<<
 *             if len(elem) != ndims:
 *                 raise IndexError("Illegal index")
 */
  __pyx_t_1 = PyTuple_Check(__pyx_v_elem); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":3167
 *                     raise IndexError("Illegal index")
 *         elif isinstance(elem, tuple):
 *             if len(elem) != ndims:             # <<<<<<<<<<<<<<
 *                 raise IndexError("Illegal index")
 *             elemnew = []
 */
    __pyx_t_6 = PyObject_Length(__pyx_v_elem); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = ((__pyx_t_6 != __pyx_v_ndims) != 0);
    if (__pyx_t_2) {

      /* "netCDF4.pyx":3168
 *         elif isinstance(elem, tuple):
 *             if len(elem) != ndims:
 *                 raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
 *             elemnew = []
 *             for n,e in enumerate(elem):
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __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 = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":3169
 *             if len(elem) != ndims:
 *                 raise IndexError("Illegal index")
 *             elemnew = []             # <<<<<<<<<<<<<<
 *             for n,e in enumerate(elem):
 *                 if not isinstance(e, int):
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_elemnew = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "netCDF4.pyx":3170
 *                 raise IndexError("Illegal index")
 *             elemnew = []
 *             for n,e in enumerate(elem):             # <<<<<<<<<<<<<<
 *                 if not isinstance(e, int):
 *                     raise IndexError(msg)
 */
    __pyx_t_4 = 0;
    if (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 = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext;
    }
    for (;;) {
      if (!__pyx_t_7 && 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 = 3170; __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 = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_3)) {
        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 = 3170; __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 = 3170; __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 = 3170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_v_n = __pyx_t_4;
      __pyx_t_4 = (__pyx_t_4 + 1);

      /* "netCDF4.pyx":3171
 *             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":3172
 *             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 = 3172; __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 = 3172; __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 = 3172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":3173
 *                 if not isinstance(e, int):
 *                     raise IndexError(msg)
 *                 elif e < 0:             # <<<<<<<<<<<<<<
 *                     enew = self.shape[n]+e
 *                     if enew < 0:
 */
      __pyx_t_8 = PyObject_RichCompare(__pyx_v_e, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3173; __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 = 3173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_1) {

        /* "netCDF4.pyx":3174
 *                     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 = 3174; __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 = 3174; __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 = 3174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_enew, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "netCDF4.pyx":3175
 *                 elif e < 0:
 *                     enew = self.shape[n]+e
 *                     if enew < 0:             # <<<<<<<<<<<<<<
 *                         raise IndexError("Illegal index")
 *                     else:
 */
        __pyx_t_8 = PyObject_RichCompare(__pyx_v_enew, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3175; __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 = 3175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (__pyx_t_1) {

          /* "netCDF4.pyx":3176
 *                     enew = self.shape[n]+e
 *                     if enew < 0:
 *                         raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
 *                     else:
 *                         elemnew.append(self.shape[n]+e)
 */
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3176; __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 = 3176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        /*else*/ {

          /* "netCDF4.pyx":3178
 *                         raise IndexError("Illegal index")
 *                     else:
 *                         elemnew.append(self.shape[n]+e)             # <<<<<<<<<<<<<<
 *                 else:
 *                     elemnew.append(e)
 */
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3178; __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 = 3178; __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 = 3178; __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 = 3178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L11;
      }
      /*else*/ {

        /* "netCDF4.pyx":3180
 *                         elemnew.append(self.shape[n]+e)
 *                 else:
 *                     elemnew.append(e)             # <<<<<<<<<<<<<<
 *             elem = tuple(elemnew)
 *         else:
 */
        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_elemnew, __pyx_v_e); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L11:;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "netCDF4.pyx":3181
 *                 else:
 *                     elemnew.append(e)
 *             elem = tuple(elemnew)             # <<<<<<<<<<<<<<
 *         else:
 *             raise IndexError(msg)
 */
    __pyx_t_3 = PyList_AsTuple(__pyx_v_elemnew); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3181; __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":3183
 *             elem = tuple(elemnew)
 *         else:
 *             raise IndexError(msg)             # <<<<<<<<<<<<<<
 *         # set start, count
 *         if isinstance(elem, tuple):
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3183; __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 = 3183; __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 = 3183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L4:;

  /* "netCDF4.pyx":3185
 *             raise IndexError(msg)
 *         # set start, count
 *         if isinstance(elem, tuple):             # <<<<<<<<<<<<<<
 *             start = list(elem)
 *         else:
 */
  __pyx_t_1 = PyTuple_Check(__pyx_v_elem); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":3186
 *         # set start, count
 *         if isinstance(elem, tuple):
 *             start = list(elem)             # <<<<<<<<<<<<<<
 *         else:
 *             start = [elem]
 */
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_elem);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_elem);
    __Pyx_GIVEREF(__pyx_v_elem);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_8, NULL); 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_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_start = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L13;
  }
  /*else*/ {

    /* "netCDF4.pyx":3188
 *             start = list(elem)
 *         else:
 *             start = [elem]             # <<<<<<<<<<<<<<
 *         count = [1]*ndims
 *         for n from 0 <= n < ndims:
 */
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_elem);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_elem);
    __Pyx_GIVEREF(__pyx_v_elem);
    __pyx_v_start = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L13:;

  /* "netCDF4.pyx":3189
 *         else:
 *             start = [elem]
 *         count = [1]*ndims             # <<<<<<<<<<<<<<
 *         for n from 0 <= n < ndims:
 *             startp[n] = start[n]
 */
  __pyx_t_3 = PyList_New(1 * ((__pyx_v_ndims<0) ? 0:__pyx_v_ndims)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  { 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_3, __pyx_temp, __pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
    }
  }
  __pyx_v_count = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "netCDF4.pyx":3190
 *             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":3191
 *         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_3 = __Pyx_GetItemInt_List(__pyx_v_start, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3191; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_startp[__pyx_v_n]) = __pyx_t_10;

    /* "netCDF4.pyx":3192
 *         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_3 = __Pyx_GetItemInt_List(__pyx_v_count, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_countp[__pyx_v_n]) = __pyx_t_10;
  }

  /* "netCDF4.pyx":3193
 *             startp[n] = start[n]
 *             countp[n] = count[n]
 *         if self.dtype == str: # VLEN string             # <<<<<<<<<<<<<<
 *             strdata = <char **>malloc(sizeof(char *))
 *             bytestr = _strencode(data)
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; __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 = 3193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "netCDF4.pyx":3194
 *             countp[n] = count[n]
 *         if self.dtype == str: # VLEN string
 *             strdata = <char **>malloc(sizeof(char *))             # <<<<<<<<<<<<<<
 *             bytestr = _strencode(data)
 *             strdata[0] = bytestr
 */
    __pyx_v_strdata = ((char **)malloc((sizeof(char *))));

    /* "netCDF4.pyx":3195
 *         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_3 = __pyx_f_7netCDF4__strencode(__pyx_v_data, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_bytestr = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "netCDF4.pyx":3196
 *             strdata = <char **>malloc(sizeof(char *))
 *             bytestr = _strencode(data)
 *             strdata[0] = bytestr             # <<<<<<<<<<<<<<
 *             ierr = nc_put_vara(self._grpid, self._varid,
 *                                startp, countp, strdata)
 */
    __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    (__pyx_v_strdata[0]) = __pyx_t_11;

    /* "netCDF4.pyx":3197
 *             bytestr = _strencode(data)
 *             strdata[0] = bytestr
 *             ierr = nc_put_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
 *                                startp, countp, strdata)
 *             if ierr != NC_NOERR:
 */
    __pyx_v_ierr = nc_put_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_strdata);

    /* "netCDF4.pyx":3199
 *             ierr = nc_put_vara(self._grpid, self._varid,
 *                                startp, countp, strdata)
 *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             free(strdata)
 */
    __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_2) {

      /* "netCDF4.pyx":3200
 *                                startp, countp, strdata)
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *             free(strdata)
 *         else: # regular VLEN
 */
      __pyx_t_11 = ((char *)nc_strerror(__pyx_v_ierr));
      __pyx_t_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 = 3200; __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 = 3200; __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 = 3200; __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 = 3200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":3201
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             free(strdata)             # <<<<<<<<<<<<<<
 *         else: # regular VLEN
 *             if data.dtype != self.dtype:
 */
    free(__pyx_v_strdata);
    goto __pyx_L16;
  }
  /*else*/ {

    /* "netCDF4.pyx":3203
 *             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_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_v_self->dtype, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_2) {

      /* "netCDF4.pyx":3204
 *         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_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_self->dtype);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->dtype);
      __Pyx_GIVEREF(__pyx_v_self->dtype);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_wrong_data_type_should_be_s_got, __pyx_t_3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __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 = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; __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 = 3204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":3205
 *             if data.dtype != self.dtype:
 *                 raise TypeError("wrong data type: should be %s, got %s" % (self.dtype,data.dtype))
 *             data2 = data             # <<<<<<<<<<<<<<
 *             vldata = <nc_vlen_t *>malloc(sizeof(nc_vlen_t))
 *             vldata[0].len = PyArray_SIZE(data2)
 */
    if (!(likely(((__pyx_v_data) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_data, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_8 = __pyx_v_data;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_v_data2 = ((PyArrayObject *)__pyx_t_8);
    __pyx_t_8 = 0;

    /* "netCDF4.pyx":3206
 *                 raise TypeError("wrong data type: should be %s, got %s" % (self.dtype,data.dtype))
 *             data2 = data
 *             vldata = <nc_vlen_t *>malloc(sizeof(nc_vlen_t))             # <<<<<<<<<<<<<<
 *             vldata[0].len = PyArray_SIZE(data2)
 *             vldata[0].p = data2.data
 */
    __pyx_v_vldata = ((nc_vlen_t *)malloc((sizeof(nc_vlen_t))));

    /* "netCDF4.pyx":3207
 *             data2 = data
 *             vldata = <nc_vlen_t *>malloc(sizeof(nc_vlen_t))
 *             vldata[0].len = PyArray_SIZE(data2)             # <<<<<<<<<<<<<<
 *             vldata[0].p = data2.data
 *             ierr = nc_put_vara(self._grpid, self._varid,
 */
    (__pyx_v_vldata[0]).len = PyArray_SIZE(__pyx_v_data2);

    /* "netCDF4.pyx":3208
 *             vldata = <nc_vlen_t *>malloc(sizeof(nc_vlen_t))
 *             vldata[0].len = PyArray_SIZE(data2)
 *             vldata[0].p = data2.data             # <<<<<<<<<<<<<<
 *             ierr = nc_put_vara(self._grpid, self._varid,
 *                                startp, countp, vldata)
 */
    __pyx_t_11 = __pyx_v_data2->data;
    (__pyx_v_vldata[0]).p = __pyx_t_11;

    /* "netCDF4.pyx":3209
 *             vldata[0].len = PyArray_SIZE(data2)
 *             vldata[0].p = data2.data
 *             ierr = nc_put_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
 *                                startp, countp, vldata)
 *             if ierr != NC_NOERR:
 */
    __pyx_v_ierr = nc_put_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_vldata);

    /* "netCDF4.pyx":3211
 *             ierr = nc_put_vara(self._grpid, self._varid,
 *                                startp, countp, vldata)
 *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             free(vldata)
 */
    __pyx_t_2 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_2) {

      /* "netCDF4.pyx":3212
 *                                startp, countp, vldata)
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *             free(vldata)
 * 
 */
      __pyx_t_11 = ((char *)nc_strerror(__pyx_v_ierr));
      __pyx_t_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 = 3212; __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 = 3212; __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 = 3212; __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 = 3212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":3213
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             free(vldata)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, elem, data):
 */
    free(__pyx_v_vldata);
  }
  __pyx_L16:;

  /* "netCDF4.pyx":3144
 *         return data
 * 
 *     def _assign_vlen(self, elem, data):             # <<<<<<<<<<<<<<
 *         """private method to assign data to a single item in a VLEN variable"""
 *         cdef size_t startp[NC_MAX_DIMS]
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("netCDF4.Variable._assign_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_data2);
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XDECREF(__pyx_v_elemnew);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_enew);
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XDECREF(__pyx_v_count);
  __Pyx_XDECREF(__pyx_v_bytestr);
  __Pyx_XDECREF(__pyx_v_elem);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3215
 *             free(vldata)
 * 
 *     def __setitem__(self, elem, data):             # <<<<<<<<<<<<<<
 *         # This special method is used to assign to the netCDF variable
 *         # using "extended slice syntax". The extended slice syntax
 */

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_47__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_data); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_47__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_46__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_46__setitem__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_elem, PyObject *__pyx_v_data) {
  PyObject *__pyx_v_msg = NULL;
  PyObject *__pyx_v_start = NULL;
  PyObject *__pyx_v_count = NULL;
  PyObject *__pyx_v_stride = NULL;
  PyObject *__pyx_v_put_ind = NULL;
  PyObject *__pyx_v_datashape = NULL;
  PyObject *__pyx_v_fillval = NULL;
  PyObject *__pyx_v_a = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_dataput = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  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)(PyObject *);
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);
  __Pyx_INCREF(__pyx_v_data);

  /* "netCDF4.pyx":3222
 *         # to use.
 * 
 *         if self._isvlen: # if vlen, should be object array (don't try casting)             # <<<<<<<<<<<<<<
 *             if self.dtype == str:
 *                 # for string vars, if data is not an array
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":3223
 * 
 *         if self._isvlen: # if vlen, should be object array (don't try casting)
 *             if self.dtype == str:             # <<<<<<<<<<<<<<
 *                 # for string vars, if data is not an array
 *                 # assume it is a python string and raise an error
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3223; __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 = 3223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "netCDF4.pyx":3227
 *                 # assume it is a python string and raise an error
 *                 # if it is an array, but not an object array.
 *                 if not hasattr(data,'ndim'):             # <<<<<<<<<<<<<<
 *                     self._assign_vlen(elem, data)
 *                     return
 */
      __pyx_t_1 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0);
      if (__pyx_t_3) {

        /* "netCDF4.pyx":3228
 *                 # 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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_assign_vlen); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3228; __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 = 3228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_elem);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_elem);
        __Pyx_GIVEREF(__pyx_v_elem);
        __Pyx_INCREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_4, 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 = 3228; __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_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "netCDF4.pyx":3229
 *                 if not hasattr(data,'ndim'):
 *                     self._assign_vlen(elem, data)
 *                     return             # <<<<<<<<<<<<<<
 *                 elif data.dtype.kind in ['S', 'U']:
 *                     data = data.astype(object)
 */
        __pyx_r = 0;
        goto __pyx_L0;
      }

      /* "netCDF4.pyx":3230
 *                     self._assign_vlen(elem, data)
 *                     return
 *                 elif data.dtype.kind in ['S', 'U']:             # <<<<<<<<<<<<<<
 *                     data = data.astype(object)
 *                 elif data.dtype.kind != 'O':
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_kind); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __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_S, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_3) {
        __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 = 3230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_6 = __pyx_t_1;
      } else {
        __pyx_t_6 = __pyx_t_3;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_3 = (__pyx_t_6 != 0);
      if (__pyx_t_3) {

        /* "netCDF4.pyx":3231
 *                     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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_astype); 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);
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_builtin_object);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_builtin_object);
        __Pyx_GIVEREF(__pyx_builtin_object);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; __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_5); __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
        __pyx_t_2 = 0;
        goto __pyx_L5;
      }

      /* "netCDF4.pyx":3232
 *                 elif data.dtype.kind in ['S', 'U']:
 *                     data = data.astype(object)
 *                 elif data.dtype.kind != 'O':             # <<<<<<<<<<<<<<
 *                     msg = ('only numpy string, unicode or object arrays can '
 *                            'be assigned to VLEN str var slices')
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_kind); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_3) {

        /* "netCDF4.pyx":3233
 *                     data = data.astype(object)
 *                 elif data.dtype.kind != 'O':
 *                     msg = ('only numpy string, unicode or object arrays can '             # <<<<<<<<<<<<<<
 *                            'be assigned to VLEN str var slices')
 *                     raise TypeError(msg)
 */
        __Pyx_INCREF(__pyx_kp_s_only_numpy_string_unicode_or_obj);
        __pyx_v_msg = __pyx_kp_s_only_numpy_string_unicode_or_obj;

        /* "netCDF4.pyx":3235
 *                     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 = PyTuple_New(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_INCREF(__pyx_v_msg);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_msg);
        __Pyx_GIVEREF(__pyx_v_msg);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; __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 = 3235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L5:;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "netCDF4.pyx":3240
 *                 # not an object array, assume it represents a single element
 *                 # of the vlen var.
 *                 if not hasattr(data,'ndim') or data.dtype.kind != 'O':             # <<<<<<<<<<<<<<
 *                     self._assign_vlen(elem, data)
 *                     return
 */
      __pyx_t_3 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = (!(__pyx_t_3 != 0));
      if (!__pyx_t_6) {
        __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 = 3240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_kind); 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_3 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_3 < 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_1 = __pyx_t_3;
      } else {
        __pyx_t_1 = __pyx_t_6;
      }
      if (__pyx_t_1) {

        /* "netCDF4.pyx":3241
 *                 # 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(((PyObject *)__pyx_v_self), __pyx_n_s_assign_vlen); 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 = PyTuple_New(2); 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_INCREF(__pyx_v_elem);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_elem);
        __Pyx_GIVEREF(__pyx_v_elem);
        __Pyx_INCREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_2, 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 = 3241; __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(__pyx_t_4); __pyx_t_4 = 0;

        /* "netCDF4.pyx":3242
 *                 if not hasattr(data,'ndim') or data.dtype.kind != 'O':
 *                     self._assign_vlen(elem, data)
 *                     return             # <<<<<<<<<<<<<<
 * 
 *         # A numpy array is needed. Convert if necessary.
 */
        __pyx_r = 0;
        goto __pyx_L0;
      }
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":3246
 *         # A numpy array is needed. Convert if necessary.
 *         # assume it's a numpy or masked array if it has an 'ndim' attribute.
 *         if not hasattr(data,'ndim'):             # <<<<<<<<<<<<<<
 *             # if auto scaling is to be done, don't cast to an integer yet.
 *             if self.scale and self.dtype.kind == 'i' and \
 */
  __pyx_t_1 = PyObject_HasAttr(__pyx_v_data, __pyx_n_s_ndim); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_6) {

    /* "netCDF4.pyx":3248
 *         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_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_6) {
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_i, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_1) {

        /* "netCDF4.pyx":3249
 *             # if auto scaling is to be done, don't cast to an integer yet.
 *             if self.scale and self.dtype.kind == 'i' and \
 *                hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'):             # <<<<<<<<<<<<<<
 *                 data = numpy.array(data,numpy.float)
 *             else:
 */
        __pyx_t_3 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = __pyx_t_3;
      } else {
        __pyx_t_7 = __pyx_t_1;
      }
      __pyx_t_1 = __pyx_t_7;
    } else {
      __pyx_t_1 = __pyx_t_6;
    }
    if (!__pyx_t_1) {
      __pyx_t_6 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = __pyx_t_6;
    } else {
      __pyx_t_7 = __pyx_t_1;
    }
    if (__pyx_t_7) {

      /* "netCDF4.pyx":3250
 *             if self.scale and self.dtype.kind == 'i' and \
 *                hasattr(self, 'scale_factor') or hasattr(self, 'add_offset'):
 *                 data = numpy.array(data,numpy.float)             # <<<<<<<<<<<<<<
 *             else:
 *                 data = numpy.array(data,self.dtype)
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __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[0]; __pyx_lineno = 3250; __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_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3250; __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 = 3250; __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 = 3250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_5 = 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 = 3250; __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_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
      __pyx_t_5 = 0;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "netCDF4.pyx":3252
 *                 data = numpy.array(data,numpy.float)
 *             else:
 *                 data = numpy.array(data,self.dtype)             # <<<<<<<<<<<<<<
 * 
 *         start, count, stride, put_ind =\
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3252; __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 = 3252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __Pyx_INCREF(__pyx_v_self->dtype);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self->dtype);
      __Pyx_GIVEREF(__pyx_v_self->dtype);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3252; __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_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
      __pyx_t_2 = 0;
    }
    __pyx_L8:;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "netCDF4.pyx":3255
 * 
 *         start, count, stride, put_ind =\
 *         _StartCountStride(elem,self.shape,self.dimensions,self._grp,datashape=data.shape)             # <<<<<<<<<<<<<<
 *         datashape = _out_array_shape(count)
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StartCountStride); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __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 = 3255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); 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);
  __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_v_elem);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_elem);
  __Pyx_GIVEREF(__pyx_v_elem);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->_grp);
  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_self->_grp);
  __Pyx_GIVEREF(__pyx_v_self->_grp);
  __pyx_t_5 = 0;
  __pyx_t_4 = 0;
  __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);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); 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);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_datashape, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, __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_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  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 != 4)) {
      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3254; __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_8 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_9 = PyTuple_GET_ITEM(sequence, 3); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_9 = PyList_GET_ITEM(sequence, 3); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_9);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_8,&__pyx_t_2,&__pyx_t_9};
      for (i=0; i < 4; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_8,&__pyx_t_2,&__pyx_t_9};
    __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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_L9_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 = 3254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_11 = NULL;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L10_unpacking_done;
    __pyx_L9_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 = 3254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L10_unpacking_done:;
  }

  /* "netCDF4.pyx":3254
 *                 data = numpy.array(data,self.dtype)
 * 
 *         start, count, stride, put_ind =\             # <<<<<<<<<<<<<<
 *         _StartCountStride(elem,self.shape,self.dimensions,self._grp,datashape=data.shape)
 *         datashape = _out_array_shape(count)
 */
  __pyx_v_start = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_count = __pyx_t_8;
  __pyx_t_8 = 0;
  __pyx_v_stride = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_put_ind = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "netCDF4.pyx":3256
 *         start, count, stride, put_ind =\
 *         _StartCountStride(elem,self.shape,self.dimensions,self._grp,datashape=data.shape)
 *         datashape = _out_array_shape(count)             # <<<<<<<<<<<<<<
 * 
 *         # if a numpy scalar, create an array of the right size
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_out_array_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_v_count);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_count);
  __Pyx_GIVEREF(__pyx_v_count);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3256; __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_v_datashape = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "netCDF4.pyx":3260
 *         # 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__pyx_t_7) {

    /* "netCDF4.pyx":3261
 *         # and fill with scalar values.
 *         if data.shape == ():
 *             data = numpy.tile(data,datashape)             # <<<<<<<<<<<<<<
 *         # reshape data array by adding extra singleton dimensions
 *         # if needed to conform with start,count,stride.
 */
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_tile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    __Pyx_INCREF(__pyx_v_datashape);
    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_datashape);
    __Pyx_GIVEREF(__pyx_v_datashape);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3261; __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_9); __pyx_t_9 = 0;
    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L11;
  }
  __pyx_L11:;

  /* "netCDF4.pyx":3264
 *         # 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_12 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_13 = PyObject_Length(__pyx_v_datashape); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((__pyx_t_12 != __pyx_t_13) != 0);
  if (__pyx_t_7) {

    /* "netCDF4.pyx":3266
 *         if len(data.shape) != len(datashape):
 *             # create a view so shape in caller is not modified (issue 90)
 *             data = data.view()             # <<<<<<<<<<<<<<
 *             data.shape = tuple(datashape)
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_view); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "netCDF4.pyx":3267
 *             # create a view so shape in caller is not modified (issue 90)
 *             data = data.view()
 *             data.shape = tuple(datashape)             # <<<<<<<<<<<<<<
 * 
 *         # Reshape these arrays so we can iterate over them.
 */
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_datashape);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_datashape);
    __Pyx_GIVEREF(__pyx_v_datashape);
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_data, __pyx_n_s_shape, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "netCDF4.pyx":3270
 * 
 *         # Reshape these arrays so we can iterate over them.
 *         start = start.reshape((-1, self.ndim or 1))             # <<<<<<<<<<<<<<
 *         count = count.reshape((-1, self.ndim or 1))
 *         stride = stride.reshape((-1, self.ndim or 1))
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_7) {
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_9 = __pyx_int_1;
  } else {
    __Pyx_INCREF(__pyx_v_self->ndim);
    __pyx_t_9 = __pyx_v_self->ndim;
  }
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3270; __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_start, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "netCDF4.pyx":3271
 *         # 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_7) {
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_9 = __pyx_int_1;
  } else {
    __Pyx_INCREF(__pyx_v_self->ndim);
    __pyx_t_9 = __pyx_v_self->ndim;
  }
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; __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_9); __pyx_t_9 = 0;
  __Pyx_DECREF_SET(__pyx_v_count, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "netCDF4.pyx":3272
 *         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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_stride, __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_7) {
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_9 = __pyx_int_1;
  } else {
    __Pyx_INCREF(__pyx_v_self->ndim);
    __pyx_t_9 = __pyx_v_self->ndim;
  }
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3272; __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_stride, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "netCDF4.pyx":3273
 *         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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_put_ind, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->ndim); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_7) {
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_9 = __pyx_int_1;
  } else {
    __Pyx_INCREF(__pyx_v_self->ndim);
    __pyx_t_9 = __pyx_v_self->ndim;
  }
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3273; __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_9); __pyx_t_9 = 0;
  __Pyx_DECREF_SET(__pyx_v_put_ind, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "netCDF4.pyx":3275
 *         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_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ncattrs); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_n_s_least_significant_digit, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_1 = (__pyx_t_7 != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":3276
 * 
 *         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_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_quantize); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __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_least_significant_digit); 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_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3276; __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);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); 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_9); __pyx_t_9 = 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_L13;
  }
  __pyx_L13:;

  /* "netCDF4.pyx":3285
 *         # 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_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->mask); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = __pyx_t_7;
  } else {
    __pyx_t_6 = __pyx_t_1;
  }
  if (__pyx_t_6) {

    /* "netCDF4.pyx":3288
 *             # 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_6 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!(__pyx_t_6 != 0)) {
      __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 = 3288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = (__pyx_t_1 != 0);
    } else {
      __pyx_t_7 = (__pyx_t_6 != 0);
    }
    if (__pyx_t_7) {

      /* "netCDF4.pyx":3290
 *             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_GetModuleGlobalName(__pyx_n_s_ma); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isMA); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; __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_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_6 = ((!__pyx_t_7) != 0);
      if (__pyx_t_6) {
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_toma); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        __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 = 3290; __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_5); __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
        __pyx_t_2 = 0;
        goto __pyx_L16;
      }
      __pyx_L16:;
      goto __pyx_L15;
    }
    __pyx_L15:;
    goto __pyx_L14;
  }
  __pyx_L14:;

  /* "netCDF4.pyx":3291
 *                 # 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_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->scale); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_6) {
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = __pyx_t_7;
  } else {
    __pyx_t_1 = __pyx_t_6;
  }
  if (__pyx_t_1) {

    /* "netCDF4.pyx":3293
 *         if self.scale and self._isprimitive:
 *             # pack non-masked values using scale_factor and add_offset
 *             if hasattr(self, 'scale_factor') and hasattr(self, 'add_offset'):             # <<<<<<<<<<<<<<
 *                 data = (data - self.add_offset)/self.scale_factor
 *                 if self.dtype.kind == 'i': data = numpy.around(data)
 */
    __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if ((__pyx_t_1 != 0)) {
      __pyx_t_6 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = (__pyx_t_6 != 0);
    } else {
      __pyx_t_7 = (__pyx_t_1 != 0);
    }
    if (__pyx_t_7) {

      /* "netCDF4.pyx":3294
 *             # 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_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 = 3294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyNumber_Subtract(__pyx_v_data, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3294; __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_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __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_9);
      __pyx_t_9 = 0;

      /* "netCDF4.pyx":3295
 *             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_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_i, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_7) {
        __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_around); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; __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_9); __pyx_t_9 = 0;
        __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L19;
      }
      __pyx_L19:;
      goto __pyx_L18;
    }

    /* "netCDF4.pyx":3296
 *                 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_7 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = (__pyx_t_7 != 0);
    if (__pyx_t_1) {

      /* "netCDF4.pyx":3297
 *                 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_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale_factor); 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_t_9 = __Pyx_PyNumber_Divide(__pyx_v_data, __pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "netCDF4.pyx":3298
 *             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_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_i, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_1) {
        __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_around); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; __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;
        goto __pyx_L20;
      }
      __pyx_L20:;
      goto __pyx_L18;
    }

    /* "netCDF4.pyx":3299
 *                 data = data/self.scale_factor
 *                 if self.dtype.kind == 'i': data = numpy.around(data)
 *             elif hasattr(self, 'add_offset'):             # <<<<<<<<<<<<<<
 *                 data = data - self.add_offset
 *                 if self.dtype.kind == 'i': data = numpy.around(data)
 */
    __pyx_t_1 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_add_offset); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = (__pyx_t_1 != 0);
    if (__pyx_t_7) {

      /* "netCDF4.pyx":3300
 *                 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_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 = 3300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = PyNumber_Subtract(__pyx_v_data, __pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "netCDF4.pyx":3301
 *             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_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_i, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_7) {
        __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_around); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3301; __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_9); __pyx_t_9 = 0;
        __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L21;
      }
      __pyx_L21:;
      goto __pyx_L18;
    }
    __pyx_L18:;

    /* "netCDF4.pyx":3302
 *                 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_ma); 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_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isMA); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); 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_INCREF(__pyx_v_data);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_data);
    __Pyx_GIVEREF(__pyx_v_data);
    __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 = 3302; __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_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_7) {

      /* "netCDF4.pyx":3306
 *                 # 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_7 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_7) {

        /* "netCDF4.pyx":3307
 *                 # 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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_all); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __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_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_in1d); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_mask); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_4 = PyObject_GetItem(__pyx_t_2, __pyx_t_8); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_8);
        __pyx_t_4 = 0;
        __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __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 = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 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;
        __pyx_t_6 = __pyx_t_1;
      } else {
        __pyx_t_6 = __pyx_t_7;
      }
      if (__pyx_t_6) {

        /* "netCDF4.pyx":3308
 *                 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_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_data); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_8);
        __pyx_t_8 = 0;
        goto __pyx_L23;
      }
      /*else*/ {

        /* "netCDF4.pyx":3310
 *                     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_6 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = (__pyx_t_6 != 0);
        if (__pyx_t_7) {

          /* "netCDF4.pyx":3314
 *                         # 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_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); 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_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); 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_5 = PyTuple_New(1); 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);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_8);
          __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, 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_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_shape); 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_8); __pyx_t_8 = 0;
          __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (__pyx_t_7) {

            /* "netCDF4.pyx":3315
 *                         # since we then don't know how to fill in masked values.
 *                         if numpy.array(self.missing_value).shape == ():
 *                             fillval = self.missing_value             # <<<<<<<<<<<<<<
 *                         else:
 *                             msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar"
 */
            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_missing_value); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_v_fillval = __pyx_t_8;
            __pyx_t_8 = 0;
            goto __pyx_L25;
          }
          /*else*/ {

            /* "netCDF4.pyx":3317
 *                             fillval = self.missing_value
 *                         else:
 *                             msg="cannot assign fill_value for masked array when missing_value attribute is not a scalar"             # <<<<<<<<<<<<<<
 *                             raise RuntimeError(msg)
 *                         if numpy.array(fillval).shape != ():
 */
            __Pyx_INCREF(__pyx_kp_s_cannot_assign_fill_value_for_mas);
            __pyx_v_msg = __pyx_kp_s_cannot_assign_fill_value_for_mas;

            /* "netCDF4.pyx":3318
 *                         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_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);
            __Pyx_INCREF(__pyx_v_msg);
            PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_msg);
            __Pyx_GIVEREF(__pyx_v_msg);
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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 = 3318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_L25:;

          /* "netCDF4.pyx":3319
 *                             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_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_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_v_fillval);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_fillval);
          __Pyx_GIVEREF(__pyx_v_fillval);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_empty_tuple, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (__pyx_t_7) {

            /* "netCDF4.pyx":3320
 *                             raise RuntimeError(msg)
 *                         if numpy.array(fillval).shape != ():
 *                             fillval = fillval[0]             # <<<<<<<<<<<<<<
 *                     elif hasattr(self, '_FillValue'):
 *                         fillval = self._FillValue
 */
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_fillval, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3320; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF_SET(__pyx_v_fillval, __pyx_t_2);
            __pyx_t_2 = 0;
            goto __pyx_L26;
          }
          __pyx_L26:;
          goto __pyx_L24;
        }

        /* "netCDF4.pyx":3321
 *                         if numpy.array(fillval).shape != ():
 *                             fillval = fillval[0]
 *                     elif hasattr(self, '_FillValue'):             # <<<<<<<<<<<<<<
 *                         fillval = self._FillValue
 *                     else:
 */
        __pyx_t_7 = PyObject_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_FillValue); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_6 = (__pyx_t_7 != 0);
        if (__pyx_t_6) {

          /* "netCDF4.pyx":3322
 *                             fillval = fillval[0]
 *                     elif hasattr(self, '_FillValue'):
 *                         fillval = self._FillValue             # <<<<<<<<<<<<<<
 *                     else:
 *                         fillval = default_fillvals[self.dtype.str[1:]]
 */
          __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 = 3322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_v_fillval = __pyx_t_2;
          __pyx_t_2 = 0;
          goto __pyx_L24;
        }
        /*else*/ {

          /* "netCDF4.pyx":3324
 *                         fillval = self._FillValue
 *                     else:
 *                         fillval = default_fillvals[self.dtype.str[1:]]             # <<<<<<<<<<<<<<
 *                     data = data.filled(fill_value=fillval)
 * 
 */
          __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_fillvals); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->dtype, __pyx_n_s_str); 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_8 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__75, 1, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = PyObject_GetItem(__pyx_t_2, __pyx_t_8); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3324; __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_8); __pyx_t_8 = 0;
          __pyx_v_fillval = __pyx_t_5;
          __pyx_t_5 = 0;
        }
        __pyx_L24:;

        /* "netCDF4.pyx":3325
 *                     else:
 *                         fillval = default_fillvals[self.dtype.str[1:]]
 *                     data = data.filled(fill_value=fillval)             # <<<<<<<<<<<<<<
 * 
 *         # Fill output array with data chunks.
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_filled); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_fill_value, __pyx_v_fillval) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3325; __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_8); __pyx_t_8 = 0;
        __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_2);
        __pyx_t_2 = 0;
      }
      __pyx_L23:;
      goto __pyx_L22;
    }
    __pyx_L22:;
    goto __pyx_L17;
  }
  __pyx_L17:;

  /* "netCDF4.pyx":3328
 * 
 *         # Fill output array with data chunks.
 *         for (a,b,c,i) in zip(start, count, stride, put_ind):             # <<<<<<<<<<<<<<
 *             dataput = data[tuple(i)]
 *             if dataput.size == 0: continue # nothing to write
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_v_start);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_start);
  __Pyx_GIVEREF(__pyx_v_start);
  __Pyx_INCREF(__pyx_v_count);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_count);
  __Pyx_GIVEREF(__pyx_v_count);
  __Pyx_INCREF(__pyx_v_stride);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_stride);
  __Pyx_GIVEREF(__pyx_v_stride);
  __Pyx_INCREF(__pyx_v_put_ind);
  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_put_ind);
  __Pyx_GIVEREF(__pyx_v_put_ind);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __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_8); __pyx_t_8 = 0;
  if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_8 = __pyx_t_5; __Pyx_INCREF(__pyx_t_8); __pyx_t_13 = 0;
    __pyx_t_14 = NULL;
  } else {
    __pyx_t_13 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_14 = Py_TYPE(__pyx_t_8)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (!__pyx_t_14 && PyList_CheckExact(__pyx_t_8)) {
      if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_13); __Pyx_INCREF(__pyx_t_5); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_14 && PyTuple_CheckExact(__pyx_t_8)) {
      if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_13); __Pyx_INCREF(__pyx_t_5); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_5 = __pyx_t_14(__pyx_t_8);
      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 = 3328; __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 != 4)) {
        if (size > 4) __Pyx_RaiseTooManyValuesError(4);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __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_4 = 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_4 = 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_4);
      __Pyx_INCREF(__pyx_t_10);
      #else
      {
        Py_ssize_t i;
        PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_9,&__pyx_t_4,&__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 = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(item);
          *(temps[i]) = item;
        }
      }
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      Py_ssize_t index = -1;
      PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_9,&__pyx_t_4,&__pyx_t_10};
      __pyx_t_15 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_15)->tp_iternext;
      for (index=0; index < 4; index++) {
        PyObject* item = __pyx_t_11(__pyx_t_15); if (unlikely(!item)) goto __pyx_L29_unpacking_failed;
        __Pyx_GOTREF(item);
        *(temps[index]) = item;
      }
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_15), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      goto __pyx_L30_unpacking_done;
      __pyx_L29_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 = 3328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L30_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_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_10);
    __pyx_t_10 = 0;

    /* "netCDF4.pyx":3329
 *         # 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_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_i);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_i);
    __Pyx_GIVEREF(__pyx_v_i);
    __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_GetItem(__pyx_v_data, __pyx_t_10); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3329; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF_SET(__pyx_v_dataput, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "netCDF4.pyx":3330
 *         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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_size); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = PyObject_RichCompare(__pyx_t_5, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_6) {
      goto __pyx_L27_continue;
    }

    /* "netCDF4.pyx":3332
 *             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_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_dataput, __pyx_n_s_shape); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_10, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {

      /* "netCDF4.pyx":3333
 *             # convert array scalar to regular array with one element.
 *             if dataput.shape == ():
 *                 if self._isvlen:             # <<<<<<<<<<<<<<
 *                     dataput=numpy.array(dataput,'O')
 *                 else:
 */
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_6) {

        /* "netCDF4.pyx":3334
 *             if dataput.shape == ():
 *                 if self._isvlen:
 *                     dataput=numpy.array(dataput,'O')             # <<<<<<<<<<<<<<
 *                 else:
 *                     dataput=numpy.array(dataput,dataput.dtype)
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __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 = 3334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_dataput);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_dataput);
        __Pyx_GIVEREF(__pyx_v_dataput);
        __Pyx_INCREF(__pyx_n_s_O);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_O);
        __Pyx_GIVEREF(__pyx_n_s_O);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_dataput, __pyx_t_4);
        __pyx_t_4 = 0;
        goto __pyx_L33;
      }
      /*else*/ {

        /* "netCDF4.pyx":3336
 *                     dataput=numpy.array(dataput,'O')
 *                 else:
 *                     dataput=numpy.array(dataput,dataput.dtype)             # <<<<<<<<<<<<<<
 *             self._put(dataput,a,b,c)
 * 
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __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(__pyx_v_dataput, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_v_dataput);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_dataput);
        __Pyx_GIVEREF(__pyx_v_dataput);
        PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF_SET(__pyx_v_dataput, __pyx_t_4);
        __pyx_t_4 = 0;
      }
      __pyx_L33:;
      goto __pyx_L32;
    }
    __pyx_L32:;

    /* "netCDF4.pyx":3337
 *                 else:
 *                     dataput=numpy.array(dataput,dataput.dtype)
 *             self._put(dataput,a,b,c)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_put); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_dataput);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_dataput);
    __Pyx_GIVEREF(__pyx_v_dataput);
    __Pyx_INCREF(__pyx_v_a);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_a);
    __Pyx_GIVEREF(__pyx_v_a);
    __Pyx_INCREF(__pyx_v_b);
    PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_b);
    __Pyx_GIVEREF(__pyx_v_b);
    __Pyx_INCREF(__pyx_v_c);
    PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_v_c);
    __Pyx_GIVEREF(__pyx_v_c);
    __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 = 3337; __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_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_L27_continue:;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "netCDF4.pyx":3215
 *             free(vldata)
 * 
 *     def __setitem__(self, elem, data):             # <<<<<<<<<<<<<<
 *         # This special method is used to assign to the netCDF variable
 *         # using "extended slice syntax". The extended slice syntax
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("netCDF4.Variable.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XDECREF(__pyx_v_count);
  __Pyx_XDECREF(__pyx_v_stride);
  __Pyx_XDECREF(__pyx_v_put_ind);
  __Pyx_XDECREF(__pyx_v_datashape);
  __Pyx_XDECREF(__pyx_v_fillval);
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_dataput);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3340
 * 
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.shape[0]
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_7netCDF4_8Variable_49__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_7netCDF4_8Variable_49__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_48__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_48__len__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "netCDF4.pyx":3341
 * 
 *     def __len__(self):
 *         return self.shape[0]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3341; __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 = 3341; __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 = 3341; __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":3340
 * 
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.shape[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("netCDF4.Variable.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3344
 * 
 * 
 *     def assignValue(self,val):             # <<<<<<<<<<<<<<
 *         """
 * assignValue(self, val)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_51assignValue(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_50assignValue[] = "\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_51assignValue(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_50assignValue(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_50assignValue(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assignValue", 0);

  /* "netCDF4.pyx":3350
 * assign a value to a scalar variable.  Provided for compatibility with
 * Scientific.IO.NetCDF, can also be done by assigning to a slice ([:])."""
 *         if len(self.dimensions):             # <<<<<<<<<<<<<<
 *             raise IndexError('to assign values to a non-scalar variable, use a slice')
 *         self[:]=val
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3350; __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 = 3350; __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":3351
 * Scientific.IO.NetCDF, can also be done by assigning to a slice ([:])."""
 *         if len(self.dimensions):
 *             raise IndexError('to assign values to a non-scalar variable, use a slice')             # <<<<<<<<<<<<<<
 *         self[:]=val
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__76, NULL); 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_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":3352
 *         if len(self.dimensions):
 *             raise IndexError('to assign values to a non-scalar variable, use a slice')
 *         self[:]=val             # <<<<<<<<<<<<<<
 * 
 *     def getValue(self):
 */
  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self), __pyx_v_val, 0, 0, NULL, NULL, &__pyx_slice__77, 0, 0, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":3344
 * 
 * 
 *     def assignValue(self,val):             # <<<<<<<<<<<<<<
 *         """
 * assignValue(self, val)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Variable.assignValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3354
 *         self[:]=val
 * 
 *     def getValue(self):             # <<<<<<<<<<<<<<
 *         """
 * getValue(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_53getValue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_52getValue[] = "\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_53getValue(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_52getValue(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_52getValue(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getValue", 0);

  /* "netCDF4.pyx":3360
 * get the value of a scalar variable.  Provided for compatibility with
 * Scientific.IO.NetCDF, can also be done by slicing ([:])."""
 *         if len(self.dimensions):             # <<<<<<<<<<<<<<
 *             raise IndexError('to retrieve values from a non-scalar variable, use slicing')
 *         return self[slice(None)]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dimensions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3360; __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 = 3360; __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":3361
 * Scientific.IO.NetCDF, can also be done by slicing ([:])."""
 *         if len(self.dimensions):
 *             raise IndexError('to retrieve values from a non-scalar variable, use slicing')             # <<<<<<<<<<<<<<
 *         return self[slice(None)]
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__78, NULL); 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_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":3362
 *         if len(self.dimensions):
 *             raise IndexError('to retrieve values from a non-scalar variable, use slicing')
 *         return self[slice(None)]             # <<<<<<<<<<<<<<
 * 
 *     def set_auto_maskandscale(self,maskandscale):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_tuple__79, NULL); 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 = PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_t_1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "netCDF4.pyx":3354
 *         self[:]=val
 * 
 *     def getValue(self):             # <<<<<<<<<<<<<<
 *         """
 * getValue(self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("netCDF4.Variable.getValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3364
 *         return self[slice(None)]
 * 
 *     def set_auto_maskandscale(self,maskandscale):             # <<<<<<<<<<<<<<
 *         """
 * set_auto_maskandscale(self,maskandscale)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_55set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_maskandscale); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_54set_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 value specified by the \nmissing_value variable attribute. The fill_value of the masked array\nis set to the missing_value attribute (if it exists), otherwise\nthe netCDF _FillValue attribute (which has a default value\nfor each data type).  When data is written to a variable, the masked\narray is converted back to a regular numpy array by replacing all the\nmasked values by the fill_value of the masked array.\n\nIf C{maskandscale} 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    data = (data - self.add_offset)/self.scale_factor\n\nIf either scale_factor is present, but add_offset is missing, add_offset\nis assumed zero.  If add_offset is present, but scale_factor is missing,\nscale_factor is assumed to be one.\nFor more information on how C{scale_factor} and C{add_offset} can be \nused to provide simple compression, see\nU{http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml\n<http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml>}.\n\nThe default value of C{maskandscale} is C{True}\n(automatic conversions are performed).\n        ";
static PyObject *__pyx_pw_7netCDF4_8Variable_55set_auto_maskandscale(PyObject *__pyx_v_self, PyObject *__pyx_v_maskandscale) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_auto_maskandscale (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_54set_auto_maskandscale(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_maskandscale));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_54set_auto_maskandscale(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_maskandscale) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_auto_maskandscale", 0);

  /* "netCDF4.pyx":3403
 * (automatic conversions are performed).
 *         """
 *         if maskandscale:             # <<<<<<<<<<<<<<
 *             self.scale = True
 *             self.mask = True
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_maskandscale); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":3404
 *         """
 *         if maskandscale:
 *             self.scale = True             # <<<<<<<<<<<<<<
 *             self.mask = True
 *         else:
 */
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    __Pyx_GOTREF(__pyx_v_self->scale);
    __Pyx_DECREF(__pyx_v_self->scale);
    __pyx_v_self->scale = Py_True;

    /* "netCDF4.pyx":3405
 *         if maskandscale:
 *             self.scale = True
 *             self.mask = True             # <<<<<<<<<<<<<<
 *         else:
 *             self.scale = False
 */
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    __Pyx_GOTREF(__pyx_v_self->mask);
    __Pyx_DECREF(__pyx_v_self->mask);
    __pyx_v_self->mask = Py_True;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "netCDF4.pyx":3407
 *             self.mask = True
 *         else:
 *             self.scale = False             # <<<<<<<<<<<<<<
 *             self.mask = False
 * 
 */
    __Pyx_INCREF(Py_False);
    __Pyx_GIVEREF(Py_False);
    __Pyx_GOTREF(__pyx_v_self->scale);
    __Pyx_DECREF(__pyx_v_self->scale);
    __pyx_v_self->scale = Py_False;

    /* "netCDF4.pyx":3408
 *         else:
 *             self.scale = False
 *             self.mask = False             # <<<<<<<<<<<<<<
 * 
 *     def set_auto_scale(self,scale):
 */
    __Pyx_INCREF(Py_False);
    __Pyx_GIVEREF(Py_False);
    __Pyx_GOTREF(__pyx_v_self->mask);
    __Pyx_DECREF(__pyx_v_self->mask);
    __pyx_v_self->mask = Py_False;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":3364
 *         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":3410
 *             self.mask = False
 * 
 *     def set_auto_scale(self,scale):             # <<<<<<<<<<<<<<
 *         """
 * set_auto_scale(self,scale)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_57set_auto_scale(PyObject *__pyx_v_self, PyObject *__pyx_v_scale); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_56set_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    data = (data - self.add_offset)/self.scale_factor\n\nIf either scale_factor is present, but add_offset is missing, add_offset\nis assumed zero.  If add_offset is present, but scale_factor is missing,\nscale_factor is assumed to be one.\nFor more information on how C{scale_factor} and C{add_offset} can be\nused to provide simple compression, see\nU{http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml\n<http://www.cdc.noaa.gov/cdc/conventions/cdc_netcdf_standard.shtml>}.\n\nThe default value of C{scale} is C{True}\n(automatic conversions are performed).\n        ";
static PyObject *__pyx_pw_7netCDF4_8Variable_57set_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_56set_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_56set_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":3438
 * (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 = 3438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":3439
 *         """
 *         if scale:
 *             self.scale = True             # <<<<<<<<<<<<<<
 *         else:
 *             self.scale = False
 */
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    __Pyx_GOTREF(__pyx_v_self->scale);
    __Pyx_DECREF(__pyx_v_self->scale);
    __pyx_v_self->scale = Py_True;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "netCDF4.pyx":3441
 *             self.scale = True
 *         else:
 *             self.scale = False             # <<<<<<<<<<<<<<
 * 
 *     def set_auto_mask(self,mask):
 */
    __Pyx_INCREF(Py_False);
    __Pyx_GIVEREF(Py_False);
    __Pyx_GOTREF(__pyx_v_self->scale);
    __Pyx_DECREF(__pyx_v_self->scale);
    __pyx_v_self->scale = Py_False;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":3410
 *             self.mask = False
 * 
 *     def set_auto_scale(self,scale):             # <<<<<<<<<<<<<<
 *         """
 * set_auto_scale(self,scale)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("netCDF4.Variable.set_auto_scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3443
 *             self.scale = False
 * 
 *     def set_auto_mask(self,mask):             # <<<<<<<<<<<<<<
 *         """
 * set_auto_mask(self,mask)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_59set_auto_mask(PyObject *__pyx_v_self, PyObject *__pyx_v_mask); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_58set_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 (if it exists), otherwise\nthe netCDF _FillValue attribute (which has a default value\nfor each data type).  When data is written to a variable, the masked\narray is converted back to a regular numpy array by replacing all the\nmasked values by the fill_value of the masked array.\n\nThe default value of C{mask} is C{True}\n(automatic conversions are performed).\n        ";
static PyObject *__pyx_pw_7netCDF4_8Variable_59set_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_58set_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_58set_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":3463
 * (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 = 3463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "netCDF4.pyx":3464
 *         """
 *         if mask:
 *             self.mask = True             # <<<<<<<<<<<<<<
 *         else:
 *             self.mask = False
 */
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    __Pyx_GOTREF(__pyx_v_self->mask);
    __Pyx_DECREF(__pyx_v_self->mask);
    __pyx_v_self->mask = Py_True;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "netCDF4.pyx":3466
 *             self.mask = True
 *         else:
 *             self.mask = False             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_INCREF(Py_False);
    __Pyx_GIVEREF(Py_False);
    __Pyx_GOTREF(__pyx_v_self->mask);
    __Pyx_DECREF(__pyx_v_self->mask);
    __pyx_v_self->mask = Py_False;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":3443
 *             self.scale = False
 * 
 *     def set_auto_mask(self,mask):             # <<<<<<<<<<<<<<
 *         """
 * set_auto_mask(self,mask)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("netCDF4.Variable.set_auto_mask", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3469
 * 
 * 
 *     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_61_put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_60_put[] = "Private method to put data into a netCDF variable";
static PyObject *__pyx_pw_7netCDF4_8Variable_61_put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_data = 0;
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_count = 0;
  PyObject *__pyx_v_stride = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_put (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_start,&__pyx_n_s_count,&__pyx_n_s_stride,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_put", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3469; __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 = 3469; __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 = 3469; __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 = 3469; __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 = 3469; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.Variable._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_7netCDF4_ndarray, 1, "data", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_7netCDF4_8Variable_60_put(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), __pyx_v_data, __pyx_v_start, __pyx_v_count, __pyx_v_stride);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_60_put(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyArrayObject *__pyx_v_data, PyObject *__pyx_v_start, PyObject *__pyx_v_count, PyObject *__pyx_v_stride) {
  int __pyx_v_ierr;
  int __pyx_v_ndims;
  npy_intp __pyx_v_totelem;
  size_t __pyx_v_startp[NC_MAX_DIMS];
  size_t __pyx_v_countp[NC_MAX_DIMS];
  ptrdiff_t __pyx_v_stridep[NC_MAX_DIMS];
  char **__pyx_v_strdata;
  void *__pyx_v_elptr;
  char *__pyx_v_databuff;
  PyArrayObject *__pyx_v_dataarr = 0;
  nc_vlen_t *__pyx_v_vldata;
  long __pyx_v_negstride;
  PyObject *__pyx_v_sl = NULL;
  PyObject *__pyx_v_n = NULL;
  npy_intp __pyx_v_dataelem;
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  long __pyx_t_6;
  size_t __pyx_t_7;
  ptrdiff_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  char *__pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  npy_intp __pyx_t_17;
  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":3482
 *         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 = 3482; __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 = 3482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ndims = __pyx_t_2;

  /* "netCDF4.pyx":3485
 *         # 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":3486
 *         # if not, make a local copy.
 *         if not PyArray_ISCONTIGUOUS(data):
 *             data = data.copy()             # <<<<<<<<<<<<<<
 *         # fill up startp,countp,stridep.
 *         totelem = 1
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); 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_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 = 3486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_4));
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":3488
 *             data = data.copy()
 *         # fill up startp,countp,stridep.
 *         totelem = 1             # <<<<<<<<<<<<<<
 *         negstride = 0
 *         sl = []
 */
  __pyx_v_totelem = 1;

  /* "netCDF4.pyx":3489
 *         # fill up startp,countp,stridep.
 *         totelem = 1
 *         negstride = 0             # <<<<<<<<<<<<<<
 *         sl = []
 *         for n from 0 <= n < ndims:
 */
  __pyx_v_negstride = 0;

  /* "netCDF4.pyx":3490
 *         totelem = 1
 *         negstride = 0
 *         sl = []             # <<<<<<<<<<<<<<
 *         for n from 0 <= n < ndims:
 *             count[n] = abs(count[n]) # make -1 into +1
 */
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_sl = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "netCDF4.pyx":3491
 *         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_v_ndims;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
    __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_t_6); 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_XDECREF_SET(__pyx_v_n, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "netCDF4.pyx":3492
 *         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 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3492; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyNumber_Absolute(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_count, __pyx_v_n, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "netCDF4.pyx":3493
 *         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_1 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3493; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 3493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    (__pyx_v_countp[__pyx_t_2]) = __pyx_t_7;

    /* "netCDF4.pyx":3495
 *             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 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3495; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3495; __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 = 3495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "netCDF4.pyx":3496
 *             # 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":3497
 *             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_4 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3497; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = PyNumber_Negative(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3497; __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_PyInt_As_ptrdiff_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (ptrdiff_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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 = 3497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      (__pyx_v_stridep[__pyx_t_2]) = __pyx_t_8;

      /* "netCDF4.pyx":3498
 *                 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_1 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3498; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3498; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = PyObject_GetItem(__pyx_v_count, __pyx_v_n); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3498; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = PyNumber_Subtract(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyNumber_Multiply(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3498; __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_9); __pyx_t_9 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_10); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3498; __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 = 3498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      (__pyx_v_startp[__pyx_t_2]) = __pyx_t_7;

      /* "netCDF4.pyx":3499
 *                 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 = 3499; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(PyObject_SetItem(__pyx_v_stride, __pyx_v_n, __pyx_t_9) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "netCDF4.pyx":3500
 *                 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_9 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_tuple__80, NULL); 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_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_t_9); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "netCDF4.pyx":3502
 *                 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_9 = PyObject_GetItem(__pyx_v_start, __pyx_v_n); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3502; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_9); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) {__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_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 = 3502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      (__pyx_v_startp[__pyx_t_2]) = __pyx_t_7;

      /* "netCDF4.pyx":3503
 *             else:
 *                 startp[n] = start[n]
 *                 stridep[n] = stride[n]             # <<<<<<<<<<<<<<
 *                 sl.append(slice(None,None, 1))
 *             totelem = totelem*countp[n]
 */
      __pyx_t_9 = PyObject_GetItem(__pyx_v_stride, __pyx_v_n); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3503; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __Pyx_PyInt_As_ptrdiff_t(__pyx_t_9); if (unlikely((__pyx_t_8 == (ptrdiff_t)-1) && PyErr_Occurred())) {__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_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 = 3503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      (__pyx_v_stridep[__pyx_t_2]) = __pyx_t_8;

      /* "netCDF4.pyx":3504
 *                 startp[n] = start[n]
 *                 stridep[n] = stride[n]
 *                 sl.append(slice(None,None, 1))             # <<<<<<<<<<<<<<
 *             totelem = totelem*countp[n]
 *         # check to see that size of data array is what is expected
 */
      __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_t_9); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_L6:;

    /* "netCDF4.pyx":3505
 *                 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 = 3505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_totelem = (__pyx_v_totelem * (__pyx_v_countp[__pyx_t_2]));
    __pyx_t_6 = __Pyx_PyInt_As_long(__pyx_v_n); if (unlikely((__pyx_t_6 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":3491
 *         negstride = 0
 *         sl = []
 *         for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
 *             count[n] = abs(count[n]) # make -1 into +1
 *             countp[n] = count[n]
 */
  __pyx_t_9 = __Pyx_PyInt_From_long(__pyx_t_6); 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_XDECREF_SET(__pyx_v_n, __pyx_t_9);
  __pyx_t_9 = 0;

  /* "netCDF4.pyx":3508
 *         # check to see that size of data array is what is expected
 *         # for slice given.
 *         dataelem = PyArray_SIZE(data)             # <<<<<<<<<<<<<<
 *         if totelem != dataelem:
 *             raise IndexError('size of data array does not conform to slice')
 */
  __pyx_v_dataelem = PyArray_SIZE(__pyx_v_data);

  /* "netCDF4.pyx":3509
 *         # for slice given.
 *         dataelem = PyArray_SIZE(data)
 *         if totelem != dataelem:             # <<<<<<<<<<<<<<
 *             raise IndexError('size of data array does not conform to slice')
 *         if negstride:
 */
  __pyx_t_3 = ((__pyx_v_totelem != __pyx_v_dataelem) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":3510
 *         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_9 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_Raise(__pyx_t_9, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":3511
 *         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":3513
 *         if negstride:
 *             # reverse data along axes with negative strides.
 *             data = data[sl].copy() # make sure a copy is made.             # <<<<<<<<<<<<<<
 *         if self._isprimitive or self._iscompound:
 *             # primitive or compound data type.
 */
    __pyx_t_9 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_copy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_9));
    __pyx_t_9 = 0;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "netCDF4.pyx":3514
 *             # 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_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_3) {
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = __pyx_t_12;
  } else {
    __pyx_t_13 = __pyx_t_3;
  }
  if (__pyx_t_13) {

    /* "netCDF4.pyx":3518
 *             # 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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyObject_RichCompare(__pyx_v_self->dtype, __pyx_t_9, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_13) {

      /* "netCDF4.pyx":3519
 *             # 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_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_astype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_self->dtype);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self->dtype);
      __Pyx_GIVEREF(__pyx_v_self->dtype);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3519; __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_9); __pyx_t_9 = 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 = 3519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_1));
      __pyx_t_1 = 0;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "netCDF4.pyx":3522
 *             # 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_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_native, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_13) {

      /* "netCDF4.pyx":3523
 *             # 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_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_13) {
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__50, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_12 = __pyx_t_3;
      } else {
        __pyx_t_12 = __pyx_t_13;
      }
      if (__pyx_t_12) {

        /* "netCDF4.pyx":3524
 *             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_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L12;
      }
      __pyx_L12:;

      /* "netCDF4.pyx":3525
 *                 if is_native_little and data.dtype.byteorder == '>':
 *                     data.byteswap(True)
 *                 if is_native_big and data.dtype.byteorder == '<':             # <<<<<<<<<<<<<<
 *                     data.byteswap(True)
 *             if self.endian() == 'big':
 */
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_12) {
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__51, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_3 = __pyx_t_13;
      } else {
        __pyx_t_3 = __pyx_t_12;
      }
      if (__pyx_t_3) {

        /* "netCDF4.pyx":3526
 *                     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_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L13;
      }
      __pyx_L13:;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "netCDF4.pyx":3527
 *                 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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_big, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "netCDF4.pyx":3528
 *                     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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3528; __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 = 3528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_3) {
        __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 = 3528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_kp_s__49, Py_NE)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_12) {
          __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_kp_s__52, Py_NE)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_14 = __pyx_t_13;
        } else {
          __pyx_t_14 = __pyx_t_12;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_12 = __pyx_t_14;
        __pyx_t_14 = __pyx_t_12;
      } else {
        __pyx_t_14 = __pyx_t_3;
      }
      if (__pyx_t_14) {

        /* "netCDF4.pyx":3529
 *             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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3529; __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_1); __pyx_t_1 = 0;
        goto __pyx_L15;
      }
      __pyx_L15:;

      /* "netCDF4.pyx":3530
 *                 if is_native_big and data.dtype.byteorder not in ['=','|']:
 *                     data.byteswap(True)
 *                 if is_native_little and data.dtype.byteorder == '=':             # <<<<<<<<<<<<<<
 *                     data.byteswap(True)
 *             if self.endian() == 'little':
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_14) {
        __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 = 3530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_kp_s__49, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_12 = __pyx_t_3;
      } else {
        __pyx_t_12 = __pyx_t_14;
      }
      if (__pyx_t_12) {

        /* "netCDF4.pyx":3531
 *                     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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3531; __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_1); __pyx_t_1 = 0;
        goto __pyx_L16;
      }
      __pyx_L16:;
      goto __pyx_L14;
    }
    __pyx_L14:;

    /* "netCDF4.pyx":3532
 *                 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_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_endian); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_little, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_12) {

      /* "netCDF4.pyx":3533
 *                     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_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_little); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_12) {
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__49, Py_NE)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_14) {
          __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__52, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_13 = __pyx_t_3;
        } else {
          __pyx_t_13 = __pyx_t_14;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_14 = __pyx_t_13;
        __pyx_t_13 = __pyx_t_14;
      } else {
        __pyx_t_13 = __pyx_t_12;
      }
      if (__pyx_t_13) {

        /* "netCDF4.pyx":3534
 *             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_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L18;
      }
      __pyx_L18:;

      /* "netCDF4.pyx":3535
 *                 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_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_native_big); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_13) {
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3535; __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_PyString_Equals(__pyx_t_1, __pyx_kp_s__49, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_14 = __pyx_t_12;
      } else {
        __pyx_t_14 = __pyx_t_13;
      }
      if (__pyx_t_14) {

        /* "netCDF4.pyx":3536
 *                     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_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_byteswap); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L19;
      }
      __pyx_L19:;
      goto __pyx_L17;
    }
    __pyx_L17:;

    /* "netCDF4.pyx":3538
 *                     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_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_stride);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_stride);
    __Pyx_GIVEREF(__pyx_v_stride);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (!__pyx_t_14) {
      __pyx_t_13 = (__pyx_v_ndims == 0);
      __pyx_t_12 = __pyx_t_13;
    } else {
      __pyx_t_12 = __pyx_t_14;
    }
    if (__pyx_t_12) {

      /* "netCDF4.pyx":3539
 *             # 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_L20;
    }
    /*else*/ {

      /* "netCDF4.pyx":3542
 *                                    startp, countp, data.data)
 *             else:
 *                 ierr = nc_put_vars(self._grpid, self._varid,             # <<<<<<<<<<<<<<
 *                                       startp, countp, stridep, data.data)
 *             if ierr != NC_NOERR:
 */
      __pyx_v_ierr = nc_put_vars(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_stridep, __pyx_v_data->data);
    }
    __pyx_L20:;

    /* "netCDF4.pyx":3544
 *                 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_12 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_12) {

      /* "netCDF4.pyx":3545
 *                                       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_15 = ((char *)nc_strerror(__pyx_v_ierr));
      __pyx_t_10 = __Pyx_decode_c_string(__pyx_t_15, 0, strlen(__pyx_t_15), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_9, 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_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3545; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 3545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    goto __pyx_L9;
  }

  /* "netCDF4.pyx":3546
 *             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_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_12) {

    /* "netCDF4.pyx":3547
 *                 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_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_char); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_O, Py_NE)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_12) {

      /* "netCDF4.pyx":3548
 *         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_9 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":3550
 *                 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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_flatten); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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 = 3550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_10));
    __pyx_t_10 = 0;

    /* "netCDF4.pyx":3551
 *             # 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_10 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_12) {

      /* "netCDF4.pyx":3553
 *             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_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_shape); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3553; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3553; __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 = 0;
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
        __pyx_t_10 = __pyx_t_9; __Pyx_INCREF(__pyx_t_10); __pyx_t_2 = 0;
        __pyx_t_16 = NULL;
      } else {
        __pyx_t_2 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      for (;;) {
        if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_10)) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_10)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_2); __Pyx_INCREF(__pyx_t_9); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_10)) {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_2); __Pyx_INCREF(__pyx_t_9); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_10, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_9 = __pyx_t_16(__pyx_t_10);
          if (unlikely(!__pyx_t_9)) {
            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 = 3553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_9);
        }
        __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "netCDF4.pyx":3554
 *                 # 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_9 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_n); 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_t_1 = __pyx_f_7netCDF4__strencode(__pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_data), __pyx_v_n, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "netCDF4.pyx":3559
 *                 # each element in struct.
 *                 # allocate struct array to hold vlen data.
 *                 strdata = <char **>malloc(sizeof(char *)*totelem)             # <<<<<<<<<<<<<<
 *                 for i from 0<=i<totelem:
 *                     strdata[i] = data[i]
 */
      __pyx_v_strdata = ((char **)malloc(((sizeof(char *)) * __pyx_v_totelem)));

      /* "netCDF4.pyx":3560
 *                 # 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_17 = __pyx_v_totelem;
      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_17; __pyx_v_i++) {

        /* "netCDF4.pyx":3561
 *                 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_10 = __Pyx_GetItemInt(((PyObject *)__pyx_v_data), __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3561; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_15 = __Pyx_PyObject_AsString(__pyx_t_10); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        (__pyx_v_strdata[__pyx_v_i]) = __pyx_t_15;
      }

      /* "netCDF4.pyx":3563
 *                     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_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_v_stride);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_stride);
      __Pyx_GIVEREF(__pyx_v_stride);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (!__pyx_t_12) {
        __pyx_t_14 = (__pyx_v_ndims == 0);
        __pyx_t_13 = __pyx_t_14;
      } else {
        __pyx_t_13 = __pyx_t_12;
      }
      if (__pyx_t_13) {

        /* "netCDF4.pyx":3564
 *                 # 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_L28;
      }
      /*else*/ {

        /* "netCDF4.pyx":3567
 *                                        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_9 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__90, NULL); 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_Raise(__pyx_t_9, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L28:;

      /* "netCDF4.pyx":3570
 *                     #ierr = nc_put_vars(self._grpid, self._varid,
 *                     #                   startp, countp, stridep, strdata)
 *                 if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *                 free(strdata)
 */
      __pyx_t_13 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_13) {

        /* "netCDF4.pyx":3571
 *                     #                   startp, countp, stridep, strdata)
 *                 if ierr != NC_NOERR:
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *                 free(strdata)
 *             else:
 */
        __pyx_t_15 = ((char *)nc_strerror(__pyx_v_ierr));
        __pyx_t_9 = __Pyx_decode_c_string(__pyx_t_15, 0, strlen(__pyx_t_15), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_Raise(__pyx_t_9, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":3572
 *                 if ierr != NC_NOERR:
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *                 free(strdata)             # <<<<<<<<<<<<<<
 *             else:
 *                 # regular vlen.
 */
      free(__pyx_v_strdata);
      goto __pyx_L23;
    }
    /*else*/ {

      /* "netCDF4.pyx":3577
 *                 # 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_15 = __pyx_v_data->data;
      __pyx_v_databuff = __pyx_t_15;

      /* "netCDF4.pyx":3579
 *                 databuff = data.data
 *                 # allocate struct array to hold vlen data.
 *                 vldata = <nc_vlen_t *>malloc(<size_t>totelem*sizeof(nc_vlen_t))             # <<<<<<<<<<<<<<
 *                 for i from 0<=i<totelem:
 *                     elptr = (<void**>databuff)[0]
 */
      __pyx_v_vldata = ((nc_vlen_t *)malloc((((size_t)__pyx_v_totelem) * (sizeof(nc_vlen_t)))));

      /* "netCDF4.pyx":3580
 *                 # 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_17 = __pyx_v_totelem;
      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_17; __pyx_v_i++) {

        /* "netCDF4.pyx":3581
 *                 vldata = <nc_vlen_t *>malloc(<size_t>totelem*sizeof(nc_vlen_t))
 *                 for i from 0<=i<totelem:
 *                     elptr = (<void**>databuff)[0]             # <<<<<<<<<<<<<<
 *                     dataarr = <ndarray>elptr
 *                     if self.dtype != dataarr.dtype.str[1:]:
 */
        __pyx_v_elptr = (((void **)__pyx_v_databuff)[0]);

        /* "netCDF4.pyx":3582
 *                 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_9 = ((PyObject *)__pyx_v_elptr);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_XDECREF_SET(__pyx_v_dataarr, ((PyArrayObject *)__pyx_t_9));
        __pyx_t_9 = 0;

        /* "netCDF4.pyx":3583
 *                     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_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dataarr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_str); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_t_10, 1, 0, NULL, NULL, &__pyx_slice__91, 1, 0, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyObject_RichCompare(__pyx_v_self->dtype, __pyx_t_9, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (__pyx_t_13) {

          /* "netCDF4.pyx":3586
 *                         #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_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dataarr), __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_INCREF(__pyx_v_self->dtype);
          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self->dtype);
          __Pyx_GIVEREF(__pyx_v_self->dtype);
          PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10);
          __Pyx_GIVEREF(__pyx_t_10);
          __pyx_t_10 = 0;
          __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_wrong_data_type_in_object_array, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3586; __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 = 0;
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_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 = 3586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "netCDF4.pyx":3587
 *                         # casting doesn't work ?? just raise TypeError
 *                         raise TypeError("wrong data type in object array: should be %s, got %s" % (self.dtype,dataarr.dtype))
 *                     vldata[i].len = PyArray_SIZE(dataarr)             # <<<<<<<<<<<<<<
 *                     vldata[i].p = dataarr.data
 *                     databuff = databuff + data.strides[0]
 */
        (__pyx_v_vldata[__pyx_v_i]).len = PyArray_SIZE(__pyx_v_dataarr);

        /* "netCDF4.pyx":3588
 *                         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_15 = __pyx_v_dataarr->data;
        (__pyx_v_vldata[__pyx_v_i]).p = __pyx_t_15;

        /* "netCDF4.pyx":3589
 *                     vldata[i].len = PyArray_SIZE(dataarr)
 *                     vldata[i].p = dataarr.data
 *                     databuff = databuff + data.strides[0]             # <<<<<<<<<<<<<<
 *                 # strides all 1 or scalar variable, use put_vara (faster)
 *                 if sum(stride) == ndims or ndims == 0:
 */
        __pyx_v_databuff = (__pyx_v_databuff + (__pyx_v_data->strides[0]));
      }

      /* "netCDF4.pyx":3591
 *                     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_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_v_stride);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_stride);
      __Pyx_GIVEREF(__pyx_v_stride);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!__pyx_t_13) {
        __pyx_t_12 = (__pyx_v_ndims == 0);
        __pyx_t_14 = __pyx_t_12;
      } else {
        __pyx_t_14 = __pyx_t_13;
      }
      if (__pyx_t_14) {

        /* "netCDF4.pyx":3592
 *                 # 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_L33;
      }
      /*else*/ {

        /* "netCDF4.pyx":3595
 *                                        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_Call(__pyx_builtin_IndexError, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3595; __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 = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L33:;

      /* "netCDF4.pyx":3598
 *                     #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_14 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_14) {

        /* "netCDF4.pyx":3599
 *                     #                   startp, countp, stridep, vldata)
 *                 if ierr != NC_NOERR:
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *                 # free the pointer array.
 *                 free(vldata)
 */
        __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 = 3599; __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 = 3599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_10, 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_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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 = 3599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":3601
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *                 # free the pointer array.
 *                 free(vldata)             # <<<<<<<<<<<<<<
 * 
 *     def _get(self,start,count,stride):
 */
      free(__pyx_v_vldata);
    }
    __pyx_L23:;
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "netCDF4.pyx":3469
 * 
 * 
 *     def _put(self,ndarray data,start,count,stride):             # <<<<<<<<<<<<<<
 *         """Private method to put data into a netCDF variable"""
 *         cdef int ierr, ndims
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("netCDF4.Variable._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dataarr);
  __Pyx_XDECREF(__pyx_v_sl);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF((PyObject *)__pyx_v_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3603
 *                 free(vldata)
 * 
 *     def _get(self,start,count,stride):             # <<<<<<<<<<<<<<
 *         """Private method to retrieve data from a netCDF variable"""
 *         cdef int ierr, ndims
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_63_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7netCDF4_8Variable_62_get[] = "Private method to retrieve data from a netCDF variable";
static PyObject *__pyx_pw_7netCDF4_8Variable_63_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_count = 0;
  PyObject *__pyx_v_stride = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_count,&__pyx_n_s_stride,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_count)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_get", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3603; __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 = 3603; __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 = 3603; __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 = 3603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("netCDF4.Variable._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_8Variable_62_get(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), __pyx_v_start, __pyx_v_count, __pyx_v_stride);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_62_get(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_start, PyObject *__pyx_v_count, PyObject *__pyx_v_stride) {
  int __pyx_v_ierr;
  int __pyx_v_ndims;
  size_t __pyx_v_startp[NC_MAX_DIMS];
  size_t __pyx_v_countp[NC_MAX_DIMS];
  ptrdiff_t __pyx_v_stridep[NC_MAX_DIMS];
  PyArrayObject *__pyx_v_data = 0;
  PyArrayObject *__pyx_v_dataarr = 0;
  char **__pyx_v_strdata;
  nc_vlen_t *__pyx_v_vldata;
  PyObject *__pyx_v_shapeout = NULL;
  int __pyx_v_squeeze_out;
  PyObject *__pyx_v_lendim = NULL;
  long __pyx_v_negstride;
  PyObject *__pyx_v_sl = NULL;
  long __pyx_v_n;
  PyObject *__pyx_v_totelem = NULL;
  long __pyx_v_i;
  size_t __pyx_v_arrlen;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  size_t __pyx_t_8;
  ptrdiff_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  char *__pyx_t_14;
  long __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);

  /* "netCDF4.pyx":3616
 *         # 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":3617
 *         # 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":3618
 *         shapeout = ()
 *         squeeze_out = False
 *         for lendim in count:             # <<<<<<<<<<<<<<
 *             if lendim == -1:
 *                 shapeout = shapeout + (1,)
 */
  if (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 = 3618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && 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 = 3618; __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 = 3618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
      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 = 3618; __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 = 3618; __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 = 3618; __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":3619
 *         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 = 3619; __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 = 3619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_5) {

      /* "netCDF4.pyx":3620
 *         for lendim in count:
 *             if lendim == -1:
 *                 shapeout = shapeout + (1,)             # <<<<<<<<<<<<<<
 *                 squeeze_out = True
 *             else:
 */
      __pyx_t_4 = PyNumber_Add(__pyx_v_shapeout, __pyx_tuple__93); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_shapeout, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "netCDF4.pyx":3621
 *             if lendim == -1:
 *                 shapeout = shapeout + (1,)
 *                 squeeze_out = True             # <<<<<<<<<<<<<<
 *             else:
 *                 shapeout = shapeout + (lendim,)
 */
      __pyx_v_squeeze_out = 1;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "netCDF4.pyx":3623
 *                 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 = 3623; __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 = 3623; __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, ((PyObject*)__pyx_t_6));
      __pyx_t_6 = 0;
    }
    __pyx_L5:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "netCDF4.pyx":3625
 *                 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 = 3625; __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 = 3625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ndims = __pyx_t_2;

  /* "netCDF4.pyx":3627
 *         ndims = len(self.dimensions)
 *         # fill up startp,countp,stridep.
 *         negstride = 0             # <<<<<<<<<<<<<<
 *         sl = []
 *         for n from 0 <= n < ndims:
 */
  __pyx_v_negstride = 0;

  /* "netCDF4.pyx":3628
 *         # 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 = 3628; __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":3629
 *         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":3630
 *         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 = 3630; __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 = 3630; __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 = 3630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "netCDF4.pyx":3631
 *         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 = 3631; __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 = 3631; __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":3633
 *             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 = 3633; __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 = 3633; __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 = 3633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "netCDF4.pyx":3634
 *             # 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":3635
 *             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 = 3635; __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 = 3635; __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 = 3635; __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":3636
 *                 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 = 3636; __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 = 3636; __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 = 3636; __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 = 3636; __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 = 3636; __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 = 3636; __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 = 3636; __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":3637
 *                 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 = 3637; __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 = 3637; __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 = 3637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "netCDF4.pyx":3638
 *                 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_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_tuple__94, 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_t_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_t_4); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L8;
    }
    /*else*/ {

      /* "netCDF4.pyx":3640
 *                 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 = 3640; __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 = 3640; __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":3641
 *             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 = 3641; __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 = 3641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      (__pyx_v_stridep[__pyx_v_n]) = __pyx_t_9;

      /* "netCDF4.pyx":3642
 *                 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_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySlice_Type))), __pyx_tuple__95, NULL); 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_11 = __Pyx_PyList_Append(__pyx_v_sl, __pyx_t_4); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_L8:;
  }

  /* "netCDF4.pyx":3643
 *                 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_5 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isprimitive); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_5) {
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_iscompound); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = __pyx_t_12;
  } else {
    __pyx_t_13 = __pyx_t_5;
  }
  if (__pyx_t_13) {

    /* "netCDF4.pyx":3644
 *                 sl.append(slice(None,None, 1))
 *         if self._isprimitive or self._iscompound:
 *             data = numpy.empty(shapeout, self.dtype)             # <<<<<<<<<<<<<<
 *             # strides all 1 or scalar variable, use get_vara (faster)
 *             if sum(stride) == ndims or ndims == 0:
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __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 = 3644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_shapeout);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shapeout);
    __Pyx_GIVEREF(__pyx_v_shapeout);
    __Pyx_INCREF(__pyx_v_self->dtype);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->dtype);
    __Pyx_GIVEREF(__pyx_v_self->dtype);
    __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 = 3644; __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;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_data = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "netCDF4.pyx":3646
 *             data = numpy.empty(shapeout, self.dtype)
 *             # strides all 1 or scalar variable, use get_vara (faster)
 *             if sum(stride) == ndims or ndims == 0:             # <<<<<<<<<<<<<<
 *                 ierr = nc_get_vara(self._grpid, self._varid,
 *                                    startp, countp, data.data)
 */
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3646; __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_4 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_6, NULL); 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_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 = 3646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3646; __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;
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (!__pyx_t_13) {
      __pyx_t_5 = (__pyx_v_ndims == 0);
      __pyx_t_12 = __pyx_t_5;
    } else {
      __pyx_t_12 = __pyx_t_13;
    }
    if (__pyx_t_12) {

      /* "netCDF4.pyx":3647
 *             # strides all 1 or scalar variable, use get_vara (faster)
 *             if sum(stride) == ndims or ndims == 0:
 *                 ierr = nc_get_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
 *                                    startp, countp, data.data)
 *             else:
 */
      __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_data->data);
      goto __pyx_L10;
    }
    /*else*/ {

      /* "netCDF4.pyx":3650
 *                                    startp, countp, data.data)
 *             else:
 *                 ierr = nc_get_vars(self._grpid, self._varid,             # <<<<<<<<<<<<<<
 *                                    startp, countp, stridep, data.data)
 *             if ierr == NC_EINVALCOORDS:
 */
      __pyx_v_ierr = nc_get_vars(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_stridep, __pyx_v_data->data);
    }
    __pyx_L10:;

    /* "netCDF4.pyx":3652
 *                 ierr = nc_get_vars(self._grpid, self._varid,
 *                                    startp, countp, stridep, data.data)
 *             if ierr == NC_EINVALCOORDS:             # <<<<<<<<<<<<<<
 *                 raise IndexError
 *             elif ierr != NC_NOERR:
 */
    __pyx_t_12 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0);
    if (__pyx_t_12) {

      /* "netCDF4.pyx":3653
 *                                    startp, countp, stridep, data.data)
 *             if ierr == NC_EINVALCOORDS:
 *                 raise IndexError             # <<<<<<<<<<<<<<
 *             elif ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
      __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":3654
 *             if ierr == NC_EINVALCOORDS:
 *                 raise IndexError
 *             elif ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         elif self._isvlen:
 */
    __pyx_t_12 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_12) {

      /* "netCDF4.pyx":3655
 *                 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_14 = ((char *)nc_strerror(__pyx_v_ierr));
      __pyx_t_10 = __Pyx_decode_c_string(__pyx_t_14, 0, strlen(__pyx_t_14), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3655; __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 = 3655; __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 = 3655; __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 = 3655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    goto __pyx_L9;
  }

  /* "netCDF4.pyx":3656
 *             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_12 = __Pyx_PyObject_IsTrue(__pyx_v_self->_isvlen); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_12) {

    /* "netCDF4.pyx":3658
 *         elif self._isvlen:
 *             # allocate array of correct primitive type.
 *             data = numpy.empty(shapeout, 'O')             # <<<<<<<<<<<<<<
 *             # flatten data array.
 *             data = data.flatten()
 */
    __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3658; __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 = 3658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __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 = 3658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_shapeout);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_shapeout);
    __Pyx_GIVEREF(__pyx_v_shapeout);
    __Pyx_INCREF(__pyx_n_s_O);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_O);
    __Pyx_GIVEREF(__pyx_n_s_O);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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 = 3658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_data = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "netCDF4.pyx":3660
 *             data = numpy.empty(shapeout, 'O')
 *             # flatten data array.
 *             data = data.flatten()             # <<<<<<<<<<<<<<
 *             totelem = PyArray_SIZE(data)
 *             if self.dtype == str:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_data), __pyx_n_s_flatten); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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 = 3660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_10));
    __pyx_t_10 = 0;

    /* "netCDF4.pyx":3661
 *             # flatten data array.
 *             data = data.flatten()
 *             totelem = PyArray_SIZE(data)             # <<<<<<<<<<<<<<
 *             if self.dtype == str:
 *                 # vlen string (NC_STRING)
 */
    __pyx_t_10 = __Pyx_PyInt_From_npy_intp(PyArray_SIZE(__pyx_v_data)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_v_totelem = __pyx_t_10;
    __pyx_t_10 = 0;

    /* "netCDF4.pyx":3662
 *             data = data.flatten()
 *             totelem = PyArray_SIZE(data)
 *             if self.dtype == str:             # <<<<<<<<<<<<<<
 *                 # vlen string (NC_STRING)
 *                 # allocate pointer array to hold string data.
 */
    __pyx_t_10 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_12) {

      /* "netCDF4.pyx":3665
 *                 # vlen string (NC_STRING)
 *                 # allocate pointer array to hold string data.
 *                 strdata = <char **>malloc(sizeof(char *) * totelem)             # <<<<<<<<<<<<<<
 *                 # strides all 1 or scalar variable, use get_vara (faster)
 *                 if sum(stride) == ndims or ndims == 0:
 */
      __pyx_t_10 = __Pyx_PyInt_FromSize_t((sizeof(char *))); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_4 = PyNumber_Multiply(__pyx_t_10, __pyx_v_totelem); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __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 = 3665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_strdata = ((char **)malloc(__pyx_t_8));

      /* "netCDF4.pyx":3667
 *                 strdata = <char **>malloc(sizeof(char *) * totelem)
 *                 # strides all 1 or scalar variable, use get_vara (faster)
 *                 if sum(stride) == ndims or ndims == 0:             # <<<<<<<<<<<<<<
 *                     ierr = nc_get_vara(self._grpid, self._varid,
 *                                        startp, countp, strdata)
 */
      __pyx_t_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_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_10 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __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 = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_10, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!__pyx_t_12) {
        __pyx_t_13 = (__pyx_v_ndims == 0);
        __pyx_t_5 = __pyx_t_13;
      } else {
        __pyx_t_5 = __pyx_t_12;
      }
      if (__pyx_t_5) {

        /* "netCDF4.pyx":3668
 *                 # strides all 1 or scalar variable, use get_vara (faster)
 *                 if sum(stride) == ndims or ndims == 0:
 *                     ierr = nc_get_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
 *                                        startp, countp, strdata)
 *                 else:
 */
        __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_strdata);
        goto __pyx_L13;
      }
      /*else*/ {

        /* "netCDF4.pyx":3672
 *                 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_6 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3672; __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 = 3672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L13:;

      /* "netCDF4.pyx":3675
 *                     #ierr = nc_get_vars(self._grpid, self._varid,
 *                     #                   startp, countp, stridep, strdata)
 *                 if ierr == NC_EINVALCOORDS:             # <<<<<<<<<<<<<<
 *                     raise IndexError
 *                 elif ierr != NC_NOERR:
 */
      __pyx_t_5 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0);
      if (__pyx_t_5) {

        /* "netCDF4.pyx":3676
 *                     #                   startp, countp, stridep, strdata)
 *                 if ierr == NC_EINVALCOORDS:
 *                     raise IndexError             # <<<<<<<<<<<<<<
 *                 elif ierr != NC_NOERR:
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
        __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":3677
 *                 if ierr == NC_EINVALCOORDS:
 *                     raise IndexError
 *                 elif ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *                 # loop over elements of object array, fill array with
 */
      __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_5) {

        /* "netCDF4.pyx":3678
 *                     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_14 = ((char *)nc_strerror(__pyx_v_ierr));
        __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_14, 0, strlen(__pyx_t_14), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3678; __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 = 3678; __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 = 3678; __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 = 3678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":3681
 *                 # 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_15 = __Pyx_PyInt_As_long(__pyx_v_totelem); if (unlikely((__pyx_t_15 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) {

        /* "netCDF4.pyx":3682
 *                 # 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 = 3682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3682; __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_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        __pyx_t_6 = 0;
        __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 = 3682; __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 (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_data), __pyx_v_i, __pyx_t_6, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }

      /* "netCDF4.pyx":3684
 *                     data[i] = strdata[i].decode(default_encoding)
 *                 # reshape the output array
 *                 data = numpy.reshape(data, shapeout)             # <<<<<<<<<<<<<<
 *                 free(strdata)
 *             else:
 */
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_reshape); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(((PyObject *)__pyx_v_data));
      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_data));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
      __Pyx_INCREF(__pyx_v_shapeout);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_shapeout);
      __Pyx_GIVEREF(__pyx_v_shapeout);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 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 = 3684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "netCDF4.pyx":3685
 *                 # reshape the output array
 *                 data = numpy.reshape(data, shapeout)
 *                 free(strdata)             # <<<<<<<<<<<<<<
 *             else:
 *                 # regular vlen
 */
      free(__pyx_v_strdata);
      goto __pyx_L12;
    }
    /*else*/ {

      /* "netCDF4.pyx":3689
 *                 # 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_4 = __Pyx_PyInt_FromSize_t((sizeof(nc_vlen_t))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = PyNumber_Multiply(__pyx_v_totelem, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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 = 3689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_vldata = ((nc_vlen_t *)malloc(__pyx_t_8));

      /* "netCDF4.pyx":3691
 *                 vldata = <nc_vlen_t *>malloc(totelem*sizeof(nc_vlen_t))
 *                 # strides all 1 or scalar variable, use get_vara (faster)
 *                 if sum(stride) == ndims or ndims == 0:             # <<<<<<<<<<<<<<
 *                     ierr = nc_get_vara(self._grpid, self._varid,
 *                                        startp, countp, vldata)
 */
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3691; __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_4 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3691; __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_PyInt_From_int(__pyx_v_ndims); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3691; __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;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (!__pyx_t_5) {
        __pyx_t_12 = (__pyx_v_ndims == 0);
        __pyx_t_13 = __pyx_t_12;
      } else {
        __pyx_t_13 = __pyx_t_5;
      }
      if (__pyx_t_13) {

        /* "netCDF4.pyx":3692
 *                 # strides all 1 or scalar variable, use get_vara (faster)
 *                 if sum(stride) == ndims or ndims == 0:
 *                     ierr = nc_get_vara(self._grpid, self._varid,             # <<<<<<<<<<<<<<
 *                                        startp, countp, vldata)
 *                 else:
 */
        __pyx_v_ierr = nc_get_vara(__pyx_v_self->_grpid, __pyx_v_self->_varid, __pyx_v_startp, __pyx_v_countp, __pyx_v_vldata);
        goto __pyx_L17;
      }
      /*else*/ {

        /* "netCDF4.pyx":3695
 *                                        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_10 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3695; __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 = 3695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L17:;

      /* "netCDF4.pyx":3698
 *                     #ierr = nc_get_vars(self._grpid, self._varid,
 *                     #                   startp, countp, stridep, vldata)
 *                 if ierr == NC_EINVALCOORDS:             # <<<<<<<<<<<<<<
 *                     raise IndexError
 *                 elif ierr != NC_NOERR:
 */
      __pyx_t_13 = ((__pyx_v_ierr == NC_EINVALCOORDS) != 0);
      if (__pyx_t_13) {

        /* "netCDF4.pyx":3699
 *                     #                   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 = 3699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":3700
 *                 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_13 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_13) {

        /* "netCDF4.pyx":3701
 *                     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_14 = ((char *)nc_strerror(__pyx_v_ierr));
        __pyx_t_10 = __Pyx_decode_c_string(__pyx_t_14, 0, strlen(__pyx_t_14), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3701; __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 = 3701; __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 = 3701; __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 = 3701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":3704
 *                 # 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_15 = __Pyx_PyInt_As_long(__pyx_v_totelem); if (unlikely((__pyx_t_15 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_15; __pyx_v_i++) {

        /* "netCDF4.pyx":3705
 *                 # contents of vlarray struct, put array in object array.
 *                 for i from 0<=i<totelem:
 *                     arrlen  = vldata[i].len             # <<<<<<<<<<<<<<
 *                     dataarr = numpy.empty(arrlen, self.dtype)
 *                     dataarr.data = <char *>vldata[i].p
 */
        __pyx_t_8 = (__pyx_v_vldata[__pyx_v_i]).len;
        __pyx_v_arrlen = __pyx_t_8;

        /* "netCDF4.pyx":3706
 *                 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_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3706; __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 = 3706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyInt_FromSize_t(__pyx_v_arrlen); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_v_self->dtype);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->dtype);
        __Pyx_GIVEREF(__pyx_v_self->dtype);
        __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3706; __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;
        if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_7netCDF4_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_XDECREF_SET(__pyx_v_dataarr, ((PyArrayObject *)__pyx_t_10));
        __pyx_t_10 = 0;

        /* "netCDF4.pyx":3707
 *                     arrlen  = vldata[i].len
 *                     dataarr = numpy.empty(arrlen, self.dtype)
 *                     dataarr.data = <char *>vldata[i].p             # <<<<<<<<<<<<<<
 *                     data[i] = dataarr
 *                 # reshape the output array
 */
        __pyx_v_dataarr->data = ((char *)(__pyx_v_vldata[__pyx_v_i]).p);

        /* "netCDF4.pyx":3708
 *                     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 = 3708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "netCDF4.pyx":3710
 *                     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 = 3710; __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 = 3710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __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 = 3710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_INCREF(((PyObject *)__pyx_v_data));
      PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_v_data));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
      __Pyx_INCREF(__pyx_v_shapeout);
      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_shapeout);
      __Pyx_GIVEREF(__pyx_v_shapeout);
      __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 = 3710; __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 = 3710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "netCDF4.pyx":3712
 *                 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_L12:;
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "netCDF4.pyx":3713
 *                 # 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_13 = (__pyx_v_negstride != 0);
  if (__pyx_t_13) {

    /* "netCDF4.pyx":3715
 *         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 = 3715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_6 = PyObject_GetItem(((PyObject *)__pyx_v_data), __pyx_v_sl); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3715; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_copy); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3715; __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_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __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 = 3715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF_SET(__pyx_v_data, ((PyArrayObject *)__pyx_t_6));
    __pyx_t_6 = 0;
    goto __pyx_L21;
  }
  __pyx_L21:;

  /* "netCDF4.pyx":3716
 *             # 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 = 3716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_5 = ((!__pyx_t_13) != 0);
  if (__pyx_t_5) {

    /* "netCDF4.pyx":3717
 *             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 = 3717; __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 = 3717; __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":3718
 *         if not self.dimensions:
 *             return data[0] # a scalar
 *         elif squeeze_out:             # <<<<<<<<<<<<<<
 *             return numpy.squeeze(data)
 *         else:
 */
  __pyx_t_5 = (__pyx_v_squeeze_out != 0);
  if (__pyx_t_5) {

    /* "netCDF4.pyx":3719
 *             return data[0] # a scalar
 *         elif squeeze_out:
 *             return numpy.squeeze(data)             # <<<<<<<<<<<<<<
 *         else:
 *             return data
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_squeeze); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3719; __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 = 3719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(((PyObject *)__pyx_v_data));
    PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_data));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_data));
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "netCDF4.pyx":3721
 *             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 = 3721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __Pyx_INCREF(((PyObject *)__pyx_v_data));
    __pyx_r = ((PyObject *)__pyx_v_data);
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":3603
 *                 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_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":2389
 * 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 = 2389; __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 = 2389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->_varid = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("netCDF4.Variable._varid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_6_grpid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_6_grpid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_6_grpid___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_6_grpid___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Variable._grpid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_6_grpid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_6_grpid_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_6_grpid_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->_grpid = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("netCDF4.Variable._grpid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_10_nunlimdim_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_10_nunlimdim_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_10_nunlimdim___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_10_nunlimdim___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_nunlimdim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.Variable._nunlimdim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_10_nunlimdim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_10_nunlimdim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_10_nunlimdim_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_10_nunlimdim_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->_nunlimdim = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("netCDF4.Variable._nunlimdim.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2390
 * instance. If C{None}, the data is not truncated. """
 *     cdef public int _varid, _grpid, _nunlimdim
 *     cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\             # <<<<<<<<<<<<<<
 *     _isvlen, _grp,_cmptype,_vltype
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_5_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_5_name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_5_name___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_5_name___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_name);
  __pyx_r = __pyx_v_self->_name;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_5_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_5_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_5_name_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_5_name_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_name);
  __Pyx_DECREF(__pyx_v_self->_name);
  __pyx_v_self->_name = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_5_name_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_5_name_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_5_name_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_5_name_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_name);
  __Pyx_DECREF(__pyx_v_self->_name);
  __pyx_v_self->_name = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_4ndim_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_4ndim___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_4ndim___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->ndim);
  __pyx_r = __pyx_v_self->ndim;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_4ndim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_4ndim_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_4ndim_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_4ndim_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->ndim);
  __Pyx_DECREF(__pyx_v_self->ndim);
  __pyx_v_self->ndim = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_4ndim_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_4ndim_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_4ndim_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_4ndim_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->ndim);
  __Pyx_DECREF(__pyx_v_self->ndim);
  __pyx_v_self->ndim = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_5dtype_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_5dtype_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_5dtype___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_5dtype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->dtype);
  __pyx_r = __pyx_v_self->dtype;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_5dtype_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_5dtype_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->dtype);
  __Pyx_DECREF(__pyx_v_self->dtype);
  __pyx_v_self->dtype = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_5dtype_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_5dtype_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_5dtype_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_5dtype_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dtype);
  __Pyx_DECREF(__pyx_v_self->dtype);
  __pyx_v_self->dtype = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_4mask_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_4mask_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_4mask___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_4mask___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->mask);
  __pyx_r = __pyx_v_self->mask;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_4mask_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_4mask_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_4mask_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_4mask_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->mask);
  __Pyx_DECREF(__pyx_v_self->mask);
  __pyx_v_self->mask = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_4mask_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_4mask_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_4mask_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_4mask_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->mask);
  __Pyx_DECREF(__pyx_v_self->mask);
  __pyx_v_self->mask = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_5scale_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_5scale_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_5scale___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_5scale___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->scale);
  __pyx_r = __pyx_v_self->scale;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_5scale_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_5scale_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->scale);
  __Pyx_DECREF(__pyx_v_self->scale);
  __pyx_v_self->scale = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_5scale_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_5scale_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_5scale_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_5scale_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->scale);
  __Pyx_DECREF(__pyx_v_self->scale);
  __pyx_v_self->scale = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_12_isprimitive_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_12_isprimitive_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_12_isprimitive___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_12_isprimitive___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_isprimitive);
  __pyx_r = __pyx_v_self->_isprimitive;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_12_isprimitive_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_12_isprimitive_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_12_isprimitive_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_12_isprimitive_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_isprimitive);
  __Pyx_DECREF(__pyx_v_self->_isprimitive);
  __pyx_v_self->_isprimitive = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_12_isprimitive_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_12_isprimitive_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_12_isprimitive_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_12_isprimitive_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_isprimitive);
  __Pyx_DECREF(__pyx_v_self->_isprimitive);
  __pyx_v_self->_isprimitive = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_11_iscompound_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_11_iscompound_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_11_iscompound___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_11_iscompound___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_iscompound);
  __pyx_r = __pyx_v_self->_iscompound;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_11_iscompound_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_11_iscompound_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_11_iscompound_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_11_iscompound_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_iscompound);
  __Pyx_DECREF(__pyx_v_self->_iscompound);
  __pyx_v_self->_iscompound = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_11_iscompound_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_11_iscompound_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_11_iscompound_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_11_iscompound_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_iscompound);
  __Pyx_DECREF(__pyx_v_self->_iscompound);
  __pyx_v_self->_iscompound = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":2391
 *     cdef public int _varid, _grpid, _nunlimdim
 *     cdef public _name, ndim, dtype, mask, scale, _isprimitive, _iscompound,\
 *     _isvlen, _grp,_cmptype,_vltype             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, grp, name, datatype, dimensions=(), zlib=False,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_7_isvlen_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_7_isvlen_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_7_isvlen___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_7_isvlen___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_isvlen);
  __pyx_r = __pyx_v_self->_isvlen;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_7_isvlen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_7_isvlen_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_7_isvlen_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_7_isvlen_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_isvlen);
  __Pyx_DECREF(__pyx_v_self->_isvlen);
  __pyx_v_self->_isvlen = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_7_isvlen_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_7_isvlen_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_7_isvlen_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_7_isvlen_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_isvlen);
  __Pyx_DECREF(__pyx_v_self->_isvlen);
  __pyx_v_self->_isvlen = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_4_grp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_4_grp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_4_grp___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_4_grp___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_grp);
  __pyx_r = __pyx_v_self->_grp;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_4_grp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_4_grp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_4_grp_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_4_grp_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_grp);
  __Pyx_DECREF(__pyx_v_self->_grp);
  __pyx_v_self->_grp = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_4_grp_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_4_grp_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_4_grp_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_4_grp_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_grp);
  __Pyx_DECREF(__pyx_v_self->_grp);
  __pyx_v_self->_grp = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_8_cmptype_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_8_cmptype_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_8_cmptype___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_8_cmptype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_cmptype);
  __pyx_r = __pyx_v_self->_cmptype;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_8_cmptype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_8_cmptype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_8_cmptype_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_8_cmptype_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_cmptype);
  __Pyx_DECREF(__pyx_v_self->_cmptype);
  __pyx_v_self->_cmptype = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_8_cmptype_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_8_cmptype_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_8_cmptype_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_8_cmptype_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cmptype);
  __Pyx_DECREF(__pyx_v_self->_cmptype);
  __pyx_v_self->_cmptype = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_8Variable_7_vltype_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_8Variable_7_vltype_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_7_vltype___get__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_8Variable_7_vltype___get__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_vltype);
  __pyx_r = __pyx_v_self->_vltype;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_7_vltype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_7_vltype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_7_vltype_2__set__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_7_vltype_2__set__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_vltype);
  __Pyx_DECREF(__pyx_v_self->_vltype);
  __pyx_v_self->_vltype = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_8Variable_7_vltype_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_8Variable_7_vltype_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_8Variable_7_vltype_4__del__(((struct __pyx_obj_7netCDF4_Variable *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_8Variable_7_vltype_4__del__(struct __pyx_obj_7netCDF4_Variable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_vltype);
  __Pyx_DECREF(__pyx_v_self->_vltype);
  __pyx_v_self->_vltype = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3765
 *     cdef public nc_type _nc_type
 *     cdef public dtype, name
 *     def __init__(self, grp, object dt, object dtype_name, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef nc_type xtype
 *         dt = numpy.dtype(dt,align=True)
 */

/* Python wrapper */
static int __pyx_pw_7netCDF4_12CompoundType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7netCDF4_12CompoundType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_grp = 0;
  PyObject *__pyx_v_dt = 0;
  PyObject *__pyx_v_dtype_name = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grp_2,&__pyx_n_s_dt,&__pyx_n_s_dtype_name,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grp_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3765; __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 = 3765; __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 = 3765; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_grp = values[0];
    __pyx_v_dt = values[1];
    __pyx_v_dtype_name = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3765; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("netCDF4.CompoundType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_12CompoundType___init__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self), __pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_12CompoundType___init__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_dt, PyObject *__pyx_v_dtype_name, PyObject *__pyx_v_kwargs) {
  nc_type __pyx_v_xtype;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  nc_type __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_dt);

  /* "netCDF4.pyx":3767
 *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
 *         cdef nc_type xtype
 *         dt = numpy.dtype(dt,align=True)             # <<<<<<<<<<<<<<
 *         if 'typeid' in kwargs:
 *             xtype = kwargs['typeid']
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3767; __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 = 3767; __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 = 3767; __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 = 3767; __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 = 3767; __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 = 3767; __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":3768
 *         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 = 3768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "netCDF4.pyx":3769
 *         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 = 3769; __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 = 3769; __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":3771
 *             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 = 3771; __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 = 3771; __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":3772
 *         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":3773
 *             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":3774
 *         self._nc_type = xtype
 *         self.dtype = dt
 *         self.name = dtype_name             # <<<<<<<<<<<<<<
 * 
 *     def __str__(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":3765
 *     cdef public nc_type _nc_type
 *     cdef public dtype, name
 *     def __init__(self, grp, object dt, object dtype_name, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef nc_type xtype
 *         dt = numpy.dtype(dt,align=True)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("netCDF4.CompoundType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3776
 *         self.name = dtype_name
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         if python3:
 *            return self.__unicode__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_12CompoundType_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_12CompoundType_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_2__str__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_12CompoundType_2__str__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "netCDF4.pyx":3777
 * 
 *     def __str__(self):
 *         if python3:             # <<<<<<<<<<<<<<
 *            return self.__unicode__()
 *         else:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3777; __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 = 3777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "netCDF4.pyx":3778
 *     def __str__(self):
 *         if python3:
 *            return self.__unicode__()             # <<<<<<<<<<<<<<
 *         else:
 *            return unicode(self).encode(default_encoding)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3778; __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":3780
 *            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 = 3780; __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_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3780; __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_GetModuleGlobalName(__pyx_n_s_default_encoding); 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 = PyTuple_New(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_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_t_3, __pyx_t_4, NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":3776
 *         self.name = dtype_name
 * 
 *     def __str__(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_AddTraceback("netCDF4.CompoundType.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3782
 *            return unicode(self).encode(default_encoding)
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
 *         (self.name,self.dtype)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_12CompoundType_5__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7netCDF4_12CompoundType_5__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_4__unicode__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_12CompoundType_4__unicode__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__unicode__", 0);

  /* "netCDF4.pyx":3783
 * 
 *     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 = 3783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "netCDF4.pyx":3784
 *     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 = 3784; __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":3783
 * 
 *     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 = 3783; __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 = 3783; __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":3782
 *            return unicode(self).encode(default_encoding)
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
 *         (self.name,self.dtype)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("netCDF4.CompoundType.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3763
 * @ivar name: A python string describing the compound type.
 * """
 *     cdef public nc_type _nc_type             # <<<<<<<<<<<<<<
 *     cdef public dtype, name
 *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_12CompoundType_8_nc_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_12CompoundType_8_nc_type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_8_nc_type___get__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_12CompoundType_8_nc_type___get__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("netCDF4.CompoundType._nc_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_12CompoundType_8_nc_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_12CompoundType_8_nc_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_8_nc_type_2__set__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_12CompoundType_8_nc_type_2__set__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  nc_type __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_nc_type(__pyx_v_value); if (unlikely((__pyx_t_1 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->_nc_type = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("netCDF4.CompoundType._nc_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3764
 * """
 *     cdef public nc_type _nc_type
 *     cdef public dtype, name             # <<<<<<<<<<<<<<
 *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
 *         cdef nc_type xtype
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_12CompoundType_5dtype_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_12CompoundType_5dtype_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_5dtype___get__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_12CompoundType_5dtype___get__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->dtype);
  __pyx_r = __pyx_v_self->dtype;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_12CompoundType_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_12CompoundType_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_5dtype_2__set__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_12CompoundType_5dtype_2__set__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->dtype);
  __Pyx_DECREF(__pyx_v_self->dtype);
  __pyx_v_self->dtype = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_12CompoundType_5dtype_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_12CompoundType_5dtype_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_5dtype_4__del__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_12CompoundType_5dtype_4__del__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dtype);
  __Pyx_DECREF(__pyx_v_self->dtype);
  __pyx_v_self->dtype = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_12CompoundType_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_12CompoundType_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_4name___get__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_12CompoundType_4name___get__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_12CompoundType_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_12CompoundType_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_4name_2__set__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_12CompoundType_4name_2__set__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_12CompoundType_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_12CompoundType_4name_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_12CompoundType_4name_4__del__(((struct __pyx_obj_7netCDF4_CompoundType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_12CompoundType_4name_4__del__(struct __pyx_obj_7netCDF4_CompoundType *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3786
 *         (self.name,self.dtype)
 * 
 * cdef _def_compound(grp, object dt, object dtype_name):             # <<<<<<<<<<<<<<
 *     # private function used to construct a netcdf compound data type
 *     # from a numpy dtype object by CompoundType.__init__.
 */

static PyObject *__pyx_f_7netCDF4__def_compound(PyObject *__pyx_v_grp, PyObject *__pyx_v_dt, PyObject *__pyx_v_dtype_name) {
  nc_type __pyx_v_xtype;
  nc_type __pyx_v_xtype_tmp;
  int __pyx_v_ierr;
  int __pyx_v_ndims;
  size_t __pyx_v_offset;
  size_t __pyx_v_size;
  char *__pyx_v_namstring;
  char *__pyx_v_nested_namstring;
  int __pyx_v_dim_sizes[NC_MAX_DIMS];
  PyObject *__pyx_v_bytestr = NULL;
  PyObject *__pyx_v_names = NULL;
  PyObject *__pyx_v_formats = NULL;
  PyObject *__pyx_v_offsets = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_format = NULL;
  long __pyx_v_n;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  size_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  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":3795
 *     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 = 3795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytestr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":3796
 *     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 = 3796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_namstring = __pyx_t_2;

  /* "netCDF4.pyx":3797
 *     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 = 3797; __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 = 3797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_size = __pyx_t_3;

  /* "netCDF4.pyx":3798
 *     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 = 3798; __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 = 3798; __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":3799
 *     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":3800
 *     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 = 3800; __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 = 3800; __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 = 3800; __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 = 3800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":3801
 *     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 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); 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_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); 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);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, 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_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); 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);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_6, 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_6); __pyx_t_6 = 0;
  __pyx_v_names = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":3802
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     names = list(dt.fields.keys())
 *     formats = [v[0] for v in dt.fields.values()]             # <<<<<<<<<<<<<<
 *     offsets = [v[1] for v in dt.fields.values()]
 *     # make sure entries in lists sorted by offset.
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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 = 3802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3802; __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_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
    __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_7)) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_7)) {
      if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_6 = __pyx_t_9(__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 = 3802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3802; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_formats = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":3803
 *     names = list(dt.fields.keys())
 *     formats = [v[0] for v in dt.fields.values()]
 *     offsets = [v[1] for v in dt.fields.values()]             # <<<<<<<<<<<<<<
 *     # make sure entries in lists sorted by offset.
 *     # (don't know why this is necessary, but it is for version 4.0.1)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_fields); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3803; __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_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
    __pyx_t_6 = __pyx_t_7; __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_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  for (;;) {
    if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_6)) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_6)) {
      if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_7 = __pyx_t_9(__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 = 3803; __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, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3803; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_7);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_offsets = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":3806
 *     # 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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_names);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_names);
  __Pyx_GIVEREF(__pyx_v_names);
  __Pyx_INCREF(__pyx_v_offsets);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_offsets);
  __Pyx_GIVEREF(__pyx_v_offsets);
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3806; __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":3807
 *     # (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_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_formats);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_formats);
  __Pyx_GIVEREF(__pyx_v_formats);
  __Pyx_INCREF(__pyx_v_offsets);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_offsets);
  __Pyx_GIVEREF(__pyx_v_offsets);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3807; __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_SET(__pyx_v_formats, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":3808
 *     names = _sortbylist(names, offsets)
 *     formats = _sortbylist(formats, offsets)
 *     offsets.sort()             # <<<<<<<<<<<<<<
 *     for name, format, offset in zip(names, formats, offsets):
 *         bytestr = _strencode(name)
 */
  __pyx_t_10 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":3809
 *     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_zip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3809; __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 = 3809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_names);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_names);
  __Pyx_GIVEREF(__pyx_v_names);
  __Pyx_INCREF(__pyx_v_formats);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_formats);
  __Pyx_GIVEREF(__pyx_v_formats);
  __Pyx_INCREF(__pyx_v_offsets);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_offsets);
  __Pyx_GIVEREF(__pyx_v_offsets);
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3809; __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 (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
    __pyx_t_6 = __pyx_t_7; __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_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  for (;;) {
    if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_6)) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_6)) {
      if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_7 = __pyx_t_9(__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 = 3809; __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 = 3809; __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_11 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_12 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_11 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_12 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_11);
      __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 = 3809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3809; __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 = 3809; __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_11 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_11)) goto __pyx_L10_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_11);
      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 = 3809; __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 = 3809; __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 = 3809; __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_11);
    __pyx_t_11 = 0;
    __pyx_v_offset = __pyx_t_3;

    /* "netCDF4.pyx":3810
 *     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 = 3810; __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":3811
 *     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 = 3811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_namstring = __pyx_t_2;

    /* "netCDF4.pyx":3812
 *         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 = 3812; __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 = 3812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_5) {

      /* "netCDF4.pyx":3813
 *         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":3814
 *         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 = 3814; __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 = 3814; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_t_12, 1, 0, NULL, NULL, &__pyx_slice__98, 1, 0, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3814; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = PyObject_GetItem(__pyx_t_7, __pyx_t_11); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3814; __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_11); __pyx_t_11 = 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 = 3814; __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_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

        /* "netCDF4.pyx":3815
 *             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_11, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3815; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_GOTREF(__pyx_t_7);

          /* "netCDF4.pyx":3816
 *                 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__99, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3816; __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 = 3816; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L14_exception_handled;
        }
        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_L14_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_L20_try_end:;
      }

      /* "netCDF4.pyx":3817
 *             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 = 3817; __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 = 3817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "netCDF4.pyx":3818
 *                 raise ValueError('Unsupported compound type element')
 *             ierr = nc_insert_compound(grp._grpid, xtype, namstring,
 *                                       offset, xtype_tmp)             # <<<<<<<<<<<<<<
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
      __pyx_v_ierr = nc_insert_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_namstring, __pyx_v_offset, __pyx_v_xtype_tmp);

      /* "netCDF4.pyx":3819
 *             ierr = nc_insert_compound(grp._grpid, xtype, namstring,
 *                                       offset, xtype_tmp)
 *             if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         else:
 */
      __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_5) {

        /* "netCDF4.pyx":3820
 *                                       offset, xtype_tmp)
 *             if ierr != NC_NOERR:
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *         else:
 *             if format.shape ==  (): # nested scalar compound type
 */
        __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
        __pyx_t_7 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3820; __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 = 3820; __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_RuntimeError, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3820; __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 = 3820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      goto __pyx_L12;
    }
    /*else*/ {

      /* "netCDF4.pyx":3822
 *                 raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         else:
 *             if format.shape ==  (): # nested scalar compound type             # <<<<<<<<<<<<<<
 *                 # find this compound type in this group or it's parents.
 *                 xtype_tmp = _find_cmptype(grp, format)
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3822; __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 = 3822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_5) {

        /* "netCDF4.pyx":3824
 *             if format.shape ==  (): # nested scalar compound type
 *                 # find this compound type in this group or it's parents.
 *                 xtype_tmp = _find_cmptype(grp, format)             # <<<<<<<<<<<<<<
 *                 bytestr = _strencode(name)
 *                 nested_namstring = bytestr
 */
        __pyx_t_11 = __pyx_f_7netCDF4__find_cmptype(__pyx_v_grp, __pyx_v_format); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_11); if (unlikely((__pyx_t_18 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_v_xtype_tmp = __pyx_t_18;

        /* "netCDF4.pyx":3825
 *                 # 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_11 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "netCDF4.pyx":3826
 *                 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 = 3826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_v_nested_namstring = __pyx_t_2;

        /* "netCDF4.pyx":3827
 *                 bytestr = _strencode(name)
 *                 nested_namstring = bytestr
 *                 ierr = nc_insert_compound(grp._grpid, xtype,\             # <<<<<<<<<<<<<<
 *                                           nested_namstring,\
 *                                           offset, xtype_tmp)
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "netCDF4.pyx":3829
 *                 ierr = nc_insert_compound(grp._grpid, xtype,\
 *                                           nested_namstring,\
 *                                           offset, xtype_tmp)             # <<<<<<<<<<<<<<
 *                 if ierr != NC_NOERR:
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
        __pyx_v_ierr = nc_insert_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_nested_namstring, __pyx_v_offset, __pyx_v_xtype_tmp);

        /* "netCDF4.pyx":3830
 *                                           nested_namstring,\
 *                                           offset, xtype_tmp)
 *                 if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *             else: # array compound element
 */
        __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
        if (__pyx_t_5) {

          /* "netCDF4.pyx":3831
 *                                           offset, xtype_tmp)
 *                 if ierr != NC_NOERR:
 *                     raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *             else: # array compound element
 *                 ndims = len(format.shape)
 */
          __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
          __pyx_t_11 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_11);
          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_11);
          __Pyx_GIVEREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_Raise(__pyx_t_11, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L24;
      }
      /*else*/ {

        /* "netCDF4.pyx":3833
 *                     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_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_19 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_19 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_v_ndims = __pyx_t_19;

        /* "netCDF4.pyx":3834
 *             else: # array compound element
 *                 ndims = len(format.shape)
 *                 for n from 0 <= n < ndims:             # <<<<<<<<<<<<<<
 *                     dim_sizes[n] = format.shape[n]
 *                 if format.subdtype[0].str[1] != 'V': # primitive type.
 */
        __pyx_t_4 = __pyx_v_ndims;
        for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {

          /* "netCDF4.pyx":3835
 *                 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_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_11, __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 = 3835; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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 = 3835; __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":3836
 *                 for n from 0 <= n < ndims:
 *                     dim_sizes[n] = format.shape[n]
 *                 if format.subdtype[0].str[1] != 'V': # primitive type.             # <<<<<<<<<<<<<<
 *                     try:
 *                         xtype_tmp = _nptonctype[format.subdtype[0].str[1:]]
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3836; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_str); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3836; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_11, __pyx_n_s_V, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (__pyx_t_5) {

          /* "netCDF4.pyx":3837
 *                     dim_sizes[n] = format.shape[n]
 *                 if format.subdtype[0].str[1] != 'V': # primitive type.
 *                     try:             # <<<<<<<<<<<<<<
 *                         xtype_tmp = _nptonctype[format.subdtype[0].str[1:]]
 *                     except KeyError:
 */
          {
            __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
            __Pyx_XGOTREF(__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_16);
            __Pyx_XGOTREF(__pyx_t_15);
            /*try:*/ {

              /* "netCDF4.pyx":3838
 *                 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_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3838; __pyx_clineno = __LINE__; goto __pyx_L29_error;}
              __Pyx_GOTREF(__pyx_t_11);
              __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 = 3838; __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 = 3838; __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 = 3838; __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__100, 1, 0, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3838; __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_11, __pyx_t_12); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3838; __pyx_clineno = __LINE__; goto __pyx_L29_error;};
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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 = 3838; __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_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

            /* "netCDF4.pyx":3839
 *                     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_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3839; __pyx_clineno = __LINE__; goto __pyx_L31_except_error;}
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_GOTREF(__pyx_t_11);

              /* "netCDF4.pyx":3840
 *                         xtype_tmp = _nptonctype[format.subdtype[0].str[1:]]
 *                     except KeyError:
 *                         raise ValueError('Unsupported compound type element')             # <<<<<<<<<<<<<<
 *                     ierr = nc_insert_array_compound(grp._grpid,xtype,namstring,
 *                            offset,xtype_tmp,ndims,dim_sizes)
 */
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3840; __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 = 3840; __pyx_clineno = __LINE__; goto __pyx_L31_except_error;}
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              goto __pyx_L30_exception_handled;
            }
            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_L30_exception_handled:;
            __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);
            __pyx_L36_try_end:;
          }

          /* "netCDF4.pyx":3841
 *                     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_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

          /* "netCDF4.pyx":3842
 *                         raise ValueError('Unsupported compound type element')
 *                     ierr = nc_insert_array_compound(grp._grpid,xtype,namstring,
 *                            offset,xtype_tmp,ndims,dim_sizes)             # <<<<<<<<<<<<<<
 *                     if ierr != NC_NOERR:
 *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
          __pyx_v_ierr = nc_insert_array_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_namstring, __pyx_v_offset, __pyx_v_xtype_tmp, __pyx_v_ndims, __pyx_v_dim_sizes);

          /* "netCDF4.pyx":3843
 *                     ierr = nc_insert_array_compound(grp._grpid,xtype,namstring,
 *                            offset,xtype_tmp,ndims,dim_sizes)
 *                     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *                 else: # nested array compound type.
 */
          __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
          if (__pyx_t_5) {

            /* "netCDF4.pyx":3844
 *                            offset,xtype_tmp,ndims,dim_sizes)
 *                     if ierr != NC_NOERR:
 *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *                 else: # nested array compound type.
 *                     # find this compound type in this group or it's parents.
 */
            __pyx_t_2 = ((char *)nc_strerror(__pyx_v_ierr));
            __pyx_t_11 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_11);
            PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11);
            __Pyx_GIVEREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_Raise(__pyx_t_11, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          goto __pyx_L28;
        }
        /*else*/ {

          /* "netCDF4.pyx":3847
 *                 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_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_subdtype); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3847; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = __pyx_f_7netCDF4__find_cmptype(__pyx_v_grp, __pyx_t_12); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_18 = __Pyx_PyInt_As_nc_type(__pyx_t_11); if (unlikely((__pyx_t_18 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_v_xtype_tmp = __pyx_t_18;

          /* "netCDF4.pyx":3848
 *                     # 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_11 = __pyx_f_7netCDF4__strencode(__pyx_v_name, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF_SET(__pyx_v_bytestr, __pyx_t_11);
          __pyx_t_11 = 0;

          /* "netCDF4.pyx":3849
 *                     xtype_tmp = _find_cmptype(grp, format.subdtype[0])
 *                     bytestr = _strencode(name)
 *                     nested_namstring = bytestr             # <<<<<<<<<<<<<<
 *                     ierr = nc_insert_array_compound(grp._grpid,xtype,\
 *                                                     nested_namstring,\
 */
          __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_v_nested_namstring = __pyx_t_2;

          /* "netCDF4.pyx":3850
 *                     bytestr = _strencode(name)
 *                     nested_namstring = bytestr
 *                     ierr = nc_insert_array_compound(grp._grpid,xtype,\             # <<<<<<<<<<<<<<
 *                                                     nested_namstring,\
 *                                                     offset,xtype_tmp,\
 */
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

          /* "netCDF4.pyx":3853
 *                                                     nested_namstring,\
 *                                                     offset,xtype_tmp,\
 *                                                     ndims,dim_sizes)             # <<<<<<<<<<<<<<
 *                     if ierr != NC_NOERR:
 *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
          __pyx_v_ierr = nc_insert_array_compound(__pyx_t_4, __pyx_v_xtype, __pyx_v_nested_namstring, __pyx_v_offset, __pyx_v_xtype_tmp, __pyx_v_ndims, __pyx_v_dim_sizes);

          /* "netCDF4.pyx":3854
 *                                                     offset,xtype_tmp,\
 *                                                     ndims,dim_sizes)
 *                     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     return xtype
 */
          __pyx_t_5 = ((__pyx_v_ierr != NC_NOERR) != 0);
          if (__pyx_t_5) {

            /* "netCDF4.pyx":3855
 *                                                     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_11 = __Pyx_decode_c_string(__pyx_t_2, 0, strlen(__pyx_t_2), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_11);
            PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11);
            __Pyx_GIVEREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_Raise(__pyx_t_11, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
        }
        __pyx_L28:;
      }
      __pyx_L24:;
    }
    __pyx_L12:;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "netCDF4.pyx":3856
 *                     if ierr != NC_NOERR:
 *                         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     return xtype             # <<<<<<<<<<<<<<
 * 
 * cdef _find_cmptype(grp, dtype):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3856; __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":3786
 *         (self.name,self.dtype)
 * 
 * cdef _def_compound(grp, object dt, object dtype_name):             # <<<<<<<<<<<<<<
 *     # private function used to construct a netcdf compound data type
 *     # from a numpy dtype object by CompoundType.__init__.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("netCDF4._def_compound", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bytestr);
  __Pyx_XDECREF(__pyx_v_names);
  __Pyx_XDECREF(__pyx_v_formats);
  __Pyx_XDECREF(__pyx_v_offsets);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_format);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3858
 *     return xtype
 * 
 * cdef _find_cmptype(grp, dtype):             # <<<<<<<<<<<<<<
 *     # look for data type in this group and it's parents.
 *     # return datatype id when found, if not found, raise exception.
 */

static PyObject *__pyx_f_7netCDF4__find_cmptype(PyObject *__pyx_v_grp, PyObject *__pyx_v_dtype) {
  nc_type __pyx_v_xtype;
  int __pyx_v_match;
  CYTHON_UNUSED PyObject *__pyx_v_cmpname = NULL;
  PyObject *__pyx_v_cmpdt = NULL;
  PyObject *__pyx_v_names1 = NULL;
  PyObject *__pyx_v_names2 = NULL;
  PyObject *__pyx_v_formats1 = NULL;
  PyObject *__pyx_v_formats2 = NULL;
  PyObject *__pyx_v_parent_grp = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  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_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;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_find_cmptype", 0);

  /* "netCDF4.pyx":3862
 *     # return datatype id when found, if not found, raise exception.
 *     cdef nc_type xtype
 *     match = False             # <<<<<<<<<<<<<<
 *     for cmpname, cmpdt in grp.cmptypes.items():
 *         xtype = cmpdt._nc_type
 */
  __pyx_v_match = 0;

  /* "netCDF4.pyx":3863
 *     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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_cmptypes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3863; __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 = 3863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (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 = 3863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (!__pyx_t_4 && 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 = 3863; __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 = 3863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
      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 = 3863; __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 = 3863; __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 = 3863; __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 = 3863; __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 = 3863; __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 = 3863; __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 = 3863; __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_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_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_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 = 3863; __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 = 3863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_cmpname, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_cmpdt, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "netCDF4.pyx":3864
 *     match = False
 *     for cmpname, cmpdt in grp.cmptypes.items():
 *         xtype = cmpdt._nc_type             # <<<<<<<<<<<<<<
 *         names1 = dtype.names; names2 = cmpdt.dtype.names
 *         formats1 = [v[0] for v in dtype.fields.values()]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_nc_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3864; __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 = 3864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_xtype = __pyx_t_9;

    /* "netCDF4.pyx":3865
 *     for cmpname, cmpdt in grp.cmptypes.items():
 *         xtype = cmpdt._nc_type
 *         names1 = dtype.names; names2 = cmpdt.dtype.names             # <<<<<<<<<<<<<<
 *         formats1 = [v[0] for v in dtype.fields.values()]
 *         formats2 = [v[0] for v in cmpdt.dtype.fields.values()]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_names); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3865; __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 = 3865; __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 = 3865; __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":3866
 *         xtype = cmpdt._nc_type
 *         names1 = dtype.names; names2 = cmpdt.dtype.names
 *         formats1 = [v[0] for v in dtype.fields.values()]             # <<<<<<<<<<<<<<
 *         formats2 = [v[0] for v in cmpdt.dtype.fields.values()]
 *         # match names, formats, but not offsets (they may be changed
 */
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3866; __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_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_5)) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_5)) {
        if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_1 = __pyx_t_11(__pyx_t_5);
        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 = 3866; __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 = 3866; __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 = 3866; __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_XDECREF_SET(__pyx_v_formats1, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "netCDF4.pyx":3867
 *         names1 = dtype.names; names2 = cmpdt.dtype.names
 *         formats1 = [v[0] for v in dtype.fields.values()]
 *         formats2 = [v[0] for v in cmpdt.dtype.fields.values()]             # <<<<<<<<<<<<<<
 *         # match names, formats, but not offsets (they may be changed
 *         # by netcdf lib).
 */
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmpdt, __pyx_n_s_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3867; __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_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_5)) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_5)) {
        if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_1 = __pyx_t_11(__pyx_t_5);
        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 = 3867; __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 = 3867; __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 = 3867; __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_XDECREF_SET(__pyx_v_formats2, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "netCDF4.pyx":3870
 *         # match names, formats, but not offsets (they may be changed
 *         # by netcdf lib).
 *         if names1==names2 and formats1==formats2:             # <<<<<<<<<<<<<<
 *             match = True
 *             break
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_names1, __pyx_v_names2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_12) {
      __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 = 3870; __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 = 3870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_14 = __pyx_t_13;
    } else {
      __pyx_t_14 = __pyx_t_12;
    }
    if (__pyx_t_14) {

      /* "netCDF4.pyx":3871
 *         # by netcdf lib).
 *         if names1==names2 and formats1==formats2:
 *             match = True             # <<<<<<<<<<<<<<
 *             break
 *     if not match:
 */
      __pyx_v_match = 1;

      /* "netCDF4.pyx":3872
 *         if names1==names2 and formats1==formats2:
 *             match = True
 *             break             # <<<<<<<<<<<<<<
 *     if not match:
 *         try:
 */
      goto __pyx_L4_break;
    }
  }
  __pyx_L4_break:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":3873
 *             match = True
 *             break
 *     if not match:             # <<<<<<<<<<<<<<
 *         try:
 *             parent_grp = grp.parent
 */
  __pyx_t_14 = ((!(__pyx_v_match != 0)) != 0);
  if (__pyx_t_14) {

    /* "netCDF4.pyx":3874
 *             break
 *     if not match:
 *         try:             # <<<<<<<<<<<<<<
 *             parent_grp = grp.parent
 *         except AttributeError:
 */
    {
      __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":3875
 *     if not match:
 *         try:
 *             parent_grp = grp.parent             # <<<<<<<<<<<<<<
 *         except AttributeError:
 *             raise ValueError("cannot find compound type in this group or parent groups")
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_parent); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3875; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_v_parent_grp = __pyx_t_2;
        __pyx_t_2 = 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_L20_try_end;
      __pyx_L13_error:;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "netCDF4.pyx":3876
 *         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_18 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
      if (__pyx_t_18) {
        __Pyx_AddTraceback("netCDF4._find_cmptype", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_6, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3876; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_5);

        /* "netCDF4.pyx":3877
 *             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_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3877; __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 = 3877; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L14_exception_handled;
      }
      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_L14_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_L20_try_end:;
    }

    /* "netCDF4.pyx":3878
 *         except AttributeError:
 *             raise ValueError("cannot find compound type in this group or parent groups")
 *         if parent_grp is None:             # <<<<<<<<<<<<<<
 *             raise ValueError("cannot find compound type in this group or parent groups")
 *         else:
 */
    __pyx_t_14 = (__pyx_v_parent_grp == Py_None);
    __pyx_t_12 = (__pyx_t_14 != 0);
    if (__pyx_t_12) {

      /* "netCDF4.pyx":3879
 *             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_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3879; __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 = 3879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    /*else*/ {

      /* "netCDF4.pyx":3881
 *             raise ValueError("cannot find compound type in this group or parent groups")
 *         else:
 *             xtype = _find_cmptype(parent_grp,dtype)             # <<<<<<<<<<<<<<
 *     return xtype
 * 
 */
      __pyx_t_5 = __pyx_f_7netCDF4__find_cmptype(__pyx_v_parent_grp, __pyx_v_dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3881; __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 = 3881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_xtype = __pyx_t_9;
    }
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "netCDF4.pyx":3882
 *         else:
 *             xtype = _find_cmptype(parent_grp,dtype)
 *     return xtype             # <<<<<<<<<<<<<<
 * 
 * cdef _read_compound(group, nc_type xtype):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "netCDF4.pyx":3858
 *     return xtype
 * 
 * cdef _find_cmptype(grp, dtype):             # <<<<<<<<<<<<<<
 *     # look for data type in this group and it's parents.
 *     # return datatype id when found, if not found, raise exception.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("netCDF4._find_cmptype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cmpname);
  __Pyx_XDECREF(__pyx_v_cmpdt);
  __Pyx_XDECREF(__pyx_v_names1);
  __Pyx_XDECREF(__pyx_v_names2);
  __Pyx_XDECREF(__pyx_v_formats1);
  __Pyx_XDECREF(__pyx_v_formats2);
  __Pyx_XDECREF(__pyx_v_parent_grp);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3884
 *     return xtype
 * 
 * cdef _read_compound(group, nc_type xtype):             # <<<<<<<<<<<<<<
 *     # read a compound data type id from an existing file,
 *     # construct a corresponding numpy dtype instance,
 */

static PyObject *__pyx_f_7netCDF4__read_compound(PyObject *__pyx_v_group, nc_type __pyx_v_xtype) {
  int __pyx_v_ierr;
  int __pyx_v_nf;
  int __pyx_v_numdims;
  int __pyx_v_ndim;
  int __pyx_v_classp;
  size_t __pyx_v_nfields;
  size_t __pyx_v_offset;
  nc_type __pyx_v_field_typeid;
  int __pyx_v_dim_sizes[NC_MAX_DIMS];
  char __pyx_v_field_namstring[(NC_MAX_NAME + 1)];
  char __pyx_v_cmp_namstring[(NC_MAX_NAME + 1)];
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_names = NULL;
  PyObject *__pyx_v_formats = NULL;
  PyObject *__pyx_v_offsets = NULL;
  PyObject *__pyx_v_field_name = NULL;
  PyObject *__pyx_v_field_shape = NULL;
  PyObject *__pyx_v_field_type = NULL;
  PyObject *__pyx_v_dtype_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  char *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_read_compound", 0);

  /* "netCDF4.pyx":3897
 *     cdef char cmp_namstring[NC_MAX_NAME+1]
 *     # get name and number of fields.
 *     ierr = nc_inq_compound(group._grpid, xtype, cmp_namstring, NULL, &nfields)             # <<<<<<<<<<<<<<
 *     if ierr != NC_NOERR:
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3897; __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 = 3897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ierr = nc_inq_compound(__pyx_t_2, __pyx_v_xtype, __pyx_v_cmp_namstring, NULL, (&__pyx_v_nfields));

  /* "netCDF4.pyx":3898
 *     # get name and number of fields.
 *     ierr = nc_inq_compound(group._grpid, xtype, cmp_namstring, NULL, &nfields)
 *     if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *     name = cmp_namstring.decode(default_encoding,unicode_error)
 */
  __pyx_t_3 = ((__pyx_v_ierr != NC_NOERR) != 0);
  if (__pyx_t_3) {

    /* "netCDF4.pyx":3899
 *     ierr = nc_inq_compound(group._grpid, xtype, cmp_namstring, NULL, &nfields)
 *     if ierr != NC_NOERR:
 *         raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *     name = cmp_namstring.decode(default_encoding,unicode_error)
 *     # loop over fields.
 */
    __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
    __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3899; __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 = 3899; __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 = 3899; __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 = 3899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":3900
 *     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_1 = __Pyx_PyBytes_FromString(__pyx_v_cmp_namstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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 = 3900; __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 = 3900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3900; __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);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_1 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3900; __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_name = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "netCDF4.pyx":3902
 *     name = cmp_namstring.decode(default_encoding,unicode_error)
 *     # loop over fields.
 *     names = []             # <<<<<<<<<<<<<<
 *     formats = []
 *     offsets = []
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_names = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "netCDF4.pyx":3903
 *     # loop over fields.
 *     names = []
 *     formats = []             # <<<<<<<<<<<<<<
 *     offsets = []
 *     for nf from 0 <= nf < nfields:
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_formats = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "netCDF4.pyx":3904
 *     names = []
 *     formats = []
 *     offsets = []             # <<<<<<<<<<<<<<
 *     for nf from 0 <= nf < nfields:
 *         ierr = nc_inq_compound_field(group._grpid,
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_offsets = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "netCDF4.pyx":3905
 *     formats = []
 *     offsets = []
 *     for nf from 0 <= nf < nfields:             # <<<<<<<<<<<<<<
 *         ierr = nc_inq_compound_field(group._grpid,
 *                                      xtype,
 */
  __pyx_t_8 = __pyx_v_nfields;
  for (__pyx_v_nf = 0; __pyx_v_nf < __pyx_t_8; __pyx_v_nf++) {

    /* "netCDF4.pyx":3906
 *     offsets = []
 *     for nf from 0 <= nf < nfields:
 *         ierr = nc_inq_compound_field(group._grpid,             # <<<<<<<<<<<<<<
 *                                      xtype,
 *                                      nf,
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "netCDF4.pyx":3913
 *                                      &field_typeid,
 *                                      &numdims,
 *                                      dim_sizes)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
    __pyx_v_ierr = nc_inq_compound_field(__pyx_t_2, __pyx_v_xtype, __pyx_v_nf, __pyx_v_field_namstring, (&__pyx_v_offset), (&__pyx_v_field_typeid), (&__pyx_v_numdims), __pyx_v_dim_sizes);

    /* "netCDF4.pyx":3914
 *                                      &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":3915
 *                                      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_6 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); 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_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_7, 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_7, NULL); 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_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 = 3915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":3916
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         field_name = field_namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
 *         names.append(field_name)
 *         offsets.append(offset)
 */
    __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_field_namstring); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __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 = 3916; __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 = 3916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(2); 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);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_field_name, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "netCDF4.pyx":3917
 *             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_9 = __Pyx_PyObject_Append(__pyx_v_names, __pyx_v_field_name); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "netCDF4.pyx":3918
 *         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_5 = __Pyx_PyInt_FromSize_t(__pyx_v_offset); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_offsets, __pyx_t_5); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "netCDF4.pyx":3920
 *         offsets.append(offset)
 *         # if numdims=0, not an array.
 *         field_shape = ()             # <<<<<<<<<<<<<<
 *         if numdims != 0:
 *             for ndim from 0 <= ndim < numdims:
 */
    __Pyx_INCREF(__pyx_empty_tuple);
    __Pyx_XDECREF_SET(__pyx_v_field_shape, __pyx_empty_tuple);

    /* "netCDF4.pyx":3921
 *         # 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":3922
 *         field_shape = ()
 *         if numdims != 0:
 *             for ndim from 0 <= ndim < numdims:             # <<<<<<<<<<<<<<
 *                 field_shape = field_shape + (dim_sizes[ndim],)
 *         # check to see if this field is a nested compound type.
 */
      __pyx_t_2 = __pyx_v_numdims;
      for (__pyx_v_ndim = 0; __pyx_v_ndim < __pyx_t_2; __pyx_v_ndim++) {

        /* "netCDF4.pyx":3923
 *         if numdims != 0:
 *             for ndim from 0 <= ndim < numdims:
 *                 field_shape = field_shape + (dim_sizes[ndim],)             # <<<<<<<<<<<<<<
 *         # check to see if this field is a nested compound type.
 *         try:
 */
        __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_dim_sizes[__pyx_v_ndim])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3923; __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 = 3923; __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);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyNumber_Add(__pyx_v_field_shape, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3923; __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_field_shape, ((PyObject*)__pyx_t_5));
        __pyx_t_5 = 0;
      }
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "netCDF4.pyx":3925
 *                 field_shape = field_shape + (dim_sizes[ndim],)
 *         # check to see if this field is a nested compound type.
 *         try:             # <<<<<<<<<<<<<<
 *             field_type =  _nctonptype[field_typeid]
 *         except KeyError:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_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":3926
 *         # check to see if this field is a nested compound type.
 *         try:
 *             field_type =  _nctonptype[field_typeid]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             ierr = nc_inq_user_type(group._grpid,
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3926; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_field_typeid, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3926; __pyx_clineno = __LINE__; goto __pyx_L10_error;};
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_field_type, __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_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "netCDF4.pyx":3927
 *         try:
 *             field_type =  _nctonptype[field_typeid]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             ierr = nc_inq_user_type(group._grpid,
 *                    field_typeid,NULL,NULL,NULL,NULL,&classp)
 */
      __pyx_t_2 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_2) {
        __Pyx_AddTraceback("netCDF4._read_compound", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3927; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_7);

        /* "netCDF4.pyx":3928
 *             field_type =  _nctonptype[field_typeid]
 *         except KeyError:
 *             ierr = nc_inq_user_type(group._grpid,             # <<<<<<<<<<<<<<
 *                    field_typeid,NULL,NULL,NULL,NULL,&classp)
 *             if classp == NC_COMPOUND: # a compound type
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3928; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3928; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "netCDF4.pyx":3929
 *         except KeyError:
 *             ierr = nc_inq_user_type(group._grpid,
 *                    field_typeid,NULL,NULL,NULL,NULL,&classp)             # <<<<<<<<<<<<<<
 *             if classp == NC_COMPOUND: # a compound type
 *                 # recursively call this function?
 */
        __pyx_v_ierr = nc_inq_user_type(__pyx_t_2, __pyx_v_field_typeid, NULL, NULL, NULL, NULL, (&__pyx_v_classp));

        /* "netCDF4.pyx":3930
 *             ierr = nc_inq_user_type(group._grpid,
 *                    field_typeid,NULL,NULL,NULL,NULL,&classp)
 *             if classp == NC_COMPOUND: # a compound type             # <<<<<<<<<<<<<<
 *                 # recursively call this function?
 *                 field_type = _read_compound(group, field_typeid)
 */
        __pyx_t_3 = ((__pyx_v_classp == NC_COMPOUND) != 0);
        if (__pyx_t_3) {

          /* "netCDF4.pyx":3932
 *             if classp == NC_COMPOUND: # a compound type
 *                 # recursively call this function?
 *                 field_type = _read_compound(group, field_typeid)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise KeyError('compound field of an unsupported data type')
 */
          __pyx_t_6 = __pyx_f_7netCDF4__read_compound(__pyx_v_group, __pyx_v_field_typeid); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3932; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_XDECREF_SET(__pyx_v_field_type, __pyx_t_6);
          __pyx_t_6 = 0;
          goto __pyx_L20;
        }
        /*else*/ {

          /* "netCDF4.pyx":3934
 *                 field_type = _read_compound(group, field_typeid)
 *             else:
 *                 raise KeyError('compound field of an unsupported data type')             # <<<<<<<<<<<<<<
 *         if field_shape != ():
 *             formats.append((field_type,field_shape))
 */
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3934; __pyx_clineno = __LINE__; goto __pyx_L12_except_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 = 3934; __pyx_clineno = __LINE__; goto __pyx_L12_except_error;}
        }
        __pyx_L20:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L11_exception_handled;
      }
      goto __pyx_L12_except_error;
      __pyx_L12_except_error:;
      __Pyx_XGIVEREF(__pyx_t_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:;
    }

    /* "netCDF4.pyx":3935
 *             else:
 *                 raise KeyError('compound field of an unsupported data type')
 *         if field_shape != ():             # <<<<<<<<<<<<<<
 *             formats.append((field_type,field_shape))
 *         else:
 */
    __pyx_t_7 = PyObject_RichCompare(__pyx_v_field_shape, __pyx_empty_tuple, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_3) {

      /* "netCDF4.pyx":3936
 *                 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 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_field_type);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_field_type);
      __Pyx_GIVEREF(__pyx_v_field_type);
      __Pyx_INCREF(__pyx_v_field_shape);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_field_shape);
      __Pyx_GIVEREF(__pyx_v_field_shape);
      __pyx_t_9 = __Pyx_PyObject_Append(__pyx_v_formats, __pyx_t_7); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L21;
    }
    /*else*/ {

      /* "netCDF4.pyx":3938
 *             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_9 = __Pyx_PyObject_Append(__pyx_v_formats, __pyx_v_field_type); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L21:;
  }

  /* "netCDF4.pyx":3940
 *             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_GetModuleGlobalName(__pyx_n_s_sortbylist); 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_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_names);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_names);
  __Pyx_GIVEREF(__pyx_v_names);
  __Pyx_INCREF(__pyx_v_offsets);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_offsets);
  __Pyx_GIVEREF(__pyx_v_offsets);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3940; __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_SET(__pyx_v_names, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "netCDF4.pyx":3941
 *     # make sure entries in lists sorted by offset.
 *     names = _sortbylist(names, offsets)
 *     formats = _sortbylist(formats, offsets)             # <<<<<<<<<<<<<<
 *     offsets.sort()
 *     # create a dict that can be converted into a numpy dtype.
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3941; __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 = 3941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_formats);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_formats);
  __Pyx_GIVEREF(__pyx_v_formats);
  __Pyx_INCREF(__pyx_v_offsets);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_offsets);
  __Pyx_GIVEREF(__pyx_v_offsets);
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3941; __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_5); __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_formats, __pyx_t_7);
  __pyx_t_7 = 0;

  /* "netCDF4.pyx":3942
 *     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_9 = PyList_Sort(__pyx_v_offsets); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":3944
 *     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 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_names, __pyx_v_names) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_formats, __pyx_v_formats) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_offsets, __pyx_v_offsets) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_dtype_dict = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "netCDF4.pyx":3945
 *     # 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_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3945; __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_dtype_dict);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_dtype_dict);
  __Pyx_GIVEREF(__pyx_v_dtype_dict);
  __Pyx_INCREF(__pyx_v_name);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_typeid, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_CompoundType)), __pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3945; __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "netCDF4.pyx":3884
 *     return xtype
 * 
 * cdef _read_compound(group, nc_type xtype):             # <<<<<<<<<<<<<<
 *     # read a compound data type id from an existing file,
 *     # construct a corresponding numpy dtype instance,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("netCDF4._read_compound", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_names);
  __Pyx_XDECREF(__pyx_v_formats);
  __Pyx_XDECREF(__pyx_v_offsets);
  __Pyx_XDECREF(__pyx_v_field_name);
  __Pyx_XDECREF(__pyx_v_field_shape);
  __Pyx_XDECREF(__pyx_v_field_type);
  __Pyx_XDECREF(__pyx_v_dtype_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3983
 *     cdef public nc_type _nc_type
 *     cdef public dtype, name
 *     def __init__(self, grp, object dt, object dtype_name, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef nc_type xtype
 *         if 'typeid' in kwargs:
 */

/* Python wrapper */
static int __pyx_pw_7netCDF4_6VLType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7netCDF4_6VLType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_grp = 0;
  PyObject *__pyx_v_dt = 0;
  PyObject *__pyx_v_dtype_name = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grp_2,&__pyx_n_s_dt,&__pyx_n_s_dtype_name,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grp_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3983; __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 = 3983; __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 = 3983; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_grp = values[0];
    __pyx_v_dt = values[1];
    __pyx_v_dtype_name = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3983; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("netCDF4.VLType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7netCDF4_6VLType___init__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self), __pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_6VLType___init__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_grp, PyObject *__pyx_v_dt, PyObject *__pyx_v_dtype_name, PyObject *__pyx_v_kwargs) {
  nc_type __pyx_v_xtype;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  nc_type __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_dt);

  /* "netCDF4.pyx":3985
 *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
 *         cdef nc_type xtype
 *         if 'typeid' in kwargs:             # <<<<<<<<<<<<<<
 *             xtype = kwargs['typeid']
 *         else:
 */
  __pyx_t_1 = (__Pyx_PyDict_Contains(__pyx_n_s_typeid, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "netCDF4.pyx":3986
 *         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 = 3986; __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 = 3986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_xtype = __pyx_t_4;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "netCDF4.pyx":3988
 *             xtype = kwargs['typeid']
 *         else:
 *             xtype, dt = _def_vlen(grp, dt, dtype_name)             # <<<<<<<<<<<<<<
 *         self._nc_type = xtype
 *         self.dtype = dt
 */
    __pyx_t_3 = __pyx_f_7netCDF4__def_vlen(__pyx_v_grp, __pyx_v_dt, __pyx_v_dtype_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3988; __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 = 3988; __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 = 3988; __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 = 3988; __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 = 3988; __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 = 3988; __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 = 3988; __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 = 3988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_xtype = __pyx_t_4;
    __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_6);
    __pyx_t_6 = 0;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":3989
 *         else:
 *             xtype, dt = _def_vlen(grp, dt, dtype_name)
 *         self._nc_type = xtype             # <<<<<<<<<<<<<<
 *         self.dtype = dt
 *         if dt == str:
 */
  __pyx_v_self->_nc_type = __pyx_v_xtype;

  /* "netCDF4.pyx":3990
 *             xtype, dt = _def_vlen(grp, dt, dtype_name)
 *         self._nc_type = xtype
 *         self.dtype = dt             # <<<<<<<<<<<<<<
 *         if dt == str:
 *             self.name = None
 */
  __Pyx_INCREF(__pyx_v_dt);
  __Pyx_GIVEREF(__pyx_v_dt);
  __Pyx_GOTREF(__pyx_v_self->dtype);
  __Pyx_DECREF(__pyx_v_self->dtype);
  __pyx_v_self->dtype = __pyx_v_dt;

  /* "netCDF4.pyx":3991
 *         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 = 3991; __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 = 3991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "netCDF4.pyx":3992
 *         self.dtype = dt
 *         if dt == str:
 *             self.name = None             # <<<<<<<<<<<<<<
 *         else:
 *             self.name = dtype_name
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_self->name);
    __Pyx_DECREF(__pyx_v_self->name);
    __pyx_v_self->name = Py_None;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "netCDF4.pyx":3994
 *             self.name = None
 *         else:
 *             self.name = dtype_name             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __Pyx_INCREF(__pyx_v_dtype_name);
    __Pyx_GIVEREF(__pyx_v_dtype_name);
    __Pyx_GOTREF(__pyx_v_self->name);
    __Pyx_DECREF(__pyx_v_self->name);
    __pyx_v_self->name = __pyx_v_dtype_name;
  }
  __pyx_L6:;

  /* "netCDF4.pyx":3983
 *     cdef public nc_type _nc_type
 *     cdef public dtype, name
 *     def __init__(self, grp, object dt, object dtype_name, **kwargs):             # <<<<<<<<<<<<<<
 *         cdef nc_type xtype
 *         if 'typeid' in kwargs:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("netCDF4.VLType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3996
 *             self.name = dtype_name
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         if python3:
 *            return self.__unicode__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_6VLType_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_6VLType_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_6VLType_2__str__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_6VLType_2__str__(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("__str__", 0);

  /* "netCDF4.pyx":3997
 * 
 *     def __str__(self):
 *         if python3:             # <<<<<<<<<<<<<<
 *            return self.__unicode__()
 *         else:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_python3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3997; __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 = 3997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "netCDF4.pyx":3998
 *     def __str__(self):
 *         if python3:
 *            return self.__unicode__()             # <<<<<<<<<<<<<<
 *         else:
 *            return unicode(self).encode(default_encoding)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3998; __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":4000
 *            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 = 4000; __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_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4000; __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_GetModuleGlobalName(__pyx_n_s_default_encoding); 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_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4000; __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_t_3, __pyx_t_4, NULL); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":3996
 *             self.name = dtype_name
 * 
 *     def __str__(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_AddTraceback("netCDF4.VLType.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":4002
 *            return unicode(self).encode(default_encoding)
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         if self.dtype == str:
 *             return repr(type(self))+': string type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_6VLType_5__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7netCDF4_6VLType_5__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_6VLType_4__unicode__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_6VLType_4__unicode__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__unicode__", 0);

  /* "netCDF4.pyx":4003
 * 
 *     def __unicode__(self):
 *         if self.dtype == str:             # <<<<<<<<<<<<<<
 *             return repr(type(self))+': string type'
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->dtype, ((PyObject *)((PyObject*)(&PyString_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4003; __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 = 4003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "netCDF4.pyx":4004
 *     def __unicode__(self):
 *         if self.dtype == str:
 *             return repr(type(self))+': string type'             # <<<<<<<<<<<<<<
 *         else:
 *             return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4004; __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 = 4004; __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":4006
 *             return repr(type(self))+': string type'
 *         else:
 *             return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\             # <<<<<<<<<<<<<<
 *             (self.name, self.dtype)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);

    /* "netCDF4.pyx":4007
 *         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 = 4007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_self->name);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
    __Pyx_GIVEREF(__pyx_v_self->name);
    __Pyx_INCREF(__pyx_v_self->dtype);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->dtype);
    __Pyx_GIVEREF(__pyx_v_self->dtype);

    /* "netCDF4.pyx":4006
 *             return repr(type(self))+': string type'
 *         else:
 *             return repr(type(self))+": name = '%s', numpy dtype = %s\n" %\             # <<<<<<<<<<<<<<
 *             (self.name, self.dtype)
 * 
 */
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_name_s_numpy_dtype_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4006; __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 = 4006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "netCDF4.pyx":4002
 *            return unicode(self).encode(default_encoding)
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         if self.dtype == str:
 *             return repr(type(self))+': string type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("netCDF4.VLType.__unicode__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":3981
 * @ivar name: A python string describing the VLEN type.
 * """
 *     cdef public nc_type _nc_type             # <<<<<<<<<<<<<<
 *     cdef public dtype, name
 *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_6VLType_8_nc_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_6VLType_8_nc_type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_6VLType_8_nc_type___get__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_6VLType_8_nc_type___get__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_self->_nc_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3981; __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 = 3981; __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":3982
 * """
 *     cdef public nc_type _nc_type
 *     cdef public dtype, name             # <<<<<<<<<<<<<<
 *     def __init__(self, grp, object dt, object dtype_name, **kwargs):
 *         cdef nc_type xtype
 */

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_6VLType_5dtype_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_6VLType_5dtype_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_6VLType_5dtype___get__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_6VLType_5dtype___get__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->dtype);
  __pyx_r = __pyx_v_self->dtype;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_6VLType_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_6VLType_5dtype_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_6VLType_5dtype_2__set__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_6VLType_5dtype_2__set__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->dtype);
  __Pyx_DECREF(__pyx_v_self->dtype);
  __pyx_v_self->dtype = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_6VLType_5dtype_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_6VLType_5dtype_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_6VLType_5dtype_4__del__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_6VLType_5dtype_4__del__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dtype);
  __Pyx_DECREF(__pyx_v_self->dtype);
  __pyx_v_self->dtype = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7netCDF4_6VLType_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7netCDF4_6VLType_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_6VLType_4name___get__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7netCDF4_6VLType_4name___get__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_6VLType_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_7netCDF4_6VLType_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_6VLType_4name_2__set__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_6VLType_4name_2__set__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_7netCDF4_6VLType_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_7netCDF4_6VLType_4name_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7netCDF4_6VLType_4name_4__del__(((struct __pyx_obj_7netCDF4_VLType *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7netCDF4_6VLType_4name_4__del__(struct __pyx_obj_7netCDF4_VLType *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":4009
 *             (self.name, self.dtype)
 * 
 * cdef _def_vlen(grp, object dt, object dtype_name):             # <<<<<<<<<<<<<<
 *     # private function used to construct a netcdf VLEN data type
 *     # from a numpy dtype object or python str object by VLType.__init__.
 */

static PyObject *__pyx_f_7netCDF4__def_vlen(PyObject *__pyx_v_grp, PyObject *__pyx_v_dt, PyObject *__pyx_v_dtype_name) {
  nc_type __pyx_v_xtype;
  nc_type __pyx_v_xtype_tmp;
  int __pyx_v_ierr;
  char *__pyx_v_namstring;
  PyObject *__pyx_v_bytestr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  char *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  nc_type __pyx_t_7;
  int __pyx_t_8;
  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":4018
 *     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 = 4018; __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 = 4018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "netCDF4.pyx":4019
 *     cdef int dim_sizes[NC_MAX_DIMS]
 *     if dt == str: # python string, use NC_STRING
 *         xtype = NC_STRING             # <<<<<<<<<<<<<<
 *         # dtype_name ignored
 *     else: # numpy datatype
 */
    __pyx_v_xtype = NC_STRING;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "netCDF4.pyx":4022
 *         # dtype_name ignored
 *     else: # numpy datatype
 *         bytestr = _strencode(dtype_name)             # <<<<<<<<<<<<<<
 *         namstring = bytestr
 *         dt = numpy.dtype(dt) # convert to numpy datatype.
 */
    __pyx_t_1 = __pyx_f_7netCDF4__strencode(__pyx_v_dtype_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_bytestr = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "netCDF4.pyx":4023
 *     else: # numpy datatype
 *         bytestr = _strencode(dtype_name)
 *         namstring = bytestr             # <<<<<<<<<<<<<<
 *         dt = numpy.dtype(dt) # convert to numpy datatype.
 *         if dt.str[1:] in _supportedtypes:
 */
    __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_bytestr); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_namstring = __pyx_t_3;

    /* "netCDF4.pyx":4024
 *         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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4024; __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 = 4024; __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_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4024; __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_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "netCDF4.pyx":4025
 *         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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dt, __pyx_n_s_str); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 1, 0, NULL, NULL, &__pyx_slice__105, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4025; __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 = 4025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_t_1, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4025; __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_6 = (__pyx_t_2 != 0);
    if (__pyx_t_6) {

      /* "netCDF4.pyx":4028
 *             # 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __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 = 4028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__106, 1, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4028; __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 = 4028; __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_t_7 = __Pyx_PyInt_As_nc_type(__pyx_t_1); if (unlikely((__pyx_t_7 == (nc_type)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_xtype_tmp = __pyx_t_7;

      /* "netCDF4.pyx":4029
 *             # 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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grp, __pyx_n_s_grpid); 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_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_ierr = nc_def_vlen(__pyx_t_8, __pyx_v_namstring, __pyx_v_xtype_tmp, (&__pyx_v_xtype));

      /* "netCDF4.pyx":4030
 *             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_6 = ((__pyx_v_ierr != NC_NOERR) != 0);
      if (__pyx_t_6) {

        /* "netCDF4.pyx":4031
 *             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_1 = __Pyx_decode_c_string(__pyx_t_3, 0, strlen(__pyx_t_3), NULL, NULL, PyUnicode_DecodeASCII); 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_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4031; __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 = 4031; __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 = 4031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      goto __pyx_L4;
    }
    /*else*/ {

      /* "netCDF4.pyx":4033
 *                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         else:
 *             raise KeyError("unsupported datatype specified for VLEN")             # <<<<<<<<<<<<<<
 *     return xtype, dt
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4033; __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 = 4033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L4:;
  }
  __pyx_L3:;

  /* "netCDF4.pyx":4034
 *         else:
 *             raise KeyError("unsupported datatype specified for VLEN")
 *     return xtype, dt             # <<<<<<<<<<<<<<
 * 
 * cdef _read_vlen(group, nc_type xtype):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4034; __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_dt);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_dt);
  __Pyx_GIVEREF(__pyx_v_dt);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "netCDF4.pyx":4009
 *             (self.name, self.dtype)
 * 
 * cdef _def_vlen(grp, object dt, object dtype_name):             # <<<<<<<<<<<<<<
 *     # private function used to construct a netcdf VLEN data type
 *     # from a numpy dtype object or python str object by VLType.__init__.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_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":4036
 *     return xtype, dt
 * 
 * cdef _read_vlen(group, nc_type xtype):             # <<<<<<<<<<<<<<
 *     # read a VLEN data type id from an existing file,
 *     # construct a corresponding numpy dtype instance,
 */

static PyObject *__pyx_f_7netCDF4__read_vlen(PyObject *__pyx_v_group, nc_type __pyx_v_xtype) {
  int __pyx_v_ierr;
  size_t __pyx_v_vlsize;
  nc_type __pyx_v_base_xtype;
  char __pyx_v_vl_namstring[(NC_MAX_NAME + 1)];
  PyObject *__pyx_v_dt = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  char *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  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("_read_vlen", 0);

  /* "netCDF4.pyx":4045
 *     cdef nc_type base_xtype
 *     cdef char vl_namstring[NC_MAX_NAME+1]
 *     if xtype == NC_STRING:             # <<<<<<<<<<<<<<
 *         dt = str
 *         name = None
 */
  __pyx_t_1 = ((__pyx_v_xtype == NC_STRING) != 0);
  if (__pyx_t_1) {

    /* "netCDF4.pyx":4046
 *     cdef char vl_namstring[NC_MAX_NAME+1]
 *     if xtype == NC_STRING:
 *         dt = str             # <<<<<<<<<<<<<<
 *         name = None
 *     else:
 */
    __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
    __pyx_v_dt = ((PyObject *)((PyObject*)(&PyString_Type)));

    /* "netCDF4.pyx":4047
 *     if xtype == NC_STRING:
 *         dt = str
 *         name = None             # <<<<<<<<<<<<<<
 *     else:
 *         ierr = nc_inq_vlen(group._grpid, xtype, vl_namstring, &vlsize, &base_xtype)
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_name = Py_None;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "netCDF4.pyx":4049
 *         name = None
 *     else:
 *         ierr = nc_inq_vlen(group._grpid, xtype, vl_namstring, &vlsize, &base_xtype)             # <<<<<<<<<<<<<<
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_grpid); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_ierr = nc_inq_vlen(__pyx_t_3, __pyx_v_xtype, __pyx_v_vl_namstring, (&__pyx_v_vlsize), (&__pyx_v_base_xtype));

    /* "netCDF4.pyx":4050
 *     else:
 *         ierr = nc_inq_vlen(group._grpid, xtype, vl_namstring, &vlsize, &base_xtype)
 *         if ierr != NC_NOERR:             # <<<<<<<<<<<<<<
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         name = vl_namstring.decode(default_encoding,unicode_error)
 */
    __pyx_t_1 = ((__pyx_v_ierr != NC_NOERR) != 0);
    if (__pyx_t_1) {

      /* "netCDF4.pyx":4051
 *         ierr = nc_inq_vlen(group._grpid, xtype, vl_namstring, &vlsize, &base_xtype)
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))             # <<<<<<<<<<<<<<
 *         name = vl_namstring.decode(default_encoding,unicode_error)
 *         try:
 */
      __pyx_t_4 = ((char *)nc_strerror(__pyx_v_ierr));
      __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4051; __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 = 4051; __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 = 4051; __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 = 4051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "netCDF4.pyx":4052
 *         if ierr != NC_NOERR:
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         name = vl_namstring.decode(default_encoding,unicode_error)             # <<<<<<<<<<<<<<
 *         try:
 *             dt = numpy.dtype(_nctonptype[base_xtype]) # see if it is a primitive type
 */
    __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_vl_namstring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4052; __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_GetModuleGlobalName(__pyx_n_s_default_encoding); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4052; __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);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_2 = 0;
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4052; __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_name = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "netCDF4.pyx":4053
 *             raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         name = vl_namstring.decode(default_encoding,unicode_error)
 *         try:             # <<<<<<<<<<<<<<
 *             dt = numpy.dtype(_nctonptype[base_xtype]) # see if it is a primitive type
 *         except KeyError:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_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":4054
 *         name = vl_namstring.decode(default_encoding,unicode_error)
 *         try:
 *             dt = numpy.dtype(_nctonptype[base_xtype]) # see if it is a primitive type             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             raise KeyError("unsupported component type for VLEN")
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4054; __pyx_clineno = __LINE__; goto __pyx_L5_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 = 4054; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4054; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_base_xtype, nc_type, 1, __Pyx_PyInt_From_nc_type, 0, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4054; __pyx_clineno = __LINE__; goto __pyx_L5_error;};
        __Pyx_GOTREF(__pyx_t_5);
        __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 = 4054; __pyx_clineno = __LINE__; goto __pyx_L5_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 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4054; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_v_dt = __pyx_t_5;
        __pyx_t_5 = 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_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "netCDF4.pyx":4055
 *         try:
 *             dt = numpy.dtype(_nctonptype[base_xtype]) # see if it is a primitive type
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             raise KeyError("unsupported component type for VLEN")
 *     return VLType(group, dt, name, typeid=xtype)
 */
      __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_3) {
        __Pyx_AddTraceback("netCDF4._read_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4055; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_7);

        /* "netCDF4.pyx":4056
 *             dt = numpy.dtype(_nctonptype[base_xtype]) # see if it is a primitive type
 *         except KeyError:
 *             raise KeyError("unsupported component type for VLEN")             # <<<<<<<<<<<<<<
 *     return VLType(group, dt, name, typeid=xtype)
 * 
 */
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_tuple__108, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4056; __pyx_clineno = __LINE__; goto __pyx_L7_except_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 = 4056; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_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_L6_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_L12_try_end:;
    }
  }
  __pyx_L3:;

  /* "netCDF4.pyx":4057
 *         except KeyError:
 *             raise KeyError("unsupported component type for VLEN")
 *     return VLType(group, dt, name, typeid=xtype)             # <<<<<<<<<<<<<<
 * 
 * cdef _strencode(pystr,encoding=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4057; __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_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyInt_From_nc_type(__pyx_v_xtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_typeid, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_VLType)), __pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "netCDF4.pyx":4036
 *     return xtype, dt
 * 
 * cdef _read_vlen(group, nc_type xtype):             # <<<<<<<<<<<<<<
 *     # read a VLEN data type id from an existing file,
 *     # construct a corresponding numpy dtype instance,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("netCDF4._read_vlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "netCDF4.pyx":4059
 *     return VLType(group, dt, name, typeid=xtype)
 * 
 * cdef _strencode(pystr,encoding=None):             # <<<<<<<<<<<<<<
 *     # encode a string into bytes.  If already bytes, do nothing.
 *     # uses default_encoding module variable for default encoding.
 */

static PyObject *__pyx_f_7netCDF4__strencode(PyObject *__pyx_v_pystr, struct __pyx_opt_args_7netCDF4__strencode *__pyx_optional_args) {
  PyObject *__pyx_v_encoding = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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":4062
 *     # 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":4063
 *     # 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 = 4063; __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":4064
 *     if encoding is None:
 *         encoding = default_encoding
 *     try:             # <<<<<<<<<<<<<<
 *         return pystr.encode(encoding)
 *     except (AttributeError, UnicodeDecodeError):
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    /*try:*/ {

      /* "netCDF4.pyx":4065
 *         encoding = default_encoding
 *     try:
 *         return pystr.encode(encoding)             # <<<<<<<<<<<<<<
 *     except (AttributeError, UnicodeDecodeError):
 *         return pystr # already bytes or unicode?
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pystr, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4065; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4065; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_encoding);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_encoding);
      __Pyx_GIVEREF(__pyx_v_encoding);
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4065; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L8_try_return;
    }
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L11_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "netCDF4.pyx":4066
 *     try:
 *         return pystr.encode(encoding)
 *     except (AttributeError, UnicodeDecodeError):             # <<<<<<<<<<<<<<
 *         return pystr # already bytes or unicode?
 */
    __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
    if (__pyx_t_9) {
      __Pyx_AddTraceback("netCDF4._strencode", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4066; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_3);

      /* "netCDF4.pyx":4067
 *         return pystr.encode(encoding)
 *     except (AttributeError, UnicodeDecodeError):
 *         return pystr # already bytes or unicode?             # <<<<<<<<<<<<<<
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_pystr);
      __pyx_r = __pyx_v_pystr;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L7_except_return;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L5_exception_handled;
    }
    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_L5_exception_handled:;
    __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);
    __pyx_L11_try_end:;
  }

  /* "netCDF4.pyx":4059
 *     return VLType(group, dt, name, typeid=xtype)
 * 
 * cdef _strencode(pystr,encoding=None):             # <<<<<<<<<<<<<<
 *     # encode a string into bytes.  If already bytes, do nothing.
 *     # uses default_encoding module variable for default encoding.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("netCDF4._strencode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_encoding);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_7netCDF4_Dataset(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_7netCDF4_Dataset *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7netCDF4_Dataset *)o);
  p->groups = Py_None; Py_INCREF(Py_None);
  p->dimensions = Py_None; Py_INCREF(Py_None);
  p->variables = Py_None; Py_INCREF(Py_None);
  p->disk_format = Py_None; Py_INCREF(Py_None);
  p->path = Py_None; Py_INCREF(Py_None);
  p->parent = Py_None; Py_INCREF(Py_None);
  p->file_format = Py_None; Py_INCREF(Py_None);
  p->data_model = Py_None; Py_INCREF(Py_None);
  p->cmptypes = Py_None; Py_INCREF(Py_None);
  p->vltypes = Py_None; Py_INCREF(Py_None);
  p->keepweakref = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_7netCDF4_Dataset(PyObject *o) {
  struct __pyx_obj_7netCDF4_Dataset *p = (struct __pyx_obj_7netCDF4_Dataset *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_7netCDF4_7Dataset_15__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  if (p->__weakref__) PyObject_ClearWeakRefs(o);
  Py_CLEAR(p->groups);
  Py_CLEAR(p->dimensions);
  Py_CLEAR(p->variables);
  Py_CLEAR(p->disk_format);
  Py_CLEAR(p->path);
  Py_CLEAR(p->parent);
  Py_CLEAR(p->file_format);
  Py_CLEAR(p->data_model);
  Py_CLEAR(p->cmptypes);
  Py_CLEAR(p->vltypes);
  Py_CLEAR(p->keepweakref);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7netCDF4_Dataset(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7netCDF4_Dataset *p = (struct __pyx_obj_7netCDF4_Dataset *)o;
  if (p->groups) {
    e = (*v)(p->groups, a); if (e) return e;
  }
  if (p->dimensions) {
    e = (*v)(p->dimensions, a); if (e) return e;
  }
  if (p->variables) {
    e = (*v)(p->variables, a); if (e) return e;
  }
  if (p->disk_format) {
    e = (*v)(p->disk_format, a); if (e) return e;
  }
  if (p->path) {
    e = (*v)(p->path, a); if (e) return e;
  }
  if (p->parent) {
    e = (*v)(p->parent, a); if (e) return e;
  }
  if (p->file_format) {
    e = (*v)(p->file_format, a); if (e) return e;
  }
  if (p->data_model) {
    e = (*v)(p->data_model, a); if (e) return e;
  }
  if (p->cmptypes) {
    e = (*v)(p->cmptypes, a); if (e) return e;
  }
  if (p->vltypes) {
    e = (*v)(p->vltypes, a); if (e) return e;
  }
  if (p->keepweakref) {
    e = (*v)(p->keepweakref, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7netCDF4_Dataset(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7netCDF4_Dataset *p = (struct __pyx_obj_7netCDF4_Dataset *)o;
  tmp = ((PyObject*)p->groups);
  p->groups = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dimensions);
  p->dimensions = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->variables);
  p->variables = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->disk_format);
  p->disk_format = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->path);
  p->path = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->parent);
  p->parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->file_format);
  p->file_format = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->data_model);
  p->data_model = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->cmptypes);
  p->cmptypes = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->vltypes);
  p->vltypes = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->keepweakref);
  p->keepweakref = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_getattro_7netCDF4_Dataset(PyObject *o, PyObject *n) {
  PyObject *v = PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_7netCDF4_7Dataset_55__getattr__(o, n);
  }
  return v;
}

static int __pyx_tp_setattro_7netCDF4_Dataset(PyObject *o, PyObject *n, PyObject *v) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_53__setattr__(o, n, v);
  }
  else {
    return __pyx_pw_7netCDF4_7Dataset_49__delattr__(o, n);
  }
}

static PyObject *__pyx_getprop_7netCDF4_7Dataset__grpid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_7Dataset_6_grpid_1__get__(o);
}

static int __pyx_setprop_7netCDF4_7Dataset__grpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_6_grpid_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7netCDF4_7Dataset__isopen(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_7Dataset_7_isopen_1__get__(o);
}

static int __pyx_setprop_7netCDF4_7Dataset__isopen(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_7_isopen_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7netCDF4_7Dataset_groups(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_7Dataset_6groups_1__get__(o);
}

static int __pyx_setprop_7netCDF4_7Dataset_groups(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_6groups_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_7Dataset_6groups_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_7Dataset_dimensions(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_7Dataset_10dimensions_1__get__(o);
}

static int __pyx_setprop_7netCDF4_7Dataset_dimensions(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_10dimensions_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_7Dataset_10dimensions_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_7Dataset_variables(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_7Dataset_9variables_1__get__(o);
}

static int __pyx_setprop_7netCDF4_7Dataset_variables(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_9variables_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_7Dataset_9variables_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_7Dataset_disk_format(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_7Dataset_11disk_format_1__get__(o);
}

static int __pyx_setprop_7netCDF4_7Dataset_disk_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_11disk_format_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_7Dataset_11disk_format_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_7Dataset_path(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_7Dataset_4path_1__get__(o);
}

static int __pyx_setprop_7netCDF4_7Dataset_path(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_4path_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_7Dataset_4path_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_7Dataset_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_7Dataset_6parent_1__get__(o);
}

static int __pyx_setprop_7netCDF4_7Dataset_parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_6parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_7Dataset_6parent_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_7Dataset_file_format(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_7Dataset_11file_format_1__get__(o);
}

static int __pyx_setprop_7netCDF4_7Dataset_file_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_11file_format_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_7Dataset_11file_format_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_7Dataset_data_model(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_7Dataset_10data_model_1__get__(o);
}

static int __pyx_setprop_7netCDF4_7Dataset_data_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_10data_model_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_7Dataset_10data_model_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_7Dataset_cmptypes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_7Dataset_8cmptypes_1__get__(o);
}

static int __pyx_setprop_7netCDF4_7Dataset_cmptypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_8cmptypes_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_7Dataset_8cmptypes_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_7Dataset_vltypes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_7Dataset_7vltypes_1__get__(o);
}

static int __pyx_setprop_7netCDF4_7Dataset_vltypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_7vltypes_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_7Dataset_7vltypes_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_7Dataset_keepweakref(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_7Dataset_11keepweakref_1__get__(o);
}

static int __pyx_setprop_7netCDF4_7Dataset_keepweakref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_7Dataset_11keepweakref_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_7Dataset_11keepweakref_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_7netCDF4_Dataset[] = {
  {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_3__enter__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_5__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("filepath"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_7filepath, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_6filepath)},
  {__Pyx_NAMESTR("__unicode__"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_11__unicode__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_13close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_12close)},
  {__Pyx_NAMESTR("sync"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_17sync, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_16sync)},
  {__Pyx_NAMESTR("_redef"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_19_redef, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_enddef"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_21_enddef, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set_fill_on"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_23set_fill_on, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_22set_fill_on)},
  {__Pyx_NAMESTR("set_fill_off"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_25set_fill_off, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_24set_fill_off)},
  {__Pyx_NAMESTR("createDimension"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_27createDimension, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_26createDimension)},
  {__Pyx_NAMESTR("renameDimension"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_29renameDimension, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_28renameDimension)},
  {__Pyx_NAMESTR("createCompoundType"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_31createCompoundType, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_30createCompoundType)},
  {__Pyx_NAMESTR("createVLType"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_33createVLType, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_32createVLType)},
  {__Pyx_NAMESTR("createVariable"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_35createVariable, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_34createVariable)},
  {__Pyx_NAMESTR("renameVariable"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_37renameVariable, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_36renameVariable)},
  {__Pyx_NAMESTR("createGroup"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_39createGroup, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_38createGroup)},
  {__Pyx_NAMESTR("ncattrs"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_41ncattrs, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_40ncattrs)},
  {__Pyx_NAMESTR("setncattr"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_43setncattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_42setncattr)},
  {__Pyx_NAMESTR("setncatts"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_45setncatts, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_44setncatts)},
  {__Pyx_NAMESTR("getncattr"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_47getncattr, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_46getncattr)},
  {__Pyx_NAMESTR("delncattr"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_51delncattr, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_50delncattr)},
  {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_55__getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("renameAttribute"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_57renameAttribute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_56renameAttribute)},
  {__Pyx_NAMESTR("renameGroup"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_59renameGroup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_58renameGroup)},
  {__Pyx_NAMESTR("set_auto_maskandscale"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_61set_auto_maskandscale, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_60set_auto_maskandscale)},
  {__Pyx_NAMESTR("set_auto_mask"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_63set_auto_mask, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_62set_auto_mask)},
  {__Pyx_NAMESTR("set_auto_scale"), (PyCFunction)__pyx_pw_7netCDF4_7Dataset_65set_auto_scale, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_7Dataset_64set_auto_scale)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7netCDF4_Dataset[] = {
  {(char *)"_grpid", __pyx_getprop_7netCDF4_7Dataset__grpid, __pyx_setprop_7netCDF4_7Dataset__grpid, 0, 0},
  {(char *)"_isopen", __pyx_getprop_7netCDF4_7Dataset__isopen, __pyx_setprop_7netCDF4_7Dataset__isopen, 0, 0},
  {(char *)"groups", __pyx_getprop_7netCDF4_7Dataset_groups, __pyx_setprop_7netCDF4_7Dataset_groups, 0, 0},
  {(char *)"dimensions", __pyx_getprop_7netCDF4_7Dataset_dimensions, __pyx_setprop_7netCDF4_7Dataset_dimensions, 0, 0},
  {(char *)"variables", __pyx_getprop_7netCDF4_7Dataset_variables, __pyx_setprop_7netCDF4_7Dataset_variables, 0, 0},
  {(char *)"disk_format", __pyx_getprop_7netCDF4_7Dataset_disk_format, __pyx_setprop_7netCDF4_7Dataset_disk_format, 0, 0},
  {(char *)"path", __pyx_getprop_7netCDF4_7Dataset_path, __pyx_setprop_7netCDF4_7Dataset_path, 0, 0},
  {(char *)"parent", __pyx_getprop_7netCDF4_7Dataset_parent, __pyx_setprop_7netCDF4_7Dataset_parent, 0, 0},
  {(char *)"file_format", __pyx_getprop_7netCDF4_7Dataset_file_format, __pyx_setprop_7netCDF4_7Dataset_file_format, 0, 0},
  {(char *)"data_model", __pyx_getprop_7netCDF4_7Dataset_data_model, __pyx_setprop_7netCDF4_7Dataset_data_model, 0, 0},
  {(char *)"cmptypes", __pyx_getprop_7netCDF4_7Dataset_cmptypes, __pyx_setprop_7netCDF4_7Dataset_cmptypes, 0, 0},
  {(char *)"vltypes", __pyx_getprop_7netCDF4_7Dataset_vltypes, __pyx_setprop_7netCDF4_7Dataset_vltypes, 0, 0},
  {(char *)"keepweakref", __pyx_getprop_7netCDF4_7Dataset_keepweakref, __pyx_setprop_7netCDF4_7Dataset_keepweakref, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7netCDF4_Dataset = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("netCDF4.Dataset"), /*tp_name*/
  sizeof(struct __pyx_obj_7netCDF4_Dataset), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7netCDF4_Dataset, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7netCDF4_7Dataset_9__str__, /*tp_str*/
  __pyx_tp_getattro_7netCDF4_Dataset, /*tp_getattro*/
  __pyx_tp_setattro_7netCDF4_Dataset, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\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 write; a new file is created, an existing file with\nthe same name is deleted. C{a} and C{r+} mean append (in analogy with\nserial files); an existing file is opened for reading and writing.\nAppending C{s} to modes C{w}, C{r+} or C{a} will enable unbuffered shared\naccess to C{NETCDF3_CLASSIC} or C{NETCDF3_64BIT} formatted files.\nUnbuffered acesss may be useful even if you don't need shared \naccess, since it may be faster for programs that don't access data\nsequentially. This option is ignored for C{NETCDF4} and C{NETCDF4_CLASSIC}\nformatted files.\n\nB{C{clobber}} - if C{True} (default), opening a file with C{mode='w'}\nwill clobber an existing file with the same name.  if C{False}, an\nexception will be raised if a file with the same name already exists.\n\nB{C{format}} - underlying file format (one of C{'NETCDF4', \n'NETCDF4_CLASSIC', 'NETCDF3_CLASSIC'} or C{'NETCDF3_64BIT'}.  Only \nrelevant if C{mode = 'w'} (if C{mode = 'r','a'} or C{'r+'} the file format \nis automatically detected). Default C{'NETCDF4'}, which means the data is \nstored in an HDF5 file, using netCDF 4 API features.  Setting \nC{format='NETCDF4_CLASSIC'} will create an HDF5 file, using only netCDF 3 \ncompatibile API features. netCDF 3 clients must be recompiled and linked \nagainst the netCDF 4 library to read files in C{NETCDF4_CLASSIC} format. \nC{'NETCDF3_CLASSIC'} is the classic netCDF 3 file format that does not \nhandle 2+ Gb files very well. C{'NETCDF3_64BIT'} is the 64-bit offset \nversion of the netCDF 3 file format, which fully supports 2+ GB files, but \nis only compatible with clients linked against netCDF version 3.6.0 or \nlater.\n\nC{diskless} - create diskless (in memory) file.  This is an experimental \nfeature added to the C library after the netcdf-4.2 release.\n\nC{persist} - if diskless=True, persist file to disk when closed (default False).\n\nC{keepweakref} - if keepweakref=True, child Dimension and Variable instances will keep weak\nreferences to the parent Dataset or Group object.  Default is False, which\nmeans strong references will be kept.  Having Dimension and Variable instances\nkeep a strong reference to the parent Dataset instance, which in turn keeps a\nreference to child Dimension and Variable instances, creates circular references.\nCircular references complicate garbage collection, which may mean increased\nmemory usage for programs that create may Dataset instances with lots of\nVariables.  Setting keepweakref to True allows Dataset instances to be \ngarbage collected as soon as they go out of scope, potential reducing memory\nusage.  However, in most cases this is not desirable, since the associated\nVariable instances may still be needed, but are rendered unusable when the\nparent Dataset instance is garbage collected.\n\nB{Returns:}\n\na L{Dataset} instance.  All further operations on the netCDF\nDataset are accomplised via L{Dataset} instance methods.\n\nA list of attribute names corresponding to global netCDF attributes \ndefined for the L{Dataset} can be obtained with the L{ncattrs()} method. \nThese attributes can be created by assigning to an attribute of the \nL{Dataset} instance. A dictionary containing all the netCDF attribute\nname/value pairs is provided by the C{__dict__} attribute of a\nL{Dataset} instance.\n\nThe instance variables C{dimensions, variables, groups, \ncmptypes, data_model, disk_format} and C{path} are read-only (and should not be modified by the \nuser).\n\n@ivar dimensions: The C{dimensions} dictionary maps the names of \ndimensions defined for the L{Group} or L{Dataset} to instances of the \nL{Dimension} class.\n\n@ivar variables: The C{variables} dictionary maps the names of variables \ndefined for this L{Dataset} or L{Group} to instances of the L{Variable} \nclass.\n\n@ivar groups: The groups dictionary maps the names of groups created for \nthis L{Dataset} or L{Group} to instances of the L{Group} class (the \nL{Dataset} class is simply a special case of the L{Group} class which \ndescribes the root group in the netCDF file).\n\n@ivar cmptypes: The C{cmptypes} dictionary maps the names of \ncompound types defined for the L{Group} or L{Dataset} to instances of the \nL{CompoundType} class.\n\n@ivar vltypes: The C{vltypes} dictionary maps the names of \nvariable-length types defined for the L{Group} or L{Dataset} to instances of the \nL{VLType} class.\n\n@ivar data_model: The C{data_model} attribute describes the netCDF\ndata model version, one of C{NETCDF3_CLASSIC}, C{NETCDF4},\nC{NETCDF4_CLASSIC} or C{NETCDF3_64BIT}. \n\n@ivar file_format: same as C{data_model}, retained for backwards\ncompatibility.\n\n@ivar disk_format: The C{disk_format} attribute describes the underlying\nfile format, one of C{NETCDF3}, C{HDF5}, C{HDF4},\nC{PNETCDF}, C{DAP2}, C{DAP4} or C{UNDEFINED}. Only available if using\nnetcdf C library version >= 4.3.1, otherwise will always return C{UNDEFINED}.\n\n@ivar path: The C{path} attribute shows the location of the L{Group} in\nthe L{Dataset} in a unix directory format (the names of groups in the\nhierarchy separated by backslashes). A L{Dataset} instance is the root\ngroup, so the path is simply C{'/'}.\n\n@ivar parent:  The C{parent} attribute is a reference to the parent\nL{Group} instance. C{None} for a the root group or L{Dataset} instance"), /*tp_doc*/
  __pyx_tp_traverse_7netCDF4_Dataset, /*tp_traverse*/
  __pyx_tp_clear_7netCDF4_Dataset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7netCDF4_Dataset, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7netCDF4_Dataset, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7netCDF4_7Dataset_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7netCDF4_Dataset, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7netCDF4_Group(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_7netCDF4_Dataset(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyMethodDef __pyx_methods_7netCDF4_Group[] = {
  {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_7netCDF4_5Group_3close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_5Group_2close)},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7netCDF4_Group = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("netCDF4.Group"), /*tp_name*/
  sizeof(struct __pyx_obj_7netCDF4_Group), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7netCDF4_Dataset, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_7netCDF4_7Dataset_9__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\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:}\n\nB{C{parent}} - L{Group} instance for the parent group.  If being created\nin the root group, use a L{Dataset} instance.\n\nB{C{name}} - Name of the group.\n\nB{Returns:}\n\na L{Group} instance.  All further operations on the netCDF\nGroup are accomplished via L{Group} instance methods.\n\nL{Group} inherits from L{Dataset}, so all the L{Dataset} class methods and \nvariables are available to a L{Group} instance (except the C{close} \nmethod)."), /*tp_doc*/
  __pyx_tp_traverse_7netCDF4_Dataset, /*tp_traverse*/
  __pyx_tp_clear_7netCDF4_Dataset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7netCDF4_Group, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7netCDF4_5Group_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7netCDF4_Group, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7netCDF4_Dimension(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_7netCDF4_Dimension *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7netCDF4_Dimension *)o);
  p->_data_model = Py_None; Py_INCREF(Py_None);
  p->_name = Py_None; Py_INCREF(Py_None);
  p->_grp = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_7netCDF4_Dimension(PyObject *o) {
  struct __pyx_obj_7netCDF4_Dimension *p = (struct __pyx_obj_7netCDF4_Dimension *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_data_model);
  Py_CLEAR(p->_name);
  Py_CLEAR(p->_grp);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7netCDF4_Dimension(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7netCDF4_Dimension *p = (struct __pyx_obj_7netCDF4_Dimension *)o;
  if (p->_data_model) {
    e = (*v)(p->_data_model, a); if (e) return e;
  }
  if (p->_name) {
    e = (*v)(p->_name, a); if (e) return e;
  }
  if (p->_grp) {
    e = (*v)(p->_grp, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7netCDF4_Dimension(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7netCDF4_Dimension *p = (struct __pyx_obj_7netCDF4_Dimension *)o;
  tmp = ((PyObject*)p->_data_model);
  p->_data_model = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_name);
  p->_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_grp);
  p->_grp = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7netCDF4_9Dimension__dimid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_9Dimension_6_dimid_1__get__(o);
}

static int __pyx_setprop_7netCDF4_9Dimension__dimid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_9Dimension_6_dimid_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7netCDF4_9Dimension__grpid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_9Dimension_6_grpid_1__get__(o);
}

static int __pyx_setprop_7netCDF4_9Dimension__grpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_9Dimension_6_grpid_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7netCDF4_9Dimension__data_model(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_9Dimension_11_data_model_1__get__(o);
}

static int __pyx_setprop_7netCDF4_9Dimension__data_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_9Dimension_11_data_model_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_9Dimension_11_data_model_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_9Dimension__name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_9Dimension_5_name_1__get__(o);
}

static int __pyx_setprop_7netCDF4_9Dimension__name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_9Dimension_5_name_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_9Dimension_5_name_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_9Dimension__grp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_9Dimension_4_grp_1__get__(o);
}

static int __pyx_setprop_7netCDF4_9Dimension__grp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_9Dimension_4_grp_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_9Dimension_4_grp_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_7netCDF4_Dimension[] = {
  {__Pyx_NAMESTR("__unicode__"), (PyCFunction)__pyx_pw_7netCDF4_9Dimension_5__unicode__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("group"), (PyCFunction)__pyx_pw_7netCDF4_9Dimension_9group, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_9Dimension_8group)},
  {__Pyx_NAMESTR("isunlimited"), (PyCFunction)__pyx_pw_7netCDF4_9Dimension_11isunlimited, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_9Dimension_10isunlimited)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7netCDF4_Dimension[] = {
  {(char *)"_dimid", __pyx_getprop_7netCDF4_9Dimension__dimid, __pyx_setprop_7netCDF4_9Dimension__dimid, 0, 0},
  {(char *)"_grpid", __pyx_getprop_7netCDF4_9Dimension__grpid, __pyx_setprop_7netCDF4_9Dimension__grpid, 0, 0},
  {(char *)"_data_model", __pyx_getprop_7netCDF4_9Dimension__data_model, __pyx_setprop_7netCDF4_9Dimension__data_model, 0, 0},
  {(char *)"_name", __pyx_getprop_7netCDF4_9Dimension__name, __pyx_setprop_7netCDF4_9Dimension__name, 0, 0},
  {(char *)"_grp", __pyx_getprop_7netCDF4_9Dimension__grp, __pyx_setprop_7netCDF4_9Dimension__grp, 0, 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_Dimension = {
  __pyx_pw_7netCDF4_9Dimension_7__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Dimension = {
  __pyx_pw_7netCDF4_9Dimension_7__len__, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_7netCDF4_Dimension = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("netCDF4.Dimension"), /*tp_name*/
  sizeof(struct __pyx_obj_7netCDF4_Dimension), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7netCDF4_Dimension, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_Dimension, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Dimension, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7netCDF4_9Dimension_3__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\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 means unlimited. (Default C{None}).\n\nB{Returns:}\n\na L{Dimension} instance.  All further operations on the netCDF Dimension \nare accomplised via L{Dimension} instance methods.\n\nThe current maximum size of a L{Dimension} instance can be obtained by\ncalling the python C{len} function on the L{Dimension} instance. The\nC{isunlimited()} method of a L{Dimension} instance can be used to\ndetermine if the dimension is unlimited"), /*tp_doc*/
  __pyx_tp_traverse_7netCDF4_Dimension, /*tp_traverse*/
  __pyx_tp_clear_7netCDF4_Dimension, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7netCDF4_Dimension, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7netCDF4_Dimension, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7netCDF4_9Dimension_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7netCDF4_Dimension, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7netCDF4_Variable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_7netCDF4_Variable *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7netCDF4_Variable *)o);
  p->_name = Py_None; Py_INCREF(Py_None);
  p->ndim = Py_None; Py_INCREF(Py_None);
  p->dtype = Py_None; Py_INCREF(Py_None);
  p->mask = Py_None; Py_INCREF(Py_None);
  p->scale = Py_None; Py_INCREF(Py_None);
  p->_isprimitive = Py_None; Py_INCREF(Py_None);
  p->_iscompound = Py_None; Py_INCREF(Py_None);
  p->_isvlen = Py_None; Py_INCREF(Py_None);
  p->_grp = Py_None; Py_INCREF(Py_None);
  p->_cmptype = Py_None; Py_INCREF(Py_None);
  p->_vltype = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_7netCDF4_Variable(PyObject *o) {
  struct __pyx_obj_7netCDF4_Variable *p = (struct __pyx_obj_7netCDF4_Variable *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_name);
  Py_CLEAR(p->ndim);
  Py_CLEAR(p->dtype);
  Py_CLEAR(p->mask);
  Py_CLEAR(p->scale);
  Py_CLEAR(p->_isprimitive);
  Py_CLEAR(p->_iscompound);
  Py_CLEAR(p->_isvlen);
  Py_CLEAR(p->_grp);
  Py_CLEAR(p->_cmptype);
  Py_CLEAR(p->_vltype);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7netCDF4_Variable(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7netCDF4_Variable *p = (struct __pyx_obj_7netCDF4_Variable *)o;
  if (p->_name) {
    e = (*v)(p->_name, a); if (e) return e;
  }
  if (p->ndim) {
    e = (*v)(p->ndim, a); if (e) return e;
  }
  if (p->dtype) {
    e = (*v)(p->dtype, a); if (e) return e;
  }
  if (p->mask) {
    e = (*v)(p->mask, a); if (e) return e;
  }
  if (p->scale) {
    e = (*v)(p->scale, a); if (e) return e;
  }
  if (p->_isprimitive) {
    e = (*v)(p->_isprimitive, a); if (e) return e;
  }
  if (p->_iscompound) {
    e = (*v)(p->_iscompound, a); if (e) return e;
  }
  if (p->_isvlen) {
    e = (*v)(p->_isvlen, a); if (e) return e;
  }
  if (p->_grp) {
    e = (*v)(p->_grp, a); if (e) return e;
  }
  if (p->_cmptype) {
    e = (*v)(p->_cmptype, a); if (e) return e;
  }
  if (p->_vltype) {
    e = (*v)(p->_vltype, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7netCDF4_Variable(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7netCDF4_Variable *p = (struct __pyx_obj_7netCDF4_Variable *)o;
  tmp = ((PyObject*)p->_name);
  p->_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->ndim);
  p->ndim = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dtype);
  p->dtype = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->mask);
  p->mask = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->scale);
  p->scale = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_isprimitive);
  p->_isprimitive = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_iscompound);
  p->_iscompound = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_isvlen);
  p->_isvlen = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_grp);
  p->_grp = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cmptype);
  p->_cmptype = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_vltype);
  p->_vltype = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_7netCDF4_Variable(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_7netCDF4_Variable(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_47__setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_tp_getattro_7netCDF4_Variable(PyObject *o, PyObject *n) {
  PyObject *v = PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_7netCDF4_8Variable_37__getattr__(o, n);
  }
  return v;
}

static int __pyx_tp_setattro_7netCDF4_Variable(PyObject *o, PyObject *n, PyObject *v) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_35__setattr__(o, n, v);
  }
  else {
    return __pyx_pw_7netCDF4_8Variable_33__delattr__(o, n);
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable_datatype(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_8datatype_1__get__(o);
}

static PyObject *__pyx_getprop_7netCDF4_8Variable_shape(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_5shape_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable_shape(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_5shape_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_4size_1__get__(o);
}

static PyObject *__pyx_getprop_7netCDF4_8Variable_dimensions(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_10dimensions_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable_dimensions(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_10dimensions_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable__varid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_6_varid_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable__varid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_6_varid_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable__grpid(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_6_grpid_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable__grpid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_6_grpid_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable__nunlimdim(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_10_nunlimdim_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable__nunlimdim(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_10_nunlimdim_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable__name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_5_name_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable__name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_5_name_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_8Variable_5_name_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable_ndim(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_4ndim_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable_ndim(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_4ndim_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_8Variable_4ndim_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable_dtype(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_5dtype_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_5dtype_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_8Variable_5dtype_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable_mask(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_4mask_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable_mask(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_4mask_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_8Variable_4mask_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable_scale(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_5scale_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable_scale(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_5scale_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_8Variable_5scale_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable__isprimitive(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_12_isprimitive_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable__isprimitive(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_12_isprimitive_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_8Variable_12_isprimitive_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable__iscompound(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_11_iscompound_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable__iscompound(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_11_iscompound_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_8Variable_11_iscompound_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable__isvlen(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_7_isvlen_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable__isvlen(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_7_isvlen_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_8Variable_7_isvlen_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable__grp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_4_grp_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable__grp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_4_grp_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_8Variable_4_grp_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable__cmptype(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_8_cmptype_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable__cmptype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_8_cmptype_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_8Variable_8_cmptype_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_8Variable__vltype(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_8Variable_7_vltype_1__get__(o);
}

static int __pyx_setprop_7netCDF4_8Variable__vltype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_8Variable_7_vltype_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_8Variable_7_vltype_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_7netCDF4_Variable[] = {
  {__Pyx_NAMESTR("__array__"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_3__array__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("__unicode__"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_7__unicode__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_getdims"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_9_getdims, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("group"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_11group, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_10group)},
  {__Pyx_NAMESTR("ncattrs"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_13ncattrs, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_12ncattrs)},
  {__Pyx_NAMESTR("setncattr"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_15setncattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_14setncattr)},
  {__Pyx_NAMESTR("setncatts"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_17setncatts, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_16setncatts)},
  {__Pyx_NAMESTR("getncattr"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_19getncattr, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_18getncattr)},
  {__Pyx_NAMESTR("delncattr"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_21delncattr, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_20delncattr)},
  {__Pyx_NAMESTR("filters"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_23filters, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_22filters)},
  {__Pyx_NAMESTR("endian"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_25endian, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_24endian)},
  {__Pyx_NAMESTR("chunking"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_27chunking, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_26chunking)},
  {__Pyx_NAMESTR("get_var_chunk_cache"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_29get_var_chunk_cache, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_28get_var_chunk_cache)},
  {__Pyx_NAMESTR("set_var_chunk_cache"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_31set_var_chunk_cache, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_30set_var_chunk_cache)},
  {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_37__getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("renameAttribute"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_39renameAttribute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_38renameAttribute)},
  {__Pyx_NAMESTR("_toma"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_43_toma, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_assign_vlen"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_45_assign_vlen, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_44_assign_vlen)},
  {__Pyx_NAMESTR("assignValue"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_51assignValue, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_50assignValue)},
  {__Pyx_NAMESTR("getValue"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_53getValue, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_52getValue)},
  {__Pyx_NAMESTR("set_auto_maskandscale"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_55set_auto_maskandscale, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_54set_auto_maskandscale)},
  {__Pyx_NAMESTR("set_auto_scale"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_57set_auto_scale, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_56set_auto_scale)},
  {__Pyx_NAMESTR("set_auto_mask"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_59set_auto_mask, METH_O, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_58set_auto_mask)},
  {__Pyx_NAMESTR("_put"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_61_put, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_60_put)},
  {__Pyx_NAMESTR("_get"), (PyCFunction)__pyx_pw_7netCDF4_8Variable_63_get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7netCDF4_8Variable_62_get)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7netCDF4_Variable[] = {
  {(char *)"datatype", __pyx_getprop_7netCDF4_8Variable_datatype, 0, __Pyx_DOCSTR(__pyx_k_numpy_data_type_for_primitive_da), 0},
  {(char *)"shape", __pyx_getprop_7netCDF4_8Variable_shape, __pyx_setprop_7netCDF4_8Variable_shape, __Pyx_DOCSTR(__pyx_k_find_current_sizes_of_all_variab), 0},
  {(char *)"size", __pyx_getprop_7netCDF4_8Variable_size, 0, __Pyx_DOCSTR(__pyx_k_Return_the_number_of_stored_elem), 0},
  {(char *)"dimensions", __pyx_getprop_7netCDF4_8Variable_dimensions, __pyx_setprop_7netCDF4_8Variable_dimensions, __Pyx_DOCSTR(__pyx_k_get_variables_s_dimension_names), 0},
  {(char *)"_varid", __pyx_getprop_7netCDF4_8Variable__varid, __pyx_setprop_7netCDF4_8Variable__varid, 0, 0},
  {(char *)"_grpid", __pyx_getprop_7netCDF4_8Variable__grpid, __pyx_setprop_7netCDF4_8Variable__grpid, 0, 0},
  {(char *)"_nunlimdim", __pyx_getprop_7netCDF4_8Variable__nunlimdim, __pyx_setprop_7netCDF4_8Variable__nunlimdim, 0, 0},
  {(char *)"_name", __pyx_getprop_7netCDF4_8Variable__name, __pyx_setprop_7netCDF4_8Variable__name, 0, 0},
  {(char *)"ndim", __pyx_getprop_7netCDF4_8Variable_ndim, __pyx_setprop_7netCDF4_8Variable_ndim, 0, 0},
  {(char *)"dtype", __pyx_getprop_7netCDF4_8Variable_dtype, __pyx_setprop_7netCDF4_8Variable_dtype, 0, 0},
  {(char *)"mask", __pyx_getprop_7netCDF4_8Variable_mask, __pyx_setprop_7netCDF4_8Variable_mask, 0, 0},
  {(char *)"scale", __pyx_getprop_7netCDF4_8Variable_scale, __pyx_setprop_7netCDF4_8Variable_scale, 0, 0},
  {(char *)"_isprimitive", __pyx_getprop_7netCDF4_8Variable__isprimitive, __pyx_setprop_7netCDF4_8Variable__isprimitive, 0, 0},
  {(char *)"_iscompound", __pyx_getprop_7netCDF4_8Variable__iscompound, __pyx_setprop_7netCDF4_8Variable__iscompound, 0, 0},
  {(char *)"_isvlen", __pyx_getprop_7netCDF4_8Variable__isvlen, __pyx_setprop_7netCDF4_8Variable__isvlen, 0, 0},
  {(char *)"_grp", __pyx_getprop_7netCDF4_8Variable__grp, __pyx_setprop_7netCDF4_8Variable__grp, 0, 0},
  {(char *)"_cmptype", __pyx_getprop_7netCDF4_8Variable__cmptype, __pyx_setprop_7netCDF4_8Variable__cmptype, 0, 0},
  {(char *)"_vltype", __pyx_getprop_7netCDF4_8Variable__vltype, __pyx_setprop_7netCDF4_8Variable__vltype, 0, 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_Variable = {
  __pyx_pw_7netCDF4_8Variable_49__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_7netCDF4_Variable, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Variable = {
  __pyx_pw_7netCDF4_8Variable_49__len__, /*mp_length*/
  __pyx_pw_7netCDF4_8Variable_41__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_7netCDF4_Variable, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_7netCDF4_Variable = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("netCDF4.Variable"), /*tp_name*/
  sizeof(struct __pyx_obj_7netCDF4_Variable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7netCDF4_Variable, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*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*/
  __pyx_pw_7netCDF4_8Variable_5__str__, /*tp_str*/
  __pyx_tp_getattro_7netCDF4_Variable, /*tp_getattro*/
  __pyx_tp_setattro_7netCDF4_Variable, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\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.\n\nB{Parameters:}\n\nB{C{group}} - L{Group} or L{Dataset} instance to associate with variable.\n\nB{C{name}}  - Name of the variable.\n\nB{C{datatype}} - L{Variable} data type. Can be specified by providing a \nnumpy dtype object, or a string that describes a numpy dtype object. \nSupported values, corresponding to C{str} attribute of numpy dtype \nobjects, include C{'f4'} (32-bit floating point), C{'f8'} (64-bit floating \npoint), C{'i4'} (32-bit signed integer), C{'i2'} (16-bit signed integer), \nC{'i8'} (64-bit singed integer), C{'i4'} (8-bit singed integer), C{'i1'} \n(8-bit signed integer), C{'u1'} (8-bit unsigned integer), C{'u2'} (16-bit \nunsigned integer), C{'u4'} (32-bit unsigned integer), C{'u8'} (64-bit \nunsigned integer), or C{'S1'} (single-character string).  From \ncompatibility with Scientific.IO.NetCDF, the old Numeric single character \ntypecodes can also be used (C{'f'} instead of C{'f4'}, C{'d'} instead of \nC{'f8'}, C{'h'} or C{'s'} instead of C{'i2'}, C{'b'} or C{'B'} instead of \nC{'i1'}, C{'c'} instead of C{'S1'}, and C{'i'} or C{'l'} instead of \nC{'i4'}). C{datatype} can also be a L{CompoundType} instance\n(for a structured, or compound array), a L{VLType} instance\n(for a variable-length array), or the python C{str} builtin \n(for a variable-length string array). Numpy string and unicode datatypes with\nlength greater than one are aliases for C{str}.\n\nB{Keywords:}\n\nB{C{dimensions}} - a tuple containing the variable's dimension names \n(defined previously with C{createDimension}). Default is an empty tuple \nwhich means the variable is a scalar (and therefore has no dimensions).\n\nB{C{zlib}} - if C{True}, data assigned to the L{Variable}  \ninstance is compressed on disk. Default C{False}.\n\nB{C{complevel}} - the level of zlib compression to use (1 is the fastest, \nbut poorest compression, 9 is the slowest but best compression). Default 4.\nIgnored if C{zlib=False}. \n\nB{C{shuffle}} - if C{True}, the HDF5 shuffle filter is applied \nto improve compression. Default C{True}. Ignored if C{zlib=False}.\n\nB{C{fletcher32}} - if C{True} (default C{False}), the Fletcher32 checksum \nalgorithm is used for error detection.\n\nB{C{contiguous}} - if C{True} (default C{False}), the variable data is\nstored contiguously on disk.  Default C{False}. Setting to C{True} for\na variable with an unlimited dimension will trigger an error.\n\nB{C{chunksizes}} - Can be used to specify the HDF5 chunksizes for each\ndimension of the variable. A detailed discussion of HDF chunking and I/O\nperformance is available U{here\n<http://www.hdfgroup.org/HDF5/doc/H5.user/Chunking.html>}. \nBasically, you want the chunk size for each dimension to match as\nclosely as possible the size of the data block that users will read\nfrom the file. C{chunksizes} cannot be set if C{contiguous=True}.\n\nB{C{endian}} - Can be used to control whether the\ndata is stored in little or big endian format on disk. Possible\nvalues are C{little, big} or C{native} (default). The library\nwill automatically handle endian conversions when the data is read,\nbut if the data is always going to be read on a computer with the\nopposite format as the one used to create the file, there may be\nsome performance advantage to be gained by setting the endian-ness.\nFor netCDF 3 files (that don't use HDF5), only C{endian='native'} is allowed.\n\nThe C{zlib, complevel, shuffle, fletcher32, contiguous} and {chunksizes}\nkeywords are silently ignored for netCDF 3 files that do not use HDF5.\n\nB{C{least_significant_digit}} - If specified, variable data will be\ntruncated (quantized). In conjunction with C{zlib=True} this produces\n'lossy', but significantly more efficient compression. For example, if\nC{least_significant_digit=1}, data will be quantized using\naround(scale*data)/scale, where scale = 2**bits, and bits is determined\nso that a precision of 0.1 is retained (in this case bits=4). Default is\nC{None}, or no quantization.\n\nB{C{fill_value}} - If specified, the default netCDF C{_FillValue} (the \nvalue that the variable gets filled with before any data is written to it) \nis replaced with this value.  If fill_value is set to C{False}, then\nthe variable is not pre-filled. The default netCDF fill values can be found\nin netCDF4.default_fillvals.\n \nB{Returns:}\n\na L{Variable} instance.  All further operations on the netCDF Variable are \naccomplised via L{Variable} instance methods.\n\nA list of attribute names corresponding to netCDF attributes defined for\nthe variable can be obtained with the C{ncattrs()} method. These\nattributes can be created by assigning to an attribute of the\nL{Variable} instance. A dictionary containing all the netCDF attribute\nname/value pairs is provided by the C{__dict__} attribute of a\nL{Variable} instance.\n\nThe instance variables C{dimensions, dtype, ndim, shape}\nand C{least_significant_digit} are read-only (and \nshould not be modified by the user).\n\n@ivar dimensions: A tuple containing the names of the dimensions \nassociated with this variable.\n\n@ivar dtype: A numpy dtype object describing the variable's data type.\n\n@ivar ndim: The number of variable dimensions.\n\n@ivar shape: a tuple describing the current size of all the variable's \ndimensions.\n\n@ivar scale:  if True, C{scale_factor} and C{add_offset} are automatically\napplied. Default is C{True}, can be reset using L{set_auto_scale} and\nL{set_auto_maskandscale} methods.\n\n@ivar mask:  if True, data is automatically converted to/from masked arrays\nwhen missing values or fill values are present. Default is C{True}, can be\nreset using L{set_auto_mask} and L{set_auto_maskandscale} methods.\n\n@ivar least_significant_digit: Describes the power of ten of the smallest\ndecimal place in the data the contains a reliable value.  Data is \ntruncated to this decimal place when it is assigned to the L{Variable} \ninstance. If C{None}, the data is not truncated. "), /*tp_doc*/
  __pyx_tp_traverse_7netCDF4_Variable, /*tp_traverse*/
  __pyx_tp_clear_7netCDF4_Variable, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7netCDF4_Variable, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7netCDF4_Variable, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7netCDF4_8Variable_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7netCDF4_Variable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7netCDF4_CompoundType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_7netCDF4_CompoundType *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7netCDF4_CompoundType *)o);
  p->dtype = Py_None; Py_INCREF(Py_None);
  p->name = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_7netCDF4_CompoundType(PyObject *o) {
  struct __pyx_obj_7netCDF4_CompoundType *p = (struct __pyx_obj_7netCDF4_CompoundType *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->dtype);
  Py_CLEAR(p->name);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7netCDF4_CompoundType(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7netCDF4_CompoundType *p = (struct __pyx_obj_7netCDF4_CompoundType *)o;
  if (p->dtype) {
    e = (*v)(p->dtype, a); if (e) return e;
  }
  if (p->name) {
    e = (*v)(p->name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7netCDF4_CompoundType(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7netCDF4_CompoundType *p = (struct __pyx_obj_7netCDF4_CompoundType *)o;
  tmp = ((PyObject*)p->dtype);
  p->dtype = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7netCDF4_12CompoundType__nc_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_12CompoundType_8_nc_type_1__get__(o);
}

static int __pyx_setprop_7netCDF4_12CompoundType__nc_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_12CompoundType_8_nc_type_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7netCDF4_12CompoundType_dtype(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_12CompoundType_5dtype_1__get__(o);
}

static int __pyx_setprop_7netCDF4_12CompoundType_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_12CompoundType_5dtype_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_12CompoundType_5dtype_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_12CompoundType_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_12CompoundType_4name_1__get__(o);
}

static int __pyx_setprop_7netCDF4_12CompoundType_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_12CompoundType_4name_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_12CompoundType_4name_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_7netCDF4_CompoundType[] = {
  {__Pyx_NAMESTR("__unicode__"), (PyCFunction)__pyx_pw_7netCDF4_12CompoundType_5__unicode__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7netCDF4_CompoundType[] = {
  {(char *)"_nc_type", __pyx_getprop_7netCDF4_12CompoundType__nc_type, __pyx_setprop_7netCDF4_12CompoundType__nc_type, 0, 0},
  {(char *)"dtype", __pyx_getprop_7netCDF4_12CompoundType_dtype, __pyx_setprop_7netCDF4_12CompoundType_dtype, 0, 0},
  {(char *)"name", __pyx_getprop_7netCDF4_12CompoundType_name, __pyx_setprop_7netCDF4_12CompoundType_name, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7netCDF4_CompoundType = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("netCDF4.CompoundType"), /*tp_name*/
  sizeof(struct __pyx_obj_7netCDF4_CompoundType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7netCDF4_CompoundType, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7netCDF4_12CompoundType_3__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\nA L{CompoundType} instance is used to describe a compound data type.\n\nConstructor: C{CompoundType(group, datatype, datatype_name)}\n\n@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{Group} instance, not using this class directly.\n\nB{Parameters:}\n\nB{C{group}} - L{Group} instance to associate with the compound datatype.\n\nB{C{datatype}} - A numpy dtype object describing a structured (a.k.a record)\narray.  Can be composed of homogeneous numeric or character data types, or \nother structured array data types. \n\nB{C{datatype_name}} - a Python string containing a description of the \ncompound data type.\n\nB{Returns:}\n\na L{CompoundType} instance, which can be passed to the C{createVariable} \nmethod of a L{Dataset} or L{Group} instance.\n\nThe instance variables C{dtype} and C{name} should not be modified by\nthe user.\n\n@ivar dtype: A numpy dtype object describing the compound data type.\n\n@ivar name: A python string describing the compound type.\n"), /*tp_doc*/
  __pyx_tp_traverse_7netCDF4_CompoundType, /*tp_traverse*/
  __pyx_tp_clear_7netCDF4_CompoundType, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7netCDF4_CompoundType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7netCDF4_CompoundType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7netCDF4_12CompoundType_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7netCDF4_CompoundType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_7netCDF4_VLType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_7netCDF4_VLType *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_7netCDF4_VLType *)o);
  p->dtype = Py_None; Py_INCREF(Py_None);
  p->name = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_7netCDF4_VLType(PyObject *o) {
  struct __pyx_obj_7netCDF4_VLType *p = (struct __pyx_obj_7netCDF4_VLType *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->dtype);
  Py_CLEAR(p->name);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7netCDF4_VLType(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7netCDF4_VLType *p = (struct __pyx_obj_7netCDF4_VLType *)o;
  if (p->dtype) {
    e = (*v)(p->dtype, a); if (e) return e;
  }
  if (p->name) {
    e = (*v)(p->name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7netCDF4_VLType(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7netCDF4_VLType *p = (struct __pyx_obj_7netCDF4_VLType *)o;
  tmp = ((PyObject*)p->dtype);
  p->dtype = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7netCDF4_6VLType__nc_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_6VLType_8_nc_type_1__get__(o);
}

static int __pyx_setprop_7netCDF4_6VLType__nc_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_6VLType_8_nc_type_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_7netCDF4_6VLType_dtype(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_6VLType_5dtype_1__get__(o);
}

static int __pyx_setprop_7netCDF4_6VLType_dtype(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_6VLType_5dtype_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_6VLType_5dtype_5__del__(o);
  }
}

static PyObject *__pyx_getprop_7netCDF4_6VLType_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7netCDF4_6VLType_4name_1__get__(o);
}

static int __pyx_setprop_7netCDF4_6VLType_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_7netCDF4_6VLType_4name_3__set__(o, v);
  }
  else {
    return __pyx_pw_7netCDF4_6VLType_4name_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_7netCDF4_VLType[] = {
  {__Pyx_NAMESTR("__unicode__"), (PyCFunction)__pyx_pw_7netCDF4_6VLType_5__unicode__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7netCDF4_VLType[] = {
  {(char *)"_nc_type", __pyx_getprop_7netCDF4_6VLType__nc_type, __pyx_setprop_7netCDF4_6VLType__nc_type, 0, 0},
  {(char *)"dtype", __pyx_getprop_7netCDF4_6VLType_dtype, __pyx_setprop_7netCDF4_6VLType_dtype, 0, 0},
  {(char *)"name", __pyx_getprop_7netCDF4_6VLType_name, __pyx_setprop_7netCDF4_6VLType_name, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7netCDF4_VLType = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("netCDF4.VLType"), /*tp_name*/
  sizeof(struct __pyx_obj_7netCDF4_VLType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7netCDF4_VLType, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_7netCDF4_6VLType_3__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\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 array.  \n\nB{C{datatype_name}} - a Python string containing a description of the \nVLEN data type.\n\nB{Returns:}\n\na L{VLType} instance, which can be passed to the C{createVariable} \nmethod of a L{Dataset} or L{Group} instance.\n\nThe instance variables C{dtype} and C{name} should not be modified by\nthe user.\n\n@ivar dtype: An object describing the VLEN type.\n\n@ivar name: A python string describing the VLEN type.\n"), /*tp_doc*/
  __pyx_tp_traverse_7netCDF4_VLType, /*tp_traverse*/
  __pyx_tp_clear_7netCDF4_VLType, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7netCDF4_VLType, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7netCDF4_VLType, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_7netCDF4_6VLType_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7netCDF4_VLType, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
  #if PY_VERSION_HEX < 0x03020000
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  #else
    PyModuleDef_HEAD_INIT,
  #endif
    __Pyx_NAMESTR("netCDF4"),
    __Pyx_DOCSTR(__pyx_k_Introduction_Python_interface_t), /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 1},
  {&__pyx_kp_s_0m, __pyx_k_0m, sizeof(__pyx_k_0m), 0, 0, 1, 0},
  {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
  {&__pyx_kp_s_1_1_1, __pyx_k_1_1_1, sizeof(__pyx_k_1_1_1), 0, 0, 1, 0},
  {&__pyx_kp_s_4_2_1, __pyx_k_4_2_1, sizeof(__pyx_k_4_2_1), 0, 0, 1, 0},
  {&__pyx_kp_s_4m, __pyx_k_4m, sizeof(__pyx_k_4m), 0, 0, 1, 0},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s_Dimension, __pyx_k_Dimension, sizeof(__pyx_k_Dimension), 0, 0, 1, 1},
  {&__pyx_n_s_Dimension___init, __pyx_k_Dimension___init, sizeof(__pyx_k_Dimension___init), 0, 0, 1, 1},
  {&__pyx_n_s_Dimension___len, __pyx_k_Dimension___len, sizeof(__pyx_k_Dimension___len), 0, 0, 1, 1},
  {&__pyx_n_s_Dimension___str, __pyx_k_Dimension___str, sizeof(__pyx_k_Dimension___str), 0, 0, 1, 1},
  {&__pyx_n_s_Dimension_isunlimited, __pyx_k_Dimension_isunlimited, sizeof(__pyx_k_Dimension_isunlimited), 0, 0, 1, 1},
  {&__pyx_kp_s_Dimension_object_no_longer_valid, __pyx_k_Dimension_object_no_longer_valid, sizeof(__pyx_k_Dimension_object_no_longer_valid), 0, 0, 1, 0},
  {&__pyx_n_s_FillValue, __pyx_k_FillValue, sizeof(__pyx_k_FillValue), 0, 0, 1, 1},
  {&__pyx_kp_s_FillValue_attribute_must_be_set, __pyx_k_FillValue_attribute_must_be_set, sizeof(__pyx_k_FillValue_attribute_must_be_set), 0, 0, 1, 0},
  {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
  {&__pyx_kp_s_Illegal_index, __pyx_k_Illegal_index, sizeof(__pyx_k_Illegal_index), 0, 0, 1, 0},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_n_s_MFDataset, __pyx_k_MFDataset, sizeof(__pyx_k_MFDataset), 0, 0, 1, 1},
  {&__pyx_n_s_MFDataset___getattribute, __pyx_k_MFDataset___getattribute, sizeof(__pyx_k_MFDataset___getattribute), 0, 0, 1, 1},
  {&__pyx_n_s_MFDataset___init, __pyx_k_MFDataset___init, sizeof(__pyx_k_MFDataset___init), 0, 0, 1, 1},
  {&__pyx_n_s_MFDataset___setattr, __pyx_k_MFDataset___setattr, sizeof(__pyx_k_MFDataset___setattr), 0, 0, 1, 1},
  {&__pyx_n_s_MFDataset___str, __pyx_k_MFDataset___str, sizeof(__pyx_k_MFDataset___str), 0, 0, 1, 1},
  {&__pyx_n_s_MFDataset_close, __pyx_k_MFDataset_close, sizeof(__pyx_k_MFDataset_close), 0, 0, 1, 1},
  {&__pyx_n_s_MFDataset_ncattrs, __pyx_k_MFDataset_ncattrs, sizeof(__pyx_k_MFDataset_ncattrs), 0, 0, 1, 1},
  {&__pyx_kp_s_MFDataset_self_files_check_Fals, __pyx_k_MFDataset_self_files_check_Fals, sizeof(__pyx_k_MFDataset_self_files_check_Fals), 0, 0, 1, 0},
  {&__pyx_kp_s_MFNetCDF4_only_works_with_NETCDF, __pyx_k_MFNetCDF4_only_works_with_NETCDF, sizeof(__pyx_k_MFNetCDF4_only_works_with_NETCDF), 0, 0, 1, 0},
  {&__pyx_n_s_MFTime, __pyx_k_MFTime, sizeof(__pyx_k_MFTime), 0, 0, 1, 1},
  {&__pyx_n_s_MFTime___getitem, __pyx_k_MFTime___getitem, sizeof(__pyx_k_MFTime___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_MFTime___init, __pyx_k_MFTime___init, sizeof(__pyx_k_MFTime___init), 0, 0, 1, 1},
  {&__pyx_n_s_MFTime__delta, __pyx_k_MFTime__delta, sizeof(__pyx_k_MFTime__delta), 0, 0, 1, 1},
  {&__pyx_n_s_MFTime__time, __pyx_k_MFTime__time, sizeof(__pyx_k_MFTime__time), 0, 0, 1, 1},
  {&__pyx_kp_s_MFTime_requires_that_the_same_ti, __pyx_k_MFTime_requires_that_the_same_ti, sizeof(__pyx_k_MFTime_requires_that_the_same_ti), 0, 0, 1, 0},
  {&__pyx_kp_s_MFTime_requires_that_the_time_va, __pyx_k_MFTime_requires_that_the_time_va, sizeof(__pyx_k_MFTime_requires_that_the_time_va), 0, 0, 1, 0},
  {&__pyx_kp_s_MFTime_self_time_units_None_Cla, __pyx_k_MFTime_self_time_units_None_Cla, sizeof(__pyx_k_MFTime_self_time_units_None_Cla), 0, 0, 1, 0},
  {&__pyx_n_s_NC_DISKLESS, __pyx_k_NC_DISKLESS, sizeof(__pyx_k_NC_DISKLESS), 0, 0, 1, 1},
  {&__pyx_n_s_NETCDF3, __pyx_k_NETCDF3, sizeof(__pyx_k_NETCDF3), 0, 0, 1, 1},
  {&__pyx_n_s_NETCDF3_64BIT, __pyx_k_NETCDF3_64BIT, sizeof(__pyx_k_NETCDF3_64BIT), 0, 0, 1, 1},
  {&__pyx_n_s_NETCDF3_CLASSIC, __pyx_k_NETCDF3_CLASSIC, sizeof(__pyx_k_NETCDF3_CLASSIC), 0, 0, 1, 1},
  {&__pyx_n_s_NETCDF4, __pyx_k_NETCDF4, sizeof(__pyx_k_NETCDF4), 0, 0, 1, 1},
  {&__pyx_n_s_NETCDF4_CLASSIC, __pyx_k_NETCDF4_CLASSIC, sizeof(__pyx_k_NETCDF4_CLASSIC), 0, 0, 1, 1},
  {&__pyx_n_s_NUMCHARS, __pyx_k_NUMCHARS, sizeof(__pyx_k_NUMCHARS), 0, 0, 1, 1},
  {&__pyx_n_s_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 1, 1},
  {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 1, 1},
  {&__pyx_n_s_S1, __pyx_k_S1, sizeof(__pyx_k_S1), 0, 0, 1, 1},
  {&__pyx_n_s_StartCountStride, __pyx_k_StartCountStride, sizeof(__pyx_k_StartCountStride), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_U, __pyx_k_U, sizeof(__pyx_k_U), 0, 0, 1, 1},
  {&__pyx_n_s_U1, __pyx_k_U1, sizeof(__pyx_k_U1), 0, 0, 1, 1},
  {&__pyx_n_s_UNDEFINED, __pyx_k_UNDEFINED, sizeof(__pyx_k_UNDEFINED), 0, 0, 1, 1},
  {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1},
  {&__pyx_kp_s_Unsupported_compound_type_elemen, __pyx_k_Unsupported_compound_type_elemen, sizeof(__pyx_k_Unsupported_compound_type_elemen), 0, 0, 1, 0},
  {&__pyx_n_s_V, __pyx_k_V, sizeof(__pyx_k_V), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_Variable, __pyx_k_Variable, sizeof(__pyx_k_Variable), 0, 0, 1, 1},
  {&__pyx_n_s_Variable___getattr, __pyx_k_Variable___getattr, sizeof(__pyx_k_Variable___getattr), 0, 0, 1, 1},
  {&__pyx_n_s_Variable___getitem, __pyx_k_Variable___getitem, sizeof(__pyx_k_Variable___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_Variable___init, __pyx_k_Variable___init, sizeof(__pyx_k_Variable___init), 0, 0, 1, 1},
  {&__pyx_n_s_Variable___len, __pyx_k_Variable___len, sizeof(__pyx_k_Variable___len), 0, 0, 1, 1},
  {&__pyx_n_s_Variable___str, __pyx_k_Variable___str, sizeof(__pyx_k_Variable___str), 0, 0, 1, 1},
  {&__pyx_n_s_Variable__shape, __pyx_k_Variable__shape, sizeof(__pyx_k_Variable__shape), 0, 0, 1, 1},
  {&__pyx_kp_s_Variable_length_strings_are_only, __pyx_k_Variable_length_strings_are_only, sizeof(__pyx_k_Variable_length_strings_are_only), 0, 0, 1, 0},
  {&__pyx_n_s_Variable_ncattrs, __pyx_k_Variable_ncattrs, sizeof(__pyx_k_Variable_ncattrs), 0, 0, 1, 1},
  {&__pyx_kp_s_Variable_object_no_longer_valid, __pyx_k_Variable_object_no_longer_valid, sizeof(__pyx_k_Variable_object_no_longer_valid), 0, 0, 1, 0},
  {&__pyx_n_s_Variable_set_auto_maskandscale, __pyx_k_Variable_set_auto_maskandscale, sizeof(__pyx_k_Variable_set_auto_maskandscale), 0, 0, 1, 1},
  {&__pyx_n_s_Variable_typecode, __pyx_k_Variable_typecode, sizeof(__pyx_k_Variable_typecode), 0, 0, 1, 1},
  {&__pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_k_Volumes_DataCaddy_python_netcdf, sizeof(__pyx_k_Volumes_DataCaddy_python_netcdf), 0, 0, 1, 0},
  {&__pyx_kp_s_Volumes_DataCaddy_python_netcdf_2, __pyx_k_Volumes_DataCaddy_python_netcdf_2, sizeof(__pyx_k_Volumes_DataCaddy_python_netcdf_2), 0, 0, 1, 0},
  {&__pyx_kp_s__110, __pyx_k__110, sizeof(__pyx_k__110), 0, 0, 1, 0},
  {&__pyx_kp_s__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 0, 1, 0},
  {&__pyx_kp_s__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 0},
  {&__pyx_kp_s__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 0, 1, 0},
  {&__pyx_kp_s__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 0, 1, 0},
  {&__pyx_kp_s__38, __pyx_k__38, sizeof(__pyx_k__38), 0, 0, 1, 0},
  {&__pyx_kp_s__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 0, 1, 0},
  {&__pyx_kp_s__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 0, 1, 0},
  {&__pyx_kp_s__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 0, 1, 0},
  {&__pyx_n_s__44, __pyx_k__44, sizeof(__pyx_k__44), 0, 0, 1, 1},
  {&__pyx_kp_s__49, __pyx_k__49, sizeof(__pyx_k__49), 0, 0, 1, 0},
  {&__pyx_kp_s__50, __pyx_k__50, sizeof(__pyx_k__50), 0, 0, 1, 0},
  {&__pyx_kp_s__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 0, 1, 0},
  {&__pyx_kp_s__52, __pyx_k__52, sizeof(__pyx_k__52), 0, 0, 1, 0},
  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
  {&__pyx_n_s_add_offset, __pyx_k_add_offset, sizeof(__pyx_k_add_offset), 0, 0, 1, 1},
  {&__pyx_n_s_aggDimId, __pyx_k_aggDimId, sizeof(__pyx_k_aggDimId), 0, 0, 1, 1},
  {&__pyx_n_s_aggDimName, __pyx_k_aggDimName, sizeof(__pyx_k_aggDimName), 0, 0, 1, 1},
  {&__pyx_n_s_aggdim, __pyx_k_aggdim, sizeof(__pyx_k_aggdim), 0, 0, 1, 1},
  {&__pyx_kp_s_aggregation_variable_s_not_defin, __pyx_k_aggregation_variable_s_not_defin, sizeof(__pyx_k_aggregation_variable_s_not_defin), 0, 0, 1, 0},
  {&__pyx_n_s_align, __pyx_k_align, sizeof(__pyx_k_align), 0, 0, 1, 1},
  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  {&__pyx_n_s_any, __pyx_k_any, sizeof(__pyx_k_any), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_around, __pyx_k_around, sizeof(__pyx_k_around), 0, 0, 1, 1},
  {&__pyx_n_s_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 0, 0, 1, 1},
  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
  {&__pyx_n_s_as, __pyx_k_as, sizeof(__pyx_k_as), 0, 0, 1, 1},
  {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
  {&__pyx_n_s_assign_vlen, __pyx_k_assign_vlen, sizeof(__pyx_k_assign_vlen), 0, 0, 1, 1},
  {&__pyx_kp_s_assign_vlen_method_only_for_use, __pyx_k_assign_vlen_method_only_for_use, sizeof(__pyx_k_assign_vlen_method_only_for_use), 0, 0, 1, 0},
  {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
  {&__pyx_kp_s_attribute_s_has_unsupported_data, __pyx_k_attribute_s_has_unsupported_data, sizeof(__pyx_k_attribute_s_has_unsupported_data), 0, 0, 1, 0},
  {&__pyx_n_s_attrs, __pyx_k_attrs, sizeof(__pyx_k_attrs), 0, 0, 1, 1},
  {&__pyx_n_s_atype, __pyx_k_atype, sizeof(__pyx_k_atype), 0, 0, 1, 1},
  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
  {&__pyx_n_s_basedate, __pyx_k_basedate, sizeof(__pyx_k_basedate), 0, 0, 1, 1},
  {&__pyx_n_s_big, __pyx_k_big, sizeof(__pyx_k_big), 0, 0, 1, 1},
  {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1},
  {&__pyx_n_s_bs, __pyx_k_bs, sizeof(__pyx_k_bs), 0, 0, 1, 1},
  {&__pyx_n_s_byteorder, __pyx_k_byteorder, sizeof(__pyx_k_byteorder), 0, 0, 1, 1},
  {&__pyx_n_s_byteswap, __pyx_k_byteswap, sizeof(__pyx_k_byteswap), 0, 0, 1, 1},
  {&__pyx_n_s_calendar, __pyx_k_calendar, sizeof(__pyx_k_calendar), 0, 0, 1, 1},
  {&__pyx_kp_s_cannot_assign_fill_value_for_mas, __pyx_k_cannot_assign_fill_value_for_mas, sizeof(__pyx_k_cannot_assign_fill_value_for_mas), 0, 0, 1, 0},
  {&__pyx_kp_s_cannot_close_a_L_Group_only_appl, __pyx_k_cannot_close_a_L_Group_only_appl, sizeof(__pyx_k_cannot_close_a_L_Group_only_appl), 0, 0, 1, 0},
  {&__pyx_kp_s_cannot_find_compound_type_in_thi, __pyx_k_cannot_find_compound_type_in_thi, sizeof(__pyx_k_cannot_find_compound_type_in_thi), 0, 0, 1, 0},
  {&__pyx_kp_s_cannot_set__FillValue_attribute, __pyx_k_cannot_set__FillValue_attribute, sizeof(__pyx_k_cannot_set__FillValue_attribute), 0, 0, 1, 0},
  {&__pyx_kp_s_cannot_specify_chunksizes_for_a, __pyx_k_cannot_specify_chunksizes_for_a, sizeof(__pyx_k_cannot_specify_chunksizes_for_a), 0, 0, 1, 0},
  {&__pyx_kp_s_cannot_using_file_globbing_for_r, __pyx_k_cannot_using_file_globbing_for_r, sizeof(__pyx_k_cannot_using_file_globbing_for_r), 0, 0, 1, 0},
  {&__pyx_n_s_cdf, __pyx_k_cdf, sizeof(__pyx_k_cdf), 0, 0, 1, 1},
  {&__pyx_n_s_cdfRecVar, __pyx_k_cdfRecVar, sizeof(__pyx_k_cdfRecVar), 0, 0, 1, 1},
  {&__pyx_n_s_cdfRecVar_2, __pyx_k_cdfRecVar_2, sizeof(__pyx_k_cdfRecVar_2), 0, 0, 1, 1},
  {&__pyx_n_s_cdfTLen, __pyx_k_cdfTLen, sizeof(__pyx_k_cdfTLen), 0, 0, 1, 1},
  {&__pyx_n_s_cdfVLen, __pyx_k_cdfVLen, sizeof(__pyx_k_cdfVLen), 0, 0, 1, 1},
  {&__pyx_n_s_cdfVLen_2, __pyx_k_cdfVLen_2, sizeof(__pyx_k_cdfVLen_2), 0, 0, 1, 1},
  {&__pyx_n_s_cdf_2, __pyx_k_cdf_2, sizeof(__pyx_k_cdf_2), 0, 0, 1, 1},
  {&__pyx_n_s_cdfm, __pyx_k_cdfm, sizeof(__pyx_k_cdfm), 0, 0, 1, 1},
  {&__pyx_n_s_cdftime, __pyx_k_cdftime, sizeof(__pyx_k_cdftime), 0, 0, 1, 1},
  {&__pyx_n_s_char, __pyx_k_char, sizeof(__pyx_k_char), 0, 0, 1, 1},
  {&__pyx_n_s_chartostring, __pyx_k_chartostring, sizeof(__pyx_k_chartostring), 0, 0, 1, 1},
  {&__pyx_n_s_check, __pyx_k_check, sizeof(__pyx_k_check), 0, 0, 1, 1},
  {&__pyx_n_s_chunk_cache, __pyx_k_chunk_cache, sizeof(__pyx_k_chunk_cache), 0, 0, 1, 1},
  {&__pyx_n_s_chunksizes, __pyx_k_chunksizes, sizeof(__pyx_k_chunksizes), 0, 0, 1, 1},
  {&__pyx_kp_s_chunksizes_must_be_a_sequence_wi, __pyx_k_chunksizes_must_be_a_sequence_wi, sizeof(__pyx_k_chunksizes_must_be_a_sequence_wi), 0, 0, 1, 0},
  {&__pyx_n_s_clobber, __pyx_k_clobber, sizeof(__pyx_k_clobber), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_cmptype, __pyx_k_cmptype, sizeof(__pyx_k_cmptype), 0, 0, 1, 1},
  {&__pyx_n_s_cmptypes, __pyx_k_cmptypes, sizeof(__pyx_k_cmptypes), 0, 0, 1, 1},
  {&__pyx_n_s_cnt, __pyx_k_cnt, sizeof(__pyx_k_cnt), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_complevel, __pyx_k_complevel, sizeof(__pyx_k_complevel), 0, 0, 1, 1},
  {&__pyx_n_s_compound, __pyx_k_compound, sizeof(__pyx_k_compound), 0, 0, 1, 1},
  {&__pyx_kp_s_compound_data_type_s, __pyx_k_compound_data_type_s, sizeof(__pyx_k_compound_data_type_s), 0, 0, 1, 0},
  {&__pyx_kp_s_compound_field_of_an_unsupported, __pyx_k_compound_field_of_an_unsupported, sizeof(__pyx_k_compound_field_of_an_unsupported), 0, 0, 1, 0},
  {&__pyx_n_s_concatenate, __pyx_k_concatenate, sizeof(__pyx_k_concatenate), 0, 0, 1, 1},
  {&__pyx_n_s_contiguous, __pyx_k_contiguous, sizeof(__pyx_k_contiguous), 0, 0, 1, 1},
  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
  {&__pyx_kp_s_created_using_fill_value_keyword, __pyx_k_created_using_fill_value_keyword, sizeof(__pyx_k_created_using_fill_value_keyword), 0, 0, 1, 0},
  {&__pyx_kp_s_current_shape_s, __pyx_k_current_shape_s, sizeof(__pyx_k_current_shape_s), 0, 0, 1, 0},
  {&__pyx_kp_s_current_size_s, __pyx_k_current_size_s, sizeof(__pyx_k_current_size_s), 0, 0, 1, 0},
  {&__pyx_kp_s_d_d_d, __pyx_k_d_d_d, sizeof(__pyx_k_d_d_d), 0, 0, 1, 0},
  {&__pyx_kp_s_d_d_d_s, __pyx_k_d_d_d_s, sizeof(__pyx_k_d_d_d_s), 0, 0, 1, 0},
  {&__pyx_n_s_dat, __pyx_k_dat, sizeof(__pyx_k_dat), 0, 0, 1, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_data_model, __pyx_k_data_model, sizeof(__pyx_k_data_model), 0, 0, 1, 1},
  {&__pyx_kp_s_data_to_put_in_string_variable_m, __pyx_k_data_to_put_in_string_variable_m, sizeof(__pyx_k_data_to_put_in_string_variable_m), 0, 0, 1, 0},
  {&__pyx_n_s_datashape, __pyx_k_datashape, sizeof(__pyx_k_datashape), 0, 0, 1, 1},
  {&__pyx_n_s_datatype, __pyx_k_datatype, sizeof(__pyx_k_datatype), 0, 0, 1, 1},
  {&__pyx_n_s_datatype_name, __pyx_k_datatype_name, sizeof(__pyx_k_datatype_name), 0, 0, 1, 1},
  {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
  {&__pyx_n_s_date2index, __pyx_k_date2index, sizeof(__pyx_k_date2index), 0, 0, 1, 1},
  {&__pyx_n_s_date2num, __pyx_k_date2num, sizeof(__pyx_k_date2num), 0, 0, 1, 1},
  {&__pyx_n_s_dateparse, __pyx_k_dateparse, sizeof(__pyx_k_dateparse), 0, 0, 1, 1},
  {&__pyx_n_s_dates, __pyx_k_dates, sizeof(__pyx_k_dates), 0, 0, 1, 1},
  {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
  {&__pyx_kp_s_dateutil_module_required_for_acc, __pyx_k_dateutil_module_required_for_acc, sizeof(__pyx_k_dateutil_module_required_for_acc), 0, 0, 1, 0},
  {&__pyx_n_s_dateutil_parser, __pyx_k_dateutil_parser, sizeof(__pyx_k_dateutil_parser), 0, 0, 1, 1},
  {&__pyx_n_s_dateutil_tz, __pyx_k_dateutil_tz, sizeof(__pyx_k_dateutil_tz), 0, 0, 1, 1},
  {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1},
  {&__pyx_n_s_days, __pyx_k_days, sizeof(__pyx_k_days), 0, 0, 1, 1},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_default_encoding, __pyx_k_default_encoding, sizeof(__pyx_k_default_encoding), 0, 0, 1, 1},
  {&__pyx_n_s_default_fillvals, __pyx_k_default_fillvals, sizeof(__pyx_k_default_fillvals), 0, 0, 1, 1},
  {&__pyx_n_s_delncattr, __pyx_k_delncattr, sizeof(__pyx_k_delncattr), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_dim, __pyx_k_dim, sizeof(__pyx_k_dim), 0, 0, 1, 1},
  {&__pyx_kp_s_dimension_s_not_defined_in_group, __pyx_k_dimension_s_not_defined_in_group, sizeof(__pyx_k_dimension_s_not_defined_in_group), 0, 0, 1, 0},
  {&__pyx_n_s_dimensions, __pyx_k_dimensions, sizeof(__pyx_k_dimensions), 0, 0, 1, 1},
  {&__pyx_kp_s_dimensions_cannot_be_altered, __pyx_k_dimensions_cannot_be_altered, sizeof(__pyx_k_dimensions_cannot_be_altered), 0, 0, 1, 0},
  {&__pyx_kp_s_dimensions_s, __pyx_k_dimensions_s, sizeof(__pyx_k_dimensions_s), 0, 0, 1, 0},
  {&__pyx_kp_s_dimensions_sizes_s, __pyx_k_dimensions_sizes_s, sizeof(__pyx_k_dimensions_sizes_s), 0, 0, 1, 0},
  {&__pyx_n_s_dimid, __pyx_k_dimid, sizeof(__pyx_k_dimid), 0, 0, 1, 1},
  {&__pyx_n_s_dimlens, __pyx_k_dimlens, sizeof(__pyx_k_dimlens), 0, 0, 1, 1},
  {&__pyx_n_s_dimname, __pyx_k_dimname, sizeof(__pyx_k_dimname), 0, 0, 1, 1},
  {&__pyx_n_s_dimnames, __pyx_k_dimnames, sizeof(__pyx_k_dimnames), 0, 0, 1, 1},
  {&__pyx_n_s_dims, __pyx_k_dims, sizeof(__pyx_k_dims), 0, 0, 1, 1},
  {&__pyx_n_s_dims_2, __pyx_k_dims_2, sizeof(__pyx_k_dims_2), 0, 0, 1, 1},
  {&__pyx_n_s_dimtotlen, __pyx_k_dimtotlen, sizeof(__pyx_k_dimtotlen), 0, 0, 1, 1},
  {&__pyx_n_s_disk_format, __pyx_k_disk_format, sizeof(__pyx_k_disk_format), 0, 0, 1, 1},
  {&__pyx_n_s_diskless, __pyx_k_diskless, sizeof(__pyx_k_diskless), 0, 0, 1, 1},
  {&__pyx_kp_s_diskless_mode_requires_netcdf_li, __pyx_k_diskless_mode_requires_netcdf_li, sizeof(__pyx_k_diskless_mode_requires_netcdf_li), 0, 0, 1, 0},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_dparse, __pyx_k_dparse, sizeof(__pyx_k_dparse), 0, 0, 1, 1},
  {&__pyx_n_s_dset, __pyx_k_dset, sizeof(__pyx_k_dset), 0, 0, 1, 1},
  {&__pyx_n_s_dset_2, __pyx_k_dset_2, sizeof(__pyx_k_dset_2), 0, 0, 1, 1},
  {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1},
  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
  {&__pyx_kp_s_dtype_must_string_or_unicode_S_o, __pyx_k_dtype_must_string_or_unicode_S_o, sizeof(__pyx_k_dtype_must_string_or_unicode_S_o), 0, 0, 1, 0},
  {&__pyx_n_s_dtype_name, __pyx_k_dtype_name, sizeof(__pyx_k_dtype_name), 0, 0, 1, 1},
  {&__pyx_n_s_elem, __pyx_k_elem, sizeof(__pyx_k_elem), 0, 0, 1, 1},
  {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_enddef, __pyx_k_enddef, sizeof(__pyx_k_enddef), 0, 0, 1, 1},
  {&__pyx_n_s_endian, __pyx_k_endian, sizeof(__pyx_k_endian), 0, 0, 1, 1},
  {&__pyx_kp_s_endian_keyword_argument_must_be, __pyx_k_endian_keyword_argument_must_be, sizeof(__pyx_k_endian_keyword_argument_must_be), 0, 0, 1, 0},
  {&__pyx_kp_s_endian_ness_of_dtype_and_endian, __pyx_k_endian_ness_of_dtype_and_endian, sizeof(__pyx_k_endian_ness_of_dtype_and_endian), 0, 0, 1, 0},
  {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_exact, __pyx_k_exact, sizeof(__pyx_k_exact), 0, 0, 1, 1},
  {&__pyx_n_s_exclude, __pyx_k_exclude, sizeof(__pyx_k_exclude), 0, 0, 1, 1},
  {&__pyx_n_s_extDims, __pyx_k_extDims, sizeof(__pyx_k_extDims), 0, 0, 1, 1},
  {&__pyx_n_s_extShape, __pyx_k_extShape, sizeof(__pyx_k_extShape), 0, 0, 1, 1},
  {&__pyx_n_s_extType, __pyx_k_extType, sizeof(__pyx_k_extType), 0, 0, 1, 1},
  {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
  {&__pyx_n_s_f4, __pyx_k_f4, sizeof(__pyx_k_f4), 0, 0, 1, 1},
  {&__pyx_kp_s_f4_2, __pyx_k_f4_2, sizeof(__pyx_k_f4_2), 0, 0, 1, 0},
  {&__pyx_kp_s_f4_3, __pyx_k_f4_3, sizeof(__pyx_k_f4_3), 0, 0, 1, 0},
  {&__pyx_n_s_f8, __pyx_k_f8, sizeof(__pyx_k_f8), 0, 0, 1, 1},
  {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
  {&__pyx_n_s_file_format, __pyx_k_file_format, sizeof(__pyx_k_file_format), 0, 0, 1, 1},
  {&__pyx_n_s_file_format_2, __pyx_k_file_format_2, sizeof(__pyx_k_file_format_2), 0, 0, 1, 1},
  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
  {&__pyx_kp_s_filepath_method_not_enabled_To, __pyx_k_filepath_method_not_enabled_To, sizeof(__pyx_k_filepath_method_not_enabled_To), 0, 0, 1, 0},
  {&__pyx_n_s_files, __pyx_k_files, sizeof(__pyx_k_files), 0, 0, 1, 1},
  {&__pyx_n_s_files_2, __pyx_k_files_2, sizeof(__pyx_k_files_2), 0, 0, 1, 1},
  {&__pyx_n_s_fill_value, __pyx_k_fill_value, sizeof(__pyx_k_fill_value), 0, 0, 1, 1},
  {&__pyx_n_s_filled, __pyx_k_filled, sizeof(__pyx_k_filled), 0, 0, 1, 1},
  {&__pyx_kp_s_filling_off, __pyx_k_filling_off, sizeof(__pyx_k_filling_off), 0, 0, 1, 0},
  {&__pyx_kp_s_filling_on, __pyx_k_filling_on, sizeof(__pyx_k_filling_on), 0, 0, 1, 0},
  {&__pyx_kp_s_filling_on_default__FillValue_of, __pyx_k_filling_on_default__FillValue_of, sizeof(__pyx_k_filling_on_default__FillValue_of), 0, 0, 1, 0},
  {&__pyx_kp_s_filling_on_default__FillValue_of_2, __pyx_k_filling_on_default__FillValue_of_2, sizeof(__pyx_k_filling_on_default__FillValue_of_2), 0, 0, 1, 0},
  {&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1},
  {&__pyx_n_s_find_dim, __pyx_k_find_dim, sizeof(__pyx_k_find_dim), 0, 0, 1, 1},
  {&__pyx_n_s_flatten, __pyx_k_flatten, sizeof(__pyx_k_flatten), 0, 0, 1, 1},
  {&__pyx_n_s_fletcher32, __pyx_k_fletcher32, sizeof(__pyx_k_fletcher32), 0, 0, 1, 1},
  {&__pyx_n_s_float, __pyx_k_float, sizeof(__pyx_k_float), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_kp_s_format_must_be_NETCDF4_NETCDF4_C, __pyx_k_format_must_be_NETCDF4_NETCDF4_C, sizeof(__pyx_k_format_must_be_NETCDF4_NETCDF4_C), 0, 0, 1, 0},
  {&__pyx_n_s_formats, __pyx_k_formats, sizeof(__pyx_k_formats), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_get_var_chunk_cache, __pyx_k_get_var_chunk_cache, sizeof(__pyx_k_get_var_chunk_cache), 0, 0, 1, 1},
  {&__pyx_n_s_getattr, __pyx_k_getattr, sizeof(__pyx_k_getattr), 0, 0, 1, 1},
  {&__pyx_n_s_getattribute, __pyx_k_getattribute, sizeof(__pyx_k_getattribute), 0, 0, 1, 1},
  {&__pyx_n_s_getdims, __pyx_k_getdims, sizeof(__pyx_k_getdims), 0, 0, 1, 1},
  {&__pyx_n_s_gethdf5libversion, __pyx_k_gethdf5libversion, sizeof(__pyx_k_gethdf5libversion), 0, 0, 1, 1},
  {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1},
  {&__pyx_n_s_getlibversion, __pyx_k_getlibversion, sizeof(__pyx_k_getlibversion), 0, 0, 1, 1},
  {&__pyx_n_s_getncattr, __pyx_k_getncattr, sizeof(__pyx_k_getncattr), 0, 0, 1, 1},
  {&__pyx_n_s_glob, __pyx_k_glob, sizeof(__pyx_k_glob), 0, 0, 1, 1},
  {&__pyx_n_s_gregorian, __pyx_k_gregorian, sizeof(__pyx_k_gregorian), 0, 0, 1, 1},
  {&__pyx_kp_s_group_s, __pyx_k_group_s, sizeof(__pyx_k_group_s), 0, 0, 1, 0},
  {&__pyx_n_s_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 0, 1, 1},
  {&__pyx_kp_s_groups_s, __pyx_k_groups_s, sizeof(__pyx_k_groups_s), 0, 0, 1, 0},
  {&__pyx_kp_s_groups_s_2, __pyx_k_groups_s_2, sizeof(__pyx_k_groups_s_2), 0, 0, 1, 0},
  {&__pyx_n_s_grp, __pyx_k_grp, sizeof(__pyx_k_grp), 0, 0, 1, 1},
  {&__pyx_n_s_grp_2, __pyx_k_grp_2, sizeof(__pyx_k_grp_2), 0, 0, 1, 1},
  {&__pyx_n_s_grpid, __pyx_k_grpid, sizeof(__pyx_k_grpid), 0, 0, 1, 1},
  {&__pyx_n_s_grpnames, __pyx_k_grpnames, sizeof(__pyx_k_grpnames), 0, 0, 1, 1},
  {&__pyx_n_s_grps, __pyx_k_grps, sizeof(__pyx_k_grps), 0, 0, 1, 1},
  {&__pyx_n_s_has_nc_inq_format_extended, __pyx_k_has_nc_inq_format_extended, sizeof(__pyx_k_has_nc_inq_format_extended), 0, 0, 1, 1},
  {&__pyx_n_s_has_nc_inq_path, __pyx_k_has_nc_inq_path, sizeof(__pyx_k_has_nc_inq_path), 0, 0, 1, 1},
  {&__pyx_n_s_has_rename_grp, __pyx_k_has_rename_grp, sizeof(__pyx_k_has_rename_grp), 0, 0, 1, 1},
  {&__pyx_n_s_hdf5libversion, __pyx_k_hdf5libversion, sizeof(__pyx_k_hdf5libversion), 0, 0, 1, 1},
  {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1},
  {&__pyx_n_s_hours, __pyx_k_hours, sizeof(__pyx_k_hours), 0, 0, 1, 1},
  {&__pyx_n_s_http, __pyx_k_http, sizeof(__pyx_k_http), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_i0, __pyx_k_i0, sizeof(__pyx_k_i0), 0, 0, 1, 1},
  {&__pyx_n_s_i1, __pyx_k_i1, sizeof(__pyx_k_i1), 0, 0, 1, 1},
  {&__pyx_n_s_i2, __pyx_k_i2, sizeof(__pyx_k_i2), 0, 0, 1, 1},
  {&__pyx_n_s_i4, __pyx_k_i4, sizeof(__pyx_k_i4), 0, 0, 1, 1},
  {&__pyx_n_s_i8, __pyx_k_i8, sizeof(__pyx_k_i8), 0, 0, 1, 1},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1},
  {&__pyx_kp_s_illegal_data_type_for_attribute, __pyx_k_illegal_data_type_for_attribute, sizeof(__pyx_k_illegal_data_type_for_attribute), 0, 0, 1, 0},
  {&__pyx_kp_s_illegal_primitive_data_type_must, __pyx_k_illegal_primitive_data_type_must, sizeof(__pyx_k_illegal_primitive_data_type_must), 0, 0, 1, 0},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_in1d, __pyx_k_in1d, sizeof(__pyx_k_in1d), 0, 0, 1, 1},
  {&__pyx_n_s_ind, __pyx_k_ind, sizeof(__pyx_k_ind), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_kp_s_invalid_scale_factor_or_add_offs, __pyx_k_invalid_scale_factor_or_add_offs, sizeof(__pyx_k_invalid_scale_factor_or_add_offs), 0, 0, 1, 0},
  {&__pyx_n_s_isMA, __pyx_k_isMA, sizeof(__pyx_k_isMA), 0, 0, 1, 1},
  {&__pyx_n_s_is_native_big, __pyx_k_is_native_big, sizeof(__pyx_k_is_native_big), 0, 0, 1, 1},
  {&__pyx_n_s_is_native_little, __pyx_k_is_native_little, sizeof(__pyx_k_is_native_little), 0, 0, 1, 1},
  {&__pyx_n_s_iscompound, __pyx_k_iscompound, sizeof(__pyx_k_iscompound), 0, 0, 1, 1},
  {&__pyx_n_s_ismasked, __pyx_k_ismasked, sizeof(__pyx_k_ismasked), 0, 0, 1, 1},
  {&__pyx_n_s_isnan, __pyx_k_isnan, sizeof(__pyx_k_isnan), 0, 0, 1, 1},
  {&__pyx_n_s_isostring, __pyx_k_isostring, sizeof(__pyx_k_isostring), 0, 0, 1, 1},
  {&__pyx_n_s_isprimitive, __pyx_k_isprimitive, sizeof(__pyx_k_isprimitive), 0, 0, 1, 1},
  {&__pyx_n_s_isscalar, __pyx_k_isscalar, sizeof(__pyx_k_isscalar), 0, 0, 1, 1},
  {&__pyx_n_s_isunlimited, __pyx_k_isunlimited, sizeof(__pyx_k_isunlimited), 0, 0, 1, 1},
  {&__pyx_n_s_isvlen, __pyx_k_isvlen, sizeof(__pyx_k_isvlen), 0, 0, 1, 1},
  {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
  {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
  {&__pyx_n_s_izip, __pyx_k_izip, sizeof(__pyx_k_izip), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
  {&__pyx_n_s_keepweakref, __pyx_k_keepweakref, sizeof(__pyx_k_keepweakref), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 0, 0, 1, 1},
  {&__pyx_n_s_least_significant_digit, __pyx_k_least_significant_digit, sizeof(__pyx_k_least_significant_digit), 0, 0, 1, 1},
  {&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1},
  {&__pyx_n_s_little, __pyx_k_little, sizeof(__pyx_k_little), 0, 0, 1, 1},
  {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
  {&__pyx_n_s_lst, __pyx_k_lst, sizeof(__pyx_k_lst), 0, 0, 1, 1},
  {&__pyx_n_s_lstArr, __pyx_k_lstArr, sizeof(__pyx_k_lstArr), 0, 0, 1, 1},
  {&__pyx_n_s_ma, __pyx_k_ma, sizeof(__pyx_k_ma), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_majorvers, __pyx_k_majorvers, sizeof(__pyx_k_majorvers), 0, 0, 1, 1},
  {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1},
  {&__pyx_n_s_masked_array, __pyx_k_masked_array, sizeof(__pyx_k_masked_array), 0, 0, 1, 1},
  {&__pyx_n_s_master, __pyx_k_master, sizeof(__pyx_k_master), 0, 0, 1, 1},
  {&__pyx_n_s_masterDims, __pyx_k_masterDims, sizeof(__pyx_k_masterDims), 0, 0, 1, 1},
  {&__pyx_n_s_masterRecVar, __pyx_k_masterRecVar, sizeof(__pyx_k_masterRecVar), 0, 0, 1, 1},
  {&__pyx_n_s_masterShape, __pyx_k_masterShape, sizeof(__pyx_k_masterShape), 0, 0, 1, 1},
  {&__pyx_n_s_masterType, __pyx_k_masterType, sizeof(__pyx_k_masterType), 0, 0, 1, 1},
  {&__pyx_kp_s_master_dataset_s_does_not_have_a, __pyx_k_master_dataset_s_does_not_have_a, sizeof(__pyx_k_master_dataset_s_does_not_have_a), 0, 0, 1, 0},
  {&__pyx_kp_s_master_dataset_s_does_not_have_a_2, __pyx_k_master_dataset_s_does_not_have_a_2, sizeof(__pyx_k_master_dataset_s_does_not_have_a_2), 0, 0, 1, 0},
  {&__pyx_n_s_mastervar, __pyx_k_mastervar, sizeof(__pyx_k_mastervar), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_microsecond, __pyx_k_microsecond, sizeof(__pyx_k_microsecond), 0, 0, 1, 1},
  {&__pyx_n_s_microseconds, __pyx_k_microseconds, sizeof(__pyx_k_microseconds), 0, 0, 1, 1},
  {&__pyx_n_s_millisecond, __pyx_k_millisecond, sizeof(__pyx_k_millisecond), 0, 0, 1, 1},
  {&__pyx_n_s_milliseconds, __pyx_k_milliseconds, sizeof(__pyx_k_milliseconds), 0, 0, 1, 1},
  {&__pyx_kp_s_milliseconds_microseconds_not_su, __pyx_k_milliseconds_microseconds_not_su, sizeof(__pyx_k_milliseconds_microseconds_not_su), 0, 0, 1, 0},
  {&__pyx_n_s_minorvers, __pyx_k_minorvers, sizeof(__pyx_k_minorvers), 0, 0, 1, 1},
  {&__pyx_n_s_missing_value, __pyx_k_missing_value, sizeof(__pyx_k_missing_value), 0, 0, 1, 1},
  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
  {&__pyx_kp_s_mode_must_be_w_r_a_or_r_got_s, __pyx_k_mode_must_be_w_r_a_or_r_got_s, sizeof(__pyx_k_mode_must_be_w_r_a_or_r_got_s), 0, 0, 1, 0},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_msecs, __pyx_k_msecs, sizeof(__pyx_k_msecs), 0, 0, 1, 1},
  {&__pyx_n_s_msecsd, __pyx_k_msecsd, sizeof(__pyx_k_msecsd), 0, 0, 1, 1},
  {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1},
  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  {&__pyx_n_s_n1, __pyx_k_n1, sizeof(__pyx_k_n1), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_kp_s_name_s_numpy_dtype_s, __pyx_k_name_s_numpy_dtype_s, sizeof(__pyx_k_name_s_numpy_dtype_s), 0, 0, 1, 0},
  {&__pyx_kp_s_name_s_size_s, __pyx_k_name_s_size_s, sizeof(__pyx_k_name_s_size_s), 0, 0, 1, 0},
  {&__pyx_n_s_names, __pyx_k_names, sizeof(__pyx_k_names), 0, 0, 1, 1},
  {&__pyx_n_s_native, __pyx_k_native, sizeof(__pyx_k_native), 0, 0, 1, 1},
  {&__pyx_n_s_nc_type, __pyx_k_nc_type, sizeof(__pyx_k_nc_type), 0, 0, 1, 1},
  {&__pyx_n_s_ncattrs, __pyx_k_ncattrs, sizeof(__pyx_k_ncattrs), 0, 0, 1, 1},
  {&__pyx_n_s_ncdump, __pyx_k_ncdump, sizeof(__pyx_k_ncdump), 0, 0, 1, 1},
  {&__pyx_n_s_ncdump_var, __pyx_k_ncdump_var, sizeof(__pyx_k_ncdump_var), 0, 0, 1, 1},
  {&__pyx_n_s_nctime, __pyx_k_nctime, sizeof(__pyx_k_nctime), 0, 0, 1, 1},
  {&__pyx_n_s_nctonptype, __pyx_k_nctonptype, sizeof(__pyx_k_nctonptype), 0, 0, 1, 1},
  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
  {&__pyx_kp_s_negative_strides_not_allowed_whe, __pyx_k_negative_strides_not_allowed_whe, sizeof(__pyx_k_negative_strides_not_allowed_whe), 0, 0, 1, 0},
  {&__pyx_n_s_nelems, __pyx_k_nelems, sizeof(__pyx_k_nelems), 0, 0, 1, 1},
  {&__pyx_n_s_netCDF4, __pyx_k_netCDF4, sizeof(__pyx_k_netCDF4), 0, 0, 1, 1},
  {&__pyx_n_s_netCDF4_utils, __pyx_k_netCDF4_utils, sizeof(__pyx_k_netCDF4_utils), 0, 0, 1, 1},
  {&__pyx_n_s_netcdf4libversion, __pyx_k_netcdf4libversion, sizeof(__pyx_k_netcdf4libversion), 0, 0, 1, 1},
  {&__pyx_n_s_netcdftime, __pyx_k_netcdftime, sizeof(__pyx_k_netcdftime), 0, 0, 1, 1},
  {&__pyx_n_s_newSlice, __pyx_k_newSlice, sizeof(__pyx_k_newSlice), 0, 0, 1, 1},
  {&__pyx_n_s_newname, __pyx_k_newname, sizeof(__pyx_k_newname), 0, 0, 1, 1},
  {&__pyx_kp_s_no_since_in_unit_string, __pyx_k_no_since_in_unit_string, sizeof(__pyx_k_no_since_in_unit_string), 0, 0, 1, 0},
  {&__pyx_n_s_nptonctype, __pyx_k_nptonctype, sizeof(__pyx_k_nptonctype), 0, 0, 1, 1},
  {&__pyx_n_s_npversion, __pyx_k_npversion, sizeof(__pyx_k_npversion), 0, 0, 1, 1},
  {&__pyx_n_s_num, __pyx_k_num, sizeof(__pyx_k_num), 0, 0, 1, 1},
  {&__pyx_n_s_num2date, __pyx_k_num2date, sizeof(__pyx_k_num2date), 0, 0, 1, 1},
  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
  {&__pyx_n_s_numv, __pyx_k_numv, sizeof(__pyx_k_numv), 0, 0, 1, 1},
  {&__pyx_n_s_nunlimdim, __pyx_k_nunlimdim, sizeof(__pyx_k_nunlimdim), 0, 0, 1, 1},
  {&__pyx_n_s_nv, __pyx_k_nv, sizeof(__pyx_k_nv), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_offsets, __pyx_k_offsets, sizeof(__pyx_k_offsets), 0, 0, 1, 1},
  {&__pyx_n_s_oldname, __pyx_k_oldname, sizeof(__pyx_k_oldname), 0, 0, 1, 1},
  {&__pyx_kp_s_only_endian_native_allowed_for_N, __pyx_k_only_endian_native_allowed_for_N, sizeof(__pyx_k_only_endian_native_allowed_for_N), 0, 0, 1, 0},
  {&__pyx_kp_s_only_numpy_string_unicode_or_obj, __pyx_k_only_numpy_string_unicode_or_obj, sizeof(__pyx_k_only_numpy_string_unicode_or_obj), 0, 0, 1, 0},
  {&__pyx_n_s_ordereddict, __pyx_k_ordereddict, sizeof(__pyx_k_ordereddict), 0, 0, 1, 1},
  {&__pyx_n_s_out_array_shape, __pyx_k_out_array_shape, sizeof(__pyx_k_out_array_shape), 0, 0, 1, 1},
  {&__pyx_n_s_parent, __pyx_k_parent, sizeof(__pyx_k_parent), 0, 0, 1, 1},
  {&__pyx_n_s_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 0, 0, 1, 1},
  {&__pyx_n_s_part, __pyx_k_part, sizeof(__pyx_k_part), 0, 0, 1, 1},
  {&__pyx_n_s_patchstring, __pyx_k_patchstring, sizeof(__pyx_k_patchstring), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_kp_s_path_s, __pyx_k_path_s, sizeof(__pyx_k_path_s), 0, 0, 1, 0},
  {&__pyx_n_s_persist, __pyx_k_persist, sizeof(__pyx_k_persist), 0, 0, 1, 1},
  {&__pyx_kp_s_please_install_ordereddict_https, __pyx_k_please_install_ordereddict_https, sizeof(__pyx_k_please_install_ordereddict_https), 0, 0, 1, 0},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_posixpath, __pyx_k_posixpath, sizeof(__pyx_k_posixpath), 0, 0, 1, 1},
  {&__pyx_n_s_preemption, __pyx_k_preemption, sizeof(__pyx_k_preemption), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_private_atts, __pyx_k_private_atts, sizeof(__pyx_k_private_atts), 0, 0, 1, 1},
  {&__pyx_n_s_prod, __pyx_k_prod, sizeof(__pyx_k_prod), 0, 0, 1, 1},
  {&__pyx_n_s_proleptic_gregorian, __pyx_k_proleptic_gregorian, sizeof(__pyx_k_proleptic_gregorian), 0, 0, 1, 1},
  {&__pyx_n_s_proxy, __pyx_k_proxy, sizeof(__pyx_k_proxy), 0, 0, 1, 1},
  {&__pyx_n_s_put, __pyx_k_put, sizeof(__pyx_k_put), 0, 0, 1, 1},
  {&__pyx_n_s_put_ind, __pyx_k_put_ind, sizeof(__pyx_k_put_ind), 0, 0, 1, 1},
  {&__pyx_n_s_python3, __pyx_k_python3, sizeof(__pyx_k_python3), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_quantize, __pyx_k_quantize, sizeof(__pyx_k_quantize), 0, 0, 1, 1},
  {&__pyx_kp_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 0},
  {&__pyx_n_s_r_2, __pyx_k_r_2, sizeof(__pyx_k_r_2), 0, 0, 1, 1},
  {&__pyx_kp_s_r_3, __pyx_k_r_3, sizeof(__pyx_k_r_3), 0, 0, 1, 0},
  {&__pyx_kp_s_r_s, __pyx_k_r_s, sizeof(__pyx_k_r_s), 0, 0, 1, 0},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_ravel, __pyx_k_ravel, sizeof(__pyx_k_ravel), 0, 0, 1, 1},
  {&__pyx_n_s_recLen, __pyx_k_recLen, sizeof(__pyx_k_recLen), 0, 0, 1, 1},
  {&__pyx_n_s_recVar, __pyx_k_recVar, sizeof(__pyx_k_recVar), 0, 0, 1, 1},
  {&__pyx_n_s_recdimlen, __pyx_k_recdimlen, sizeof(__pyx_k_recdimlen), 0, 0, 1, 1},
  {&__pyx_n_s_recdimname, __pyx_k_recdimname, sizeof(__pyx_k_recdimname), 0, 0, 1, 1},
  {&__pyx_n_s_recdimname_2, __pyx_k_recdimname_2, sizeof(__pyx_k_recdimname_2), 0, 0, 1, 1},
  {&__pyx_n_s_redef, __pyx_k_redef, sizeof(__pyx_k_redef), 0, 0, 1, 1},
  {&__pyx_n_s_ref_date, __pyx_k_ref_date, sizeof(__pyx_k_ref_date), 0, 0, 1, 1},
  {&__pyx_n_s_ref_num, __pyx_k_ref_num, sizeof(__pyx_k_ref_num), 0, 0, 1, 1},
  {&__pyx_n_s_releasevers, __pyx_k_releasevers, sizeof(__pyx_k_releasevers), 0, 0, 1, 1},
  {&__pyx_kp_s_renameGroup_method_not_enabled, __pyx_k_renameGroup_method_not_enabled, sizeof(__pyx_k_renameGroup_method_not_enabled), 0, 0, 1, 0},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {&__pyx_kp_s_requires_numpy_version_1_0rc1_or, __pyx_k_requires_numpy_version_1_0rc1_or, sizeof(__pyx_k_requires_numpy_version_1_0rc1_or), 0, 0, 1, 0},
  {&__pyx_n_s_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 0, 0, 1, 1},
  {&__pyx_kp_s_root_group_s_data_model_file_for, __pyx_k_root_group_s_data_model_file_for, sizeof(__pyx_k_root_group_s_data_model_file_for), 0, 0, 1, 0},
  {&__pyx_kp_s_root_group_s_file_format, __pyx_k_root_group_s_file_format, sizeof(__pyx_k_root_group_s_file_format), 0, 0, 1, 0},
  {&__pyx_kp_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 0},
  {&__pyx_n_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 1},
  {&__pyx_kp_s_s_is_one_of_the_reserved_attrib, __pyx_k_s_is_one_of_the_reserved_attrib, sizeof(__pyx_k_s_is_one_of_the_reserved_attrib), 0, 0, 1, 0},
  {&__pyx_kp_s_s_is_one_of_the_reserved_attrib_2, __pyx_k_s_is_one_of_the_reserved_attrib_2, sizeof(__pyx_k_s_is_one_of_the_reserved_attrib_2), 0, 0, 1, 0},
  {&__pyx_kp_s_s_not_a_valid_dimension_name, __pyx_k_s_not_a_valid_dimension_name, sizeof(__pyx_k_s_not_a_valid_dimension_name), 0, 0, 1, 0},
  {&__pyx_kp_s_s_not_a_valid_variable_name, __pyx_k_s_not_a_valid_variable_name, sizeof(__pyx_k_s_not_a_valid_variable_name), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s_s, __pyx_k_s_s_s, sizeof(__pyx_k_s_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s_s_2, __pyx_k_s_s_s_2, sizeof(__pyx_k_s_s_s_2), 0, 0, 1, 0},
  {&__pyx_n_s_scale, __pyx_k_scale, sizeof(__pyx_k_scale), 0, 0, 1, 1},
  {&__pyx_n_s_scale_factor, __pyx_k_scale_factor, sizeof(__pyx_k_scale_factor), 0, 0, 1, 1},
  {&__pyx_n_s_second, __pyx_k_second, sizeof(__pyx_k_second), 0, 0, 1, 1},
  {&__pyx_n_s_seconds, __pyx_k_seconds, sizeof(__pyx_k_seconds), 0, 0, 1, 1},
  {&__pyx_n_s_secs, __pyx_k_secs, sizeof(__pyx_k_secs), 0, 0, 1, 1},
  {&__pyx_n_s_select, __pyx_k_select, sizeof(__pyx_k_select), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_set_auto_mask, __pyx_k_set_auto_mask, sizeof(__pyx_k_set_auto_mask), 0, 0, 1, 1},
  {&__pyx_n_s_set_auto_maskandscale, __pyx_k_set_auto_maskandscale, sizeof(__pyx_k_set_auto_maskandscale), 0, 0, 1, 1},
  {&__pyx_n_s_set_auto_scale, __pyx_k_set_auto_scale, sizeof(__pyx_k_set_auto_scale), 0, 0, 1, 1},
  {&__pyx_n_s_set_default_format, __pyx_k_set_default_format, sizeof(__pyx_k_set_default_format), 0, 0, 1, 1},
  {&__pyx_n_s_setattr, __pyx_k_setattr, sizeof(__pyx_k_setattr), 0, 0, 1, 1},
  {&__pyx_n_s_setncattr, __pyx_k_setncattr, sizeof(__pyx_k_setncattr), 0, 0, 1, 1},
  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
  {&__pyx_n_s_shape_2, __pyx_k_shape_2, sizeof(__pyx_k_shape_2), 0, 0, 1, 1},
  {&__pyx_kp_s_shape_cannot_be_altered, __pyx_k_shape_cannot_be_altered, sizeof(__pyx_k_shape_cannot_be_altered), 0, 0, 1, 0},
  {&__pyx_n_s_shuffle, __pyx_k_shuffle, sizeof(__pyx_k_shuffle), 0, 0, 1, 1},
  {&__pyx_n_s_since, __pyx_k_since, sizeof(__pyx_k_since), 0, 0, 1, 1},
  {&__pyx_kp_s_single_element_VLEN_slices_must, __pyx_k_single_element_VLEN_slices_must, sizeof(__pyx_k_single_element_VLEN_slices_must), 0, 0, 1, 0},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_kp_s_size_of_data_array_does_not_conf, __pyx_k_size_of_data_array_does_not_conf, sizeof(__pyx_k_size_of_data_array_does_not_conf), 0, 0, 1, 0},
  {&__pyx_n_s_slen, __pyx_k_slen, sizeof(__pyx_k_slen), 0, 0, 1, 1},
  {&__pyx_n_s_sortbylist, __pyx_k_sortbylist, sizeof(__pyx_k_sortbylist), 0, 0, 1, 1},
  {&__pyx_n_s_sorted, __pyx_k_sorted, sizeof(__pyx_k_sorted), 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_str_2, __pyx_k_str_2, sizeof(__pyx_k_str_2), 0, 0, 1, 1},
  {&__pyx_n_s_strd, __pyx_k_strd, sizeof(__pyx_k_strd), 0, 0, 1, 1},
  {&__pyx_n_s_stride, __pyx_k_stride, sizeof(__pyx_k_stride), 0, 0, 1, 1},
  {&__pyx_kp_s_strides_must_all_be_1_for_string, __pyx_k_strides_must_all_be_1_for_string, sizeof(__pyx_k_strides_must_all_be_1_for_string), 0, 0, 1, 0},
  {&__pyx_kp_s_strides_must_all_be_1_for_vlen_v, __pyx_k_strides_must_all_be_1_for_vlen_v, sizeof(__pyx_k_strides_must_all_be_1_for_vlen_v), 0, 0, 1, 0},
  {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1},
  {&__pyx_kp_s_string_type, __pyx_k_string_type, sizeof(__pyx_k_string_type), 0, 0, 1, 0},
  {&__pyx_n_s_stringtoarr, __pyx_k_stringtoarr, sizeof(__pyx_k_stringtoarr), 0, 0, 1, 1},
  {&__pyx_n_s_stringtochar, __pyx_k_stringtochar, sizeof(__pyx_k_stringtochar), 0, 0, 1, 1},
  {&__pyx_n_s_strt, __pyx_k_strt, sizeof(__pyx_k_strt), 0, 0, 1, 1},
  {&__pyx_n_s_subdtype, __pyx_k_subdtype, sizeof(__pyx_k_subdtype), 0, 0, 1, 1},
  {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
  {&__pyx_n_s_supportedtypes, __pyx_k_supportedtypes, sizeof(__pyx_k_supportedtypes), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
  {&__pyx_n_s_td, __pyx_k_td, sizeof(__pyx_k_td), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_tile, __pyx_k_tile, sizeof(__pyx_k_tile), 0, 0, 1, 1},
  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {&__pyx_n_s_time2index, __pyx_k_time2index, sizeof(__pyx_k_time2index), 0, 0, 1, 1},
  {&__pyx_n_s_timedelta, __pyx_k_timedelta, sizeof(__pyx_k_timedelta), 0, 0, 1, 1},
  {&__pyx_n_s_times, __pyx_k_times, sizeof(__pyx_k_times), 0, 0, 1, 1},
  {&__pyx_n_s_timestr, __pyx_k_timestr, sizeof(__pyx_k_timestr), 0, 0, 1, 1},
  {&__pyx_n_s_timestr_split, __pyx_k_timestr_split, sizeof(__pyx_k_timestr_split), 0, 0, 1, 1},
  {&__pyx_kp_s_to_assign_values_to_a_non_scalar, __pyx_k_to_assign_values_to_a_non_scalar, sizeof(__pyx_k_to_assign_values_to_a_non_scalar), 0, 0, 1, 0},
  {&__pyx_kp_s_to_retrieve_values_from_a_non_sc, __pyx_k_to_retrieve_values_from_a_non_sc, sizeof(__pyx_k_to_retrieve_values_from_a_non_sc), 0, 0, 1, 0},
  {&__pyx_n_s_tolist, __pyx_k_tolist, sizeof(__pyx_k_tolist), 0, 0, 1, 1},
  {&__pyx_n_s_toma, __pyx_k_toma, sizeof(__pyx_k_toma), 0, 0, 1, 1},
  {&__pyx_n_s_tostr, __pyx_k_tostr, sizeof(__pyx_k_tostr), 0, 0, 1, 1},
  {&__pyx_n_s_tostring, __pyx_k_tostring, sizeof(__pyx_k_tostring), 0, 0, 1, 1},
  {&__pyx_n_s_totaltime, __pyx_k_totaltime, sizeof(__pyx_k_totaltime), 0, 0, 1, 1},
  {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_tsecs, __pyx_k_tsecs, sizeof(__pyx_k_tsecs), 0, 0, 1, 1},
  {&__pyx_kp_s_type_must_string_or_unicode_S_or, __pyx_k_type_must_string_or_unicode_S_or, sizeof(__pyx_k_type_must_string_or_unicode_S_or), 0, 0, 1, 0},
  {&__pyx_n_s_typecode, __pyx_k_typecode, sizeof(__pyx_k_typecode), 0, 0, 1, 1},
  {&__pyx_n_s_typeid, __pyx_k_typeid, sizeof(__pyx_k_typeid), 0, 0, 1, 1},
  {&__pyx_n_s_tzinfo, __pyx_k_tzinfo, sizeof(__pyx_k_tzinfo), 0, 0, 1, 1},
  {&__pyx_n_s_tzutc, __pyx_k_tzutc, sizeof(__pyx_k_tzutc), 0, 0, 1, 1},
  {&__pyx_kp_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 0},
  {&__pyx_n_s_u1, __pyx_k_u1, sizeof(__pyx_k_u1), 0, 0, 1, 1},
  {&__pyx_n_s_u2, __pyx_k_u2, sizeof(__pyx_k_u2), 0, 0, 1, 1},
  {&__pyx_n_s_u4, __pyx_k_u4, sizeof(__pyx_k_u4), 0, 0, 1, 1},
  {&__pyx_n_s_u8, __pyx_k_u8, sizeof(__pyx_k_u8), 0, 0, 1, 1},
  {&__pyx_n_s_unicode, __pyx_k_unicode, sizeof(__pyx_k_unicode), 0, 0, 1, 1},
  {&__pyx_n_s_unicode_error, __pyx_k_unicode_error, sizeof(__pyx_k_unicode_error), 0, 0, 1, 1},
  {&__pyx_n_s_unit, __pyx_k_unit, sizeof(__pyx_k_unit), 0, 0, 1, 1},
  {&__pyx_n_s_units, __pyx_k_units, sizeof(__pyx_k_units), 0, 0, 1, 1},
  {&__pyx_n_s_unlimdims, __pyx_k_unlimdims, sizeof(__pyx_k_unlimdims), 0, 0, 1, 1},
  {&__pyx_kp_s_unlimited_dimensions_s, __pyx_k_unlimited_dimensions_s, sizeof(__pyx_k_unlimited_dimensions_s), 0, 0, 1, 0},
  {&__pyx_kp_s_unlimited_dimensions_s_2, __pyx_k_unlimited_dimensions_s_2, sizeof(__pyx_k_unlimited_dimensions_s_2), 0, 0, 1, 0},
  {&__pyx_kp_s_unlimited_name_s_size_s, __pyx_k_unlimited_name_s_size_s, sizeof(__pyx_k_unlimited_name_s_size_s), 0, 0, 1, 0},
  {&__pyx_kp_s_unsupported_component_type_for_V, __pyx_k_unsupported_component_type_for_V, sizeof(__pyx_k_unsupported_component_type_for_V), 0, 0, 1, 0},
  {&__pyx_kp_s_unsupported_datatype_specified_f, __pyx_k_unsupported_datatype_specified_f, sizeof(__pyx_k_unsupported_datatype_specified_f), 0, 0, 1, 0},
  {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
  {&__pyx_n_s_utime, __pyx_k_utime, sizeof(__pyx_k_utime), 0, 0, 1, 1},
  {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
  {&__pyx_n_s_vInst, __pyx_k_vInst, sizeof(__pyx_k_vInst), 0, 0, 1, 1},
  {&__pyx_n_s_vName, __pyx_k_vName, sizeof(__pyx_k_vName), 0, 0, 1, 1},
  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_value_2, __pyx_k_value_2, sizeof(__pyx_k_value_2), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_var, __pyx_k_var, sizeof(__pyx_k_var), 0, 0, 1, 1},
  {&__pyx_n_s_varInfo, __pyx_k_varInfo, sizeof(__pyx_k_varInfo), 0, 0, 1, 1},
  {&__pyx_kp_s_variable_s_data_type_mismatch_be, __pyx_k_variable_s_data_type_mismatch_be, sizeof(__pyx_k_variable_s_data_type_mismatch_be), 0, 0, 1, 0},
  {&__pyx_kp_s_variable_s_dimensions_mismatch_b, __pyx_k_variable_s_dimensions_mismatch_b, sizeof(__pyx_k_variable_s_dimensions_mismatch_b), 0, 0, 1, 0},
  {&__pyx_kp_s_variable_s_rank_mismatch_between, __pyx_k_variable_s_rank_mismatch_between, sizeof(__pyx_k_variable_s_rank_mismatch_between), 0, 0, 1, 0},
  {&__pyx_kp_s_variable_s_shape_mismatch_betwee, __pyx_k_variable_s_shape_mismatch_betwee, sizeof(__pyx_k_variable_s_shape_mismatch_betwee), 0, 0, 1, 0},
  {&__pyx_n_s_variables, __pyx_k_variables, sizeof(__pyx_k_variables), 0, 0, 1, 1},
  {&__pyx_kp_s_variables_dimensions_s, __pyx_k_variables_dimensions_s, sizeof(__pyx_k_variables_dimensions_s), 0, 0, 1, 0},
  {&__pyx_kp_s_variables_s, __pyx_k_variables_s, sizeof(__pyx_k_variables_s), 0, 0, 1, 0},
  {&__pyx_n_s_varid, __pyx_k_varid, sizeof(__pyx_k_varid), 0, 0, 1, 1},
  {&__pyx_n_s_varname, __pyx_k_varname, sizeof(__pyx_k_varname), 0, 0, 1, 1},
  {&__pyx_n_s_varnames, __pyx_k_varnames, sizeof(__pyx_k_varnames), 0, 0, 1, 1},
  {&__pyx_n_s_vars, __pyx_k_vars, sizeof(__pyx_k_vars), 0, 0, 1, 1},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
  {&__pyx_n_s_vid, __pyx_k_vid, sizeof(__pyx_k_vid), 0, 0, 1, 1},
  {&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1},
  {&__pyx_n_s_vlen, __pyx_k_vlen, sizeof(__pyx_k_vlen), 0, 0, 1, 1},
  {&__pyx_kp_s_vlen_data_type_s, __pyx_k_vlen_data_type_s, sizeof(__pyx_k_vlen_data_type_s), 0, 0, 1, 0},
  {&__pyx_kp_s_vlen_string_array_attributes_not, __pyx_k_vlen_string_array_attributes_not, sizeof(__pyx_k_vlen_string_array_attributes_not), 0, 0, 1, 0},
  {&__pyx_n_s_vltype, __pyx_k_vltype, sizeof(__pyx_k_vltype), 0, 0, 1, 1},
  {&__pyx_n_s_vltypes, __pyx_k_vltypes, sizeof(__pyx_k_vltypes), 0, 0, 1, 1},
  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
  {&__pyx_n_s_walk_grps, __pyx_k_walk_grps, sizeof(__pyx_k_walk_grps), 0, 0, 1, 1},
  {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
  {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
  {&__pyx_n_s_weakref, __pyx_k_weakref, sizeof(__pyx_k_weakref), 0, 0, 1, 1},
  {&__pyx_kp_s_wrong_data_type_in_object_array, __pyx_k_wrong_data_type_in_object_array, sizeof(__pyx_k_wrong_data_type_in_object_array), 0, 0, 1, 0},
  {&__pyx_kp_s_wrong_data_type_should_be_s_got, __pyx_k_wrong_data_type_should_be_s_got, sizeof(__pyx_k_wrong_data_type_should_be_s_got), 0, 0, 1, 0},
  {&__pyx_n_s_ws, __pyx_k_ws, sizeof(__pyx_k_ws), 0, 0, 1, 1},
  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
  {&__pyx_n_s_zlib, __pyx_k_zlib, sizeof(__pyx_k_zlib), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __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 = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s_sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 598; __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 = 641; __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 = 658; __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 = 916; __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 = 958; __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 = 1070; __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 = 4066; __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);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":17
 *     units = timestr_split[0].lower()
 *     if timestr_split[1].lower() != 'since':
 *         raise ValueError("no 'since' in unit_string")             # <<<<<<<<<<<<<<
 *     # parse the date string.
 *     n = timestr.find('since')+6
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_since_in_unit_string); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":19
 *         raise ValueError("no 'since' in unit_string")
 *     # parse the date string.
 *     n = timestr.find('since')+6             # <<<<<<<<<<<<<<
 *     isostring = timestr[n:]
 *     basedate = dparse.parse(isostring)
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_s_since); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":46
 * (default) or 'U1' (if dtype='U')"""
 *     if dtype not in ["S","U"]:
 *         raise ValueError("dtype must string or unicode ('S' or 'U')")             # <<<<<<<<<<<<<<
 *     arr = numpy.zeros(NUMCHARS,dtype+'1')
 *     arr[0:len(string)] = tuple(string)
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_dtype_must_string_or_unicode_S_o); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":65
 *     dtype = a.dtype.kind
 *     if dtype not in ["S","U"]:
 *         raise ValueError("type must string or unicode ('S' or 'U')")             # <<<<<<<<<<<<<<
 *     b = numpy.array(tuple(a.tostring().decode(default_encoding)),dtype+'1')
 *     b.shape = a.shape + (a.itemsize,)
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":84
 *     dtype = b.dtype.kind
 *     if dtype not in ["S","U"]:
 *         raise ValueError("type must string or unicode ('S' or 'U')")             # <<<<<<<<<<<<<<
 *     bs = b.tostring().decode(default_encoding)
 *     slen = int(b.shape[-1])
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_type_must_string_or_unicode_S_or); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":88
 *     slen = int(b.shape[-1])
 *     a = numpy.array([bs[n1:n1+slen] for n1 in range(0,len(bs),slen)],dtype+repr(slen))
 *     a.shape = b.shape[:-1]             # <<<<<<<<<<<<<<
 *     return a
 * 
 */
  __pyx_slice__7 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__7);
  __Pyx_GIVEREF(__pyx_slice__7);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":387
 *         # can be used like a CDF instance.
 *         if isinstance(files, str):
 *             if files.startswith('http'):             # <<<<<<<<<<<<<<
 *                 msg='cannot using file globbing for remote (OPeNDAP) datasets'
 *                 raise ValueError(msg)
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_n_s_http); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":449
 *         # Make sure each file defines the same aggregation variables as the master
 *         # and that the variables are defined in the same way (name, shape and type)
 *         for f in files[1:]:             # <<<<<<<<<<<<<<
 *             part = Dataset(f)
 *             varInfo = part.variables
 */
  __pyx_slice__9 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__9);
  __Pyx_GIVEREF(__pyx_slice__9);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":460
 *                     #if not vInst.dimensions[0] != aggDimName:
 * 
 *                     masterDims, masterShape, masterType = masterRecVar[v][:3]             # <<<<<<<<<<<<<<
 *                     extDims, extShape, extType = varInfo[v][:3]
 *                     extDims = varInfo[v].dimensions
 */
  __pyx_slice__10 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__10);
  __Pyx_GIVEREF(__pyx_slice__10);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":461
 * 
 *                     masterDims, masterShape, masterType = masterRecVar[v][:3]
 *                     extDims, extShape, extType = varInfo[v][:3]             # <<<<<<<<<<<<<<
 *                     extDims = varInfo[v].dimensions
 *                     extShape = varInfo[v].shape
 */
  __pyx_slice__11 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__11);
  __Pyx_GIVEREF(__pyx_slice__11);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":478
 *                                        "master %s (%s) and extension %s (%s)" %
 *                                        (v, master, len(masterShape), f, len(extShape)))
 *                     if masterShape[1:] != extShape[1:]:             # <<<<<<<<<<<<<<
 *                         raise IOError("variable %s : shape mismatch between "
 *                                        "master %s (%s) and extension %s (%s)" %
 */
  __pyx_slice__12 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__12);
  __Pyx_GIVEREF(__pyx_slice__12);
  __pyx_slice__13 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__13);
  __Pyx_GIVEREF(__pyx_slice__13);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":519
 *         for dset in self._cdf:
 *             if dset.file_format == '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_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_MFNetCDF4_only_works_with_NETCDF); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":619
 *     def _shape(self):
 *         recdimlen = len(self._dset.dimensions[self._recdimname])
 *         return (recdimlen,) + self._mastervar.shape[1:]             # <<<<<<<<<<<<<<
 *     def set_auto_maskandscale(self,val):
 *         for v in self._recVar:
 */
  __pyx_slice__17 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__17);
  __Pyx_GIVEREF(__pyx_slice__17);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":640
 *         # 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_tuple__18 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":641
 *         # put_ind for this dimension is set to -1 by _StartCountStride.
 *         squeeze = data.ndim * [slice(None),]
 *         for i,n in enumerate(put_ind.shape[:-1]):             # <<<<<<<<<<<<<<
 *             if n == 1 and put_ind[...,i].ravel()[0] == -1:
 *                 squeeze[i] = 0
 */
  __pyx_slice__19 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__19)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__19);
  __Pyx_GIVEREF(__pyx_slice__19);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":658
 *             count = [abs(cnt) for cnt in count]
 *             if (numpy.array(stride) < 0).any():
 *                 raise IndexError('negative strides not allowed when slicing MFVariable Variable instance')             # <<<<<<<<<<<<<<
 *             # Start, stop and step along 1st dimension, eg the unlimited
 *             # dimension.
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_negative_strides_not_allowed_whe); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":682
 * 
 *             # 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_tuple__21 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":783
 *         for t in self._recVar:
 *             if not hasattr(t,'calendar'):
 *                 raise ValueError('MFTime requires that the time variable in all files have a calendar attribute')             # <<<<<<<<<<<<<<
 * 
 *         # Check that calendar is the same in all files.
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_time_va); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":787
 *         # Check that calendar is the same in all files.
 *         if len(set([t.calendar for t in self._recVar])) > 1:
 *             raise ValueError('MFTime requires that the same time calendar is used by all files.')             # <<<<<<<<<<<<<<
 * 
 *         # Override units if units is specified.
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_MFTime_requires_that_the_same_ti); if (unlikely(!__pyx_tuple__23)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":793
 * 
 *         # Reference date to compute the difference between different time units.
 *         ref_date = datetime.datetime(1900,1,1)             # <<<<<<<<<<<<<<
 *         ref_num = date2num(ref_date, self.units, self.calendar)
 * 
 */
  __pyx_tuple__24 = PyTuple_Pack(3, __pyx_int_1900, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "netCDF4.pyx":950
 *         else:
 *             pstring =\
 *             value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')             # <<<<<<<<<<<<<<
 *         return pstring
 *     elif att_type == NC_STRING:
 */
  __pyx_tuple__26 = PyTuple_Pack(2, __pyx_kp_s__25, __pyx_kp_s__16); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "netCDF4.pyx":955
 *         if att_len == 1:
 *             ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
 *             pstring = stratt.decode(default_encoding,unicode_error).replace('\x00','')             # <<<<<<<<<<<<<<
 *             return pstring
 *         else:
 */
  __pyx_tuple__27 = PyTuple_Pack(2, __pyx_kp_s__25, __pyx_kp_s__16); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "netCDF4.pyx":958
 *             return pstring
 *         else:
 *             raise KeyError('vlen string array attributes not supported')             # <<<<<<<<<<<<<<
 *     else:
 *     # a regular numeric or compound type.
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_vlen_string_array_attributes_not); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "netCDF4.pyx":1049
 *     # if 64-bit datatype not supported, cast to 32 bit integers.
 *     fmt = _get_format(grp._grpid)
 *     is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC'             # <<<<<<<<<<<<<<
 *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\
 *        is_netcdf3):
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_NETCDF3); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "netCDF4.pyx":1050
 *     fmt = _get_format(grp._grpid)
 *     is_netcdf3 = fmt.startswith('NETCDF3') or fmt == 'NETCDF4_CLASSIC'
 *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\             # <<<<<<<<<<<<<<
 *        is_netcdf3):
 *         value_arr = value_arr.astype('i4')
 */
  __pyx_slice__30 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__30);
  __Pyx_GIVEREF(__pyx_slice__30);

  /* "netCDF4.pyx":1052
 *     if value_arr.dtype.str[1:] == 'i8' and ('i8' not in _supportedtypes or\
 *        is_netcdf3):
 *         value_arr = value_arr.astype('i4')             # <<<<<<<<<<<<<<
 *     # if array contains strings, write a text attribute.
 *     if value_arr.dtype.char in ['S','U']:
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_i4); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "netCDF4.pyx":1069
 *         if value_arr.dtype.kind == 'V': # compound attribute.
 *             xtype = _find_cmptype(grp,value_arr.dtype)
 *         elif value_arr.dtype.str[1:] not in _supportedtypes:             # <<<<<<<<<<<<<<
 *             raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:])
 *         else:
 */
  __pyx_slice__32 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__32);
  __Pyx_GIVEREF(__pyx_slice__32);

  /* "netCDF4.pyx":1070
 *             xtype = _find_cmptype(grp,value_arr.dtype)
 *         elif value_arr.dtype.str[1:] not in _supportedtypes:
 *             raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:])             # <<<<<<<<<<<<<<
 *         else:
 *             xtype = _nptonctype[value_arr.dtype.str[1:]]
 */
  __pyx_slice__33 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__33);
  __Pyx_GIVEREF(__pyx_slice__33);

  /* "netCDF4.pyx":1072
 *             raise TypeError, 'illegal data type for attribute, must be one of %s, got %s' % (_supportedtypes, value_arr.dtype.str[1:])
 *         else:
 *             xtype = _nptonctype[value_arr.dtype.str[1:]]             # <<<<<<<<<<<<<<
 *         lenarr = PyArray_SIZE(value_arr)
 *         ierr = nc_put_att(grp._grpid, varid, attname, xtype, lenarr, value_arr.data)
 */
  __pyx_slice__34 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__34);
  __Pyx_GIVEREF(__pyx_slice__34);

  /* "netCDF4.pyx":1536
 *         [_tostr(self.variables[varname].dtype)+' \033[4m'+_tostr(varname)+'\033[0m'+
 *         (((_tostr(self.variables[varname].dimensions)
 *         .replace("u'",""))\             # <<<<<<<<<<<<<<
 *         .replace("'",""))\
 *         .replace(", ",","))\
 */
  __pyx_tuple__35 = PyTuple_Pack(2, __pyx_kp_s_u, __pyx_kp_s__16); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "netCDF4.pyx":1537
 *         (((_tostr(self.variables[varname].dimensions)
 *         .replace("u'",""))\
 *         .replace("'",""))\             # <<<<<<<<<<<<<<
 *         .replace(", ",","))\
 *         .replace(",)",")") for varname in self.variables.keys()])
 */
  __pyx_tuple__37 = PyTuple_Pack(2, __pyx_kp_s__36, __pyx_kp_s__16); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "netCDF4.pyx":1538
 *         .replace("u'",""))\
 *         .replace("'",""))\
 *         .replace(", ",","))\             # <<<<<<<<<<<<<<
 *         .replace(",)",")") for varname in self.variables.keys()])
 *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
 */
  __pyx_tuple__40 = PyTuple_Pack(2, __pyx_kp_s__38, __pyx_kp_s__39); if (unlikely(!__pyx_tuple__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "netCDF4.pyx":1539
 *         .replace("'",""))\
 *         .replace(", ",","))\
 *         .replace(",)",")") for varname in self.variables.keys()])             # <<<<<<<<<<<<<<
 *         grpnames = tuple([_tostr(grpname) for grpname in self.groups.keys()])
 *         if self.path == '/':
 */
  __pyx_tuple__43 = PyTuple_Pack(2, __pyx_kp_s__41, __pyx_kp_s__42); if (unlikely(!__pyx_tuple__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "netCDF4.pyx":1916
 *         if name not in _private_atts:
 *             self.setncattr(name, value)
 *         elif not name.endswith('__'):             # <<<<<<<<<<<<<<
 *             if hasattr(self,name):
 *                 raise AttributeError(
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_n_s__44); if (unlikely(!__pyx_tuple__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "netCDF4.pyx":1926
 *         # if name in _private_atts, it is stored at the python
 *         # level and not in the netCDF file.
 *         if name.startswith('__') and name.endswith('__'):             # <<<<<<<<<<<<<<
 *             # if __dict__ requested, return a dict with netCDF attributes.
 *             if name == '__dict__':
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_n_s__44); if (unlikely(!__pyx_tuple__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_n_s__44); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "netCDF4.pyx":2132
 * 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)')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_cannot_close_a_L_Group_only_appl); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "netCDF4.pyx":2457
 *             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__53 = PyTuple_Pack(1, __pyx_kp_s_Variable_length_strings_are_only); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "netCDF4.pyx":2467
 *             # 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__54 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__54);
  __Pyx_GIVEREF(__pyx_slice__54);

  /* "netCDF4.pyx":2471
 *             # 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__55 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__55);
  __Pyx_GIVEREF(__pyx_slice__55);

  /* "netCDF4.pyx":2507
 *             # 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__56 = PyTuple_Pack(1, __pyx_n_s_NETCDF4); if (unlikely(!__pyx_tuple__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "netCDF4.pyx":2549
 *                         icontiguous = NC_CONTIGUOUS
 *                         if chunksizes is not None:
 *                             raise ValueError('cannot specify chunksizes for a contiguous dataset')             # <<<<<<<<<<<<<<
 *                     else:
 *                         icontiguous = NC_CHUNKED
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_cannot_specify_chunksizes_for_a); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "netCDF4.pyx":2557
 *                         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__58 = PyTuple_Pack(1, __pyx_kp_s_chunksizes_must_be_a_sequence_wi); if (unlikely(!__pyx_tuple__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "netCDF4.pyx":2599
 *                         _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__59 = PyTuple_Pack(1, __pyx_kp_s_cannot_set__FillValue_attribute); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "netCDF4.pyx":2672
 *                     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__60 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__60);
  __Pyx_GIVEREF(__pyx_slice__60);

  /* "netCDF4.pyx":2673
 *                 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__61 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__61);
  __Pyx_GIVEREF(__pyx_slice__61);

  /* "netCDF4.pyx":2727
 *             return shape
 *         def __set__(self,value):
 *             raise AttributeError("shape cannot be altered")             # <<<<<<<<<<<<<<
 * 
 *     property size:
 */
  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_shape_cannot_be_altered); if (unlikely(!__pyx_tuple__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "netCDF4.pyx":2739
 *             return self._getdims()
 *         def __set__(self,value):
 *             raise AttributeError("dimensions cannot be altered")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_dimensions_cannot_be_altered); if (unlikely(!__pyx_tuple__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "netCDF4.pyx":2944
 *                 value = numpy.array(value, self.dtype)
 *             self.setncattr(name, value)
 *         elif not name.endswith('__'):             # <<<<<<<<<<<<<<
 *             if hasattr(self,name):
 *                 raise AttributeError(
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s__44); if (unlikely(!__pyx_tuple__64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "netCDF4.pyx":2954
 *         # 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__65 = PyTuple_Pack(1, __pyx_n_s__44); if (unlikely(!__pyx_tuple__65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_s__44); if (unlikely(!__pyx_tuple__66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "netCDF4.pyx":3002
 *         # 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_tuple__67 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "netCDF4.pyx":3003
 *         # 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__68 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__68);
  __Pyx_GIVEREF(__pyx_slice__68);

  /* "netCDF4.pyx":3126
 *              # 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 = default_fillvals[self.dtype.str[1:]]
 *                  has_fillval = data == fillval
 */
  __pyx_slice__69 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__69);
  __Pyx_GIVEREF(__pyx_slice__69);

  /* "netCDF4.pyx":3127
 *              # value unless a _FillValue attribute is set explicitly."
 *              if no_fill != 1 and self.dtype.str[1:] not in ['u1','i1']:
 *                  fillval = default_fillvals[self.dtype.str[1:]]             # <<<<<<<<<<<<<<
 *                  has_fillval = data == fillval
 *                  # if data is an array scalar, has_fillval will be a boolean.
 */
  __pyx_slice__70 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__70);
  __Pyx_GIVEREF(__pyx_slice__70);

  /* "netCDF4.pyx":3153
 *         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__71 = PyTuple_Pack(1, __pyx_kp_s_assign_vlen_method_only_for_use); if (unlikely(!__pyx_tuple__71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "netCDF4.pyx":3165
 *                     elem = self.shape[0]+elem
 *                 else:
 *                     raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
 *         elif isinstance(elem, tuple):
 *             if len(elem) != ndims:
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "netCDF4.pyx":3168
 *         elif isinstance(elem, tuple):
 *             if len(elem) != ndims:
 *                 raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
 *             elemnew = []
 *             for n,e in enumerate(elem):
 */
  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "netCDF4.pyx":3176
 *                     enew = self.shape[n]+e
 *                     if enew < 0:
 *                         raise IndexError("Illegal index")             # <<<<<<<<<<<<<<
 *                     else:
 *                         elemnew.append(self.shape[n]+e)
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_Illegal_index); if (unlikely(!__pyx_tuple__74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "netCDF4.pyx":3324
 *                         fillval = self._FillValue
 *                     else:
 *                         fillval = default_fillvals[self.dtype.str[1:]]             # <<<<<<<<<<<<<<
 *                     data = data.filled(fill_value=fillval)
 * 
 */
  __pyx_slice__75 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__75);
  __Pyx_GIVEREF(__pyx_slice__75);

  /* "netCDF4.pyx":3351
 * 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__76 = PyTuple_Pack(1, __pyx_kp_s_to_assign_values_to_a_non_scalar); if (unlikely(!__pyx_tuple__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "netCDF4.pyx":3352
 *         if len(self.dimensions):
 *             raise IndexError('to assign values to a non-scalar variable, use a slice')
 *         self[:]=val             # <<<<<<<<<<<<<<
 * 
 *     def getValue(self):
 */
  __pyx_slice__77 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__77);
  __Pyx_GIVEREF(__pyx_slice__77);

  /* "netCDF4.pyx":3361
 * 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__78 = PyTuple_Pack(1, __pyx_kp_s_to_retrieve_values_from_a_non_sc); if (unlikely(!__pyx_tuple__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "netCDF4.pyx":3362
 *         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_tuple__79 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "netCDF4.pyx":3500
 *                 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_tuple__80 = PyTuple_Pack(3, Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);

  /* "netCDF4.pyx":3504
 *                 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_tuple__81 = PyTuple_Pack(3, Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_tuple__81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "netCDF4.pyx":3510
 *         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__82 = PyTuple_Pack(1, __pyx_kp_s_size_of_data_array_does_not_conf); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "netCDF4.pyx":3524
 *             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__83 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "netCDF4.pyx":3526
 *                     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__84 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);

  /* "netCDF4.pyx":3529
 *             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__85 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);

  /* "netCDF4.pyx":3531
 *                     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__86 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "netCDF4.pyx":3534
 *             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__87 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "netCDF4.pyx":3536
 *                     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__88 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);

  /* "netCDF4.pyx":3548
 *         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__89 = PyTuple_Pack(1, __pyx_kp_s_data_to_put_in_string_variable_m); if (unlikely(!__pyx_tuple__89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);

  /* "netCDF4.pyx":3567
 *                                        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__90 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "netCDF4.pyx":3583
 *                     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__91 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__91);
  __Pyx_GIVEREF(__pyx_slice__91);

  /* "netCDF4.pyx":3595
 *                                        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__92 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_vlen_v); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "netCDF4.pyx":3620
 *         for lendim in count:
 *             if lendim == -1:
 *                 shapeout = shapeout + (1,)             # <<<<<<<<<<<<<<
 *                 squeeze_out = True
 *             else:
 */
  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "netCDF4.pyx":3638
 *                 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_tuple__94 = PyTuple_Pack(3, Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "netCDF4.pyx":3642
 *                 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_tuple__95 = PyTuple_Pack(3, Py_None, Py_None, __pyx_int_1); if (unlikely(!__pyx_tuple__95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);

  /* "netCDF4.pyx":3672
 *                 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__96 = PyTuple_Pack(1, __pyx_kp_s_strides_must_all_be_1_for_string); if (unlikely(!__pyx_tuple__96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "netCDF4.pyx":3695
 *                                        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__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 = 3695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "netCDF4.pyx":3814
 *         if format.kind != 'V': # scalar primitive type
 *             try:
 *                 xtype_tmp = _nptonctype[format.str[1:]]             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 raise ValueError('Unsupported compound type element')
 */
  __pyx_slice__98 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__98);
  __Pyx_GIVEREF(__pyx_slice__98);

  /* "netCDF4.pyx":3816
 *                 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__99 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "netCDF4.pyx":3838
 *                 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__100 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__100);
  __Pyx_GIVEREF(__pyx_slice__100);

  /* "netCDF4.pyx":3840
 *                         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__101 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_compound_type_elemen); if (unlikely(!__pyx_tuple__101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "netCDF4.pyx":3877
 *             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__102 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "netCDF4.pyx":3879
 *             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__103 = PyTuple_Pack(1, __pyx_kp_s_cannot_find_compound_type_in_thi); if (unlikely(!__pyx_tuple__103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "netCDF4.pyx":3934
 *                 field_type = _read_compound(group, field_typeid)
 *             else:
 *                 raise KeyError('compound field of an unsupported data type')             # <<<<<<<<<<<<<<
 *         if field_shape != ():
 *             formats.append((field_type,field_shape))
 */
  __pyx_tuple__104 = PyTuple_Pack(1, __pyx_kp_s_compound_field_of_an_unsupported); 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);

  /* "netCDF4.pyx":4025
 *         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__105 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__105);
  __Pyx_GIVEREF(__pyx_slice__105);

  /* "netCDF4.pyx":4028
 *             # 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__106 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__106);
  __Pyx_GIVEREF(__pyx_slice__106);

  /* "netCDF4.pyx":4033
 *                raise RuntimeError((<char *>nc_strerror(ierr)).decode('ascii'))
 *         else:
 *             raise KeyError("unsupported datatype specified for VLEN")             # <<<<<<<<<<<<<<
 *     return xtype, dt
 * 
 */
  __pyx_tuple__107 = PyTuple_Pack(1, __pyx_kp_s_unsupported_datatype_specified_f); if (unlikely(!__pyx_tuple__107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "netCDF4.pyx":4056
 *             dt = numpy.dtype(_nctonptype[base_xtype]) # see if it is a primitive type
 *         except KeyError:
 *             raise KeyError("unsupported component type for VLEN")             # <<<<<<<<<<<<<<
 *     return VLType(group, dt, name, typeid=xtype)
 * 
 */
  __pyx_tuple__108 = PyTuple_Pack(1, __pyx_kp_s_unsupported_component_type_for_V); if (unlikely(!__pyx_tuple__108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);

  /* "netCDF4.pyx":806
 *         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__109 = PyTuple_Pack(1, __pyx_kp_s_please_install_ordereddict_https); if (unlikely(!__pyx_tuple__109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "netCDF4.pyx":825
 * 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__111 = PyTuple_Pack(1, __pyx_kp_s__110); if (unlikely(!__pyx_tuple__111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);

  /* "netCDF4.pyx":826
 * 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__112 = PyTuple_Pack(1, __pyx_kp_s_requires_numpy_version_1_0rc1_or); if (unlikely(!__pyx_tuple__112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":3
 * from datetime import timedelta, datetime
 * 
 * gregorian = datetime(1582,10,15)             # <<<<<<<<<<<<<<
 * 
 * def _dateparse(timestr):
 */
  __pyx_tuple__113 = PyTuple_Pack(3, __pyx_int_1582, __pyx_int_10, __pyx_int_15); if (unlikely(!__pyx_tuple__113)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":5
 * gregorian = datetime(1582,10,15)
 * 
 * def _dateparse(timestr):             # <<<<<<<<<<<<<<
 *     """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,
 *     return a datetime instance"""
 */
  __pyx_tuple__114 = PyTuple_Pack(9, __pyx_n_s_timestr, __pyx_n_s_dparse, __pyx_n_s_tzutc, __pyx_n_s_msg, __pyx_n_s_timestr_split, __pyx_n_s_units, __pyx_n_s_n, __pyx_n_s_isostring, __pyx_n_s_basedate); if (unlikely(!__pyx_tuple__114)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_dateparse, 5, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":28
 * # utility functions (visible from python).
 * 
 * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
 *     """
 * stringtoarr(a, NUMCHARS,dtype='S')
 */
  __pyx_tuple__116 = PyTuple_Pack(4, __pyx_n_s_string, __pyx_n_s_NUMCHARS, __pyx_n_s_dtype, __pyx_n_s_arr); if (unlikely(!__pyx_tuple__116)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_stringtoarr, 28, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":51
 *     return arr
 * 
 * def stringtochar(a):             # <<<<<<<<<<<<<<
 *     """
 * stringtochar(a)
 */
  __pyx_tuple__118 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_n_s_dtype, __pyx_n_s_b); if (unlikely(!__pyx_tuple__118)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);
  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_stringtochar, 51, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":70
 *     return b
 * 
 * def chartostring(b):             # <<<<<<<<<<<<<<
 *     """
 * chartostring(b)
 */
  __pyx_tuple__120 = 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__120)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_chartostring, 70, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":91
 *     return a
 * 
 * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
 *     """
 * date2num(dates,units,calendar='standard')
 */
  __pyx_tuple__122 = PyTuple_Pack(15, __pyx_n_s_dates, __pyx_n_s_units, __pyx_n_s_calendar, __pyx_n_s_unit, __pyx_n_s_basedate, __pyx_n_s_tzutc, __pyx_n_s_msg, __pyx_n_s_isscalar, __pyx_n_s_ismasked, __pyx_n_s_mask, __pyx_n_s_times, __pyx_n_s_date, __pyx_n_s_td, __pyx_n_s_totaltime, __pyx_n_s_cdftime); if (unlikely(!__pyx_tuple__122)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_date2num, 91, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":168
 *         return cdftime.date2num(dates)
 * 
 * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
 *     """
 * num2date(times,units,calendar='standard')
 */
  __pyx_tuple__124 = PyTuple_Pack(20, __pyx_n_s_times, __pyx_n_s_units, __pyx_n_s_calendar, __pyx_n_s_unit, __pyx_n_s_basedate, __pyx_n_s_tzutc, __pyx_n_s_msg, __pyx_n_s_isscalar, __pyx_n_s_ismasked, __pyx_n_s_mask, __pyx_n_s_dates, __pyx_n_s_time, __pyx_n_s_tsecs, __pyx_n_s_days, __pyx_n_s_msecsd, __pyx_n_s_secs, __pyx_n_s_msecs, __pyx_n_s_td, __pyx_n_s_date, __pyx_n_s_cdftime); if (unlikely(!__pyx_tuple__124)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(3, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_num2date, 168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":260
 *         return cdftime.num2date(times)
 * 
 * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
 *     """
 * date2index(dates, nctime, calendar=None, select='exact')
 */
  __pyx_tuple__126 = PyTuple_Pack(9, __pyx_n_s_dates, __pyx_n_s_nctime, __pyx_n_s_calendar, __pyx_n_s_select, __pyx_n_s_unit, __pyx_n_s_basedate, __pyx_n_s_tzutc, __pyx_n_s_msg, __pyx_n_s_times); if (unlikely(!__pyx_tuple__126)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_date2index, 260, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":308
 *         return netcdftime.date2index(dates, nctime, calendar, select)
 * 
 * def getlibversion():             # <<<<<<<<<<<<<<
 *     """
 * getlibversion()
 */
  __pyx_codeobj__128 = (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_Volumes_DataCaddy_python_netcdf, __pyx_n_s_getlibversion, 308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":349
 *     """
 * 
 *     def __init__(self, files, check=False, aggdim=None, exclude=[]):             # <<<<<<<<<<<<<<
 *         """
 * Open a Dataset spanning multiple files, making it look as if it was a
 */
  __pyx_tuple__129 = 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_varInfo, __pyx_n_s_masterDims, __pyx_n_s_masterShape, __pyx_n_s_masterType, __pyx_n_s_extDims, __pyx_n_s_extShape, __pyx_n_s_extType, __pyx_n_s_vInst, __pyx_n_s_varname, __pyx_n_s_var, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__129)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(5, 0, 36, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_init, 349, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":522
 *             self._file_format.append(dset.file_format)
 * 
 *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
 *         """override base class attribute creation"""
 *         self.__dict__[name] = value
 */
  __pyx_tuple__131 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__131)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 522; __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, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_setattr, 522, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":526
 *         self.__dict__[name] = value
 * 
 *     def __getattribute__(self, name):             # <<<<<<<<<<<<<<
 *         if name in ['variables','dimensions','file_format','groups']:
 *             if name == 'dimensions': return self._dims
 */
  __pyx_tuple__133 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__133)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_getattribute, 526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":535
 *             return Dataset.__getattribute__(self, name)
 * 
 *     def ncattrs(self):             # <<<<<<<<<<<<<<
 *         return self._cdf[0].__dict__.keys()
 * 
 */
  __pyx_tuple__135 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__135)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 535; __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, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_ncattrs, 535, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":538
 *         return self._cdf[0].__dict__.keys()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         for dset in self._cdf:
 *             dset.close()
 */
  __pyx_tuple__137 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__137)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);
  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_close, 538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":542
 *             dset.close()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         ncdump = ['%r\n' % type(self)]
 *         dimnames = tuple([str(dimname) for dimname in self.dimensions.keys()])
 */
  __pyx_tuple__139 = 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__139)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_str_2, 542, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":560
 * 
 * class _Dimension(object):
 *     def __init__(self, dimname, dim, dimlens, dimtotlen):             # <<<<<<<<<<<<<<
 *         self.dimlens = dimlens
 *         self.dimtotlen = dimtotlen
 */
  __pyx_tuple__141 = 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__141)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_init, 560, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":564
 *         self.dimtotlen = dimtotlen
 *         self._name = dimname
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.dimtotlen
 *     def isunlimited(self):
 */
  __pyx_tuple__143 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__143)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_len, 564, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":566
 *     def __len__(self):
 *         return self.dimtotlen
 *     def isunlimited(self):             # <<<<<<<<<<<<<<
 *         return True
 *     def __str__(self):
 */
  __pyx_tuple__145 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__145)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_isunlimited, 566, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":568
 *     def isunlimited(self):
 *         return True
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         if self.isunlimited():
 *             return repr(type(self))+" (unlimited): name = '%s', size = %s\n" % (self._name,len(self))
 */
  __pyx_tuple__147 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__147)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_str_2, 568, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":575
 * 
 * class _Variable(object):
 *     def __init__(self, dset, varname, var, recdimname):             # <<<<<<<<<<<<<<
 *         self.dimensions = var.dimensions
 *         self._dset = dset
 */
  __pyx_tuple__149 = 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__149)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_init, 575, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":588
 *         for name, value in var.__dict__.items():
 *             self.__dict__[name] = value
 *     def typecode(self):             # <<<<<<<<<<<<<<
 *         return self.dtype
 *     def ncattrs(self):
 */
  __pyx_tuple__151 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__151)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_typecode, 588, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":590
 *     def typecode(self):
 *         return self.dtype
 *     def ncattrs(self):             # <<<<<<<<<<<<<<
 *         return self._mastervar.__dict__.keys()
 *     def __getattr__(self,name):
 */
  __pyx_tuple__153 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__153)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_ncattrs, 590, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":592
 *     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__155 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__155)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_getattr, 592, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":599
 *         except:
 *             raise AttributeError(name)
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         ncdump_var = ['%r\n' % type(self)]
 *         dimnames = tuple([str(dimname) for dimname in self.dimensions])
 */
  __pyx_tuple__157 = 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__157)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 599; __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, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_str_2, 599, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":615
 *         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__159 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__159)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 615; __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_Volumes_DataCaddy_python_netcdf, __pyx_n_s_len, 615, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":617
 *     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__161 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_recdimlen); if (unlikely(!__pyx_tuple__161)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 617; __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, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_shape_2, 617, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":620
 *         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__163 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_val, __pyx_n_s_v); if (unlikely(!__pyx_tuple__163)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_set_auto_maskandscale, 620, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":623
 *         for v in self._recVar:
 *             v.set_auto_maskandscale(val)
 *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
 *         """Get records from a concatenated set of variables."""
 * 
 */
  __pyx_tuple__165 = 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_n_s_fill_value, __pyx_n_s_numv); if (unlikely(!__pyx_tuple__165)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(2, 0, 30, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_getitem, 623, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":763
 *     """
 * 
 *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
 *         """
 * Create a time Variable with units consistent across a multifile
 */
  __pyx_tuple__167 = 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__167)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_init, 763, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__169 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__169)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":809
 * 
 * 
 *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
 *         return self.__time[elem] + self.__delta[elem]
 */
  __pyx_tuple__170 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__170)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf, __pyx_n_s_getitem, 809, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":837
 * # check for required version of netcdf-4 and hdf5.
 * 
 * def _gethdf5libversion():             # <<<<<<<<<<<<<<
 *     majorvers = H5_VERS_MAJOR
 *     minorvers = H5_VERS_MINOR
 */
  __pyx_tuple__172 = PyTuple_Pack(4, __pyx_n_s_majorvers, __pyx_n_s_minorvers, __pyx_n_s_releasevers, __pyx_n_s_patchstring); if (unlikely(!__pyx_tuple__172)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);
  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf_2, __pyx_n_s_gethdf5libversion, 837, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":883
 *                      'f8':NC_FILL_DOUBLE}
 * 
 * is_native_little = numpy.dtype('<f4').byteorder == '='             # <<<<<<<<<<<<<<
 * is_native_big = numpy.dtype('>f4').byteorder == '='
 * 
 */
  __pyx_tuple__174 = PyTuple_Pack(1, __pyx_kp_s_f4_2); if (unlikely(!__pyx_tuple__174)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);

  /* "netCDF4.pyx":884
 * 
 * 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__175 = PyTuple_Pack(1, __pyx_kp_s_f4_3); if (unlikely(!__pyx_tuple__175)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);

  /* "netCDF4.pyx":984
 *             return value_arr
 * 
 * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
 *     # Private function to set the netCDF file format
 *     if format == 'NETCDF4':
 */
  __pyx_tuple__176 = PyTuple_Pack(1, __pyx_n_s_format); if (unlikely(!__pyx_tuple__176)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Volumes_DataCaddy_python_netcdf_2, __pyx_n_s_set_default_format, 984, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_float_24_ = PyFloat_FromDouble(24.); if (unlikely(!__pyx_float_24_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_float_1_e3 = PyFloat_FromDouble(1.e3); if (unlikely(!__pyx_float_1_e3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_float_1_e6 = PyFloat_FromDouble(1.e6); if (unlikely(!__pyx_float_1_e6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_float_3600_ = PyFloat_FromDouble(3600.); if (unlikely(!__pyx_float_3600_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_float_86400_ = PyFloat_FromDouble(86400.); if (unlikely(!__pyx_float_86400_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_1582 = PyInt_FromLong(1582); if (unlikely(!__pyx_int_1582)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_1900 = PyInt_FromLong(1900); if (unlikely(!__pyx_int_1900)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_3600 = PyInt_FromLong(3600); if (unlikely(!__pyx_int_3600)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initnetCDF4(void); /*proto*/
PyMODINIT_FUNC initnetCDF4(void)
#else
PyMODINIT_FUNC PyInit_netCDF4(void); /*proto*/
PyMODINIT_FUNC PyInit_netCDF4(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  PyObject *(*__pyx_t_17)(PyObject *);
  PyObject *(*__pyx_t_18)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_netCDF4(void)", 0);
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("netCDF4"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_Introduction_Python_interface_t), 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  if (__pyx_module_is_main_netCDF4) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!PyDict_GetItemString(modules, "netCDF4")) {
      if (unlikely(PyDict_SetItemString(modules, "netCDF4", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  __pyx_ptype_7netCDF4_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_7netCDF4_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyType_Ready(&__pyx_type_7netCDF4_Dataset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_7netCDF4_Dataset.tp_print = 0;
  if (__Pyx_SetAttrString(__pyx_m, "Dataset", (PyObject *)&__pyx_type_7netCDF4_Dataset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __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 = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_7netCDF4_Group.tp_print = 0;
  if (__Pyx_SetAttrString(__pyx_m, "Group", (PyObject *)&__pyx_type_7netCDF4_Group) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2064; __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 = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_7netCDF4_Dimension.tp_print = 0;
  if (__Pyx_SetAttrString(__pyx_m, "Dimension", (PyObject *)&__pyx_type_7netCDF4_Dimension) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2135; __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 = 2258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_7netCDF4_Variable.tp_print = 0;
  if (__Pyx_SetAttrString(__pyx_m, "Variable", (PyObject *)&__pyx_type_7netCDF4_Variable) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2258; __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 = 3725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_7netCDF4_CompoundType.tp_print = 0;
  if (__Pyx_SetAttrString(__pyx_m, "CompoundType", (PyObject *)&__pyx_type_7netCDF4_CompoundType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3725; __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 = 3949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_7netCDF4_VLType.tp_print = 0;
  if (__Pyx_SetAttrString(__pyx_m, "VLType", (PyObject *)&__pyx_type_7netCDF4_VLType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7netCDF4_VLType = &__pyx_type_7netCDF4_VLType;
  /*--- Type import code ---*/
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "netCDF4.pyx":791
 * 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 = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":792
 * 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 = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":797
 * 
 * # pure python utilities
 * from netCDF4_utils import _StartCountStride, _quantize, _find_dim, _walk_grps, \             # <<<<<<<<<<<<<<
 *                           _out_array_shape, _sortbylist, _tostr
 * # try to use built-in ordered dict in python >= 2.7
 */
  __pyx_t_1 = PyList_New(7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_StartCountStride);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_StartCountStride);
  __Pyx_GIVEREF(__pyx_n_s_StartCountStride);
  __Pyx_INCREF(__pyx_n_s_quantize);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_quantize);
  __Pyx_GIVEREF(__pyx_n_s_quantize);
  __Pyx_INCREF(__pyx_n_s_find_dim);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_find_dim);
  __Pyx_GIVEREF(__pyx_n_s_find_dim);
  __Pyx_INCREF(__pyx_n_s_walk_grps);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_walk_grps);
  __Pyx_GIVEREF(__pyx_n_s_walk_grps);
  __Pyx_INCREF(__pyx_n_s_out_array_shape);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_out_array_shape);
  __Pyx_GIVEREF(__pyx_n_s_out_array_shape);
  __Pyx_INCREF(__pyx_n_s_sortbylist);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_sortbylist);
  __Pyx_GIVEREF(__pyx_n_s_sortbylist);
  __Pyx_INCREF(__pyx_n_s_tostr);
  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_tostr);
  __Pyx_GIVEREF(__pyx_n_s_tostr);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_netCDF4_utils, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __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 = 797; __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 = 797; __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 = 797; __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 = 797; __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 = 797; __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 = 797; __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 = 797; __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 = 797; __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 = 797; __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 = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_sortbylist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __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 = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tostr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __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 = 798; __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":800
 *                           _out_array_shape, _sortbylist, _tostr
 * # try to use built-in ordered dict in python >= 2.7
 * try:             # <<<<<<<<<<<<<<
 *     from collections import OrderedDict
 * except ImportError: # or else use drop-in substitute
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "netCDF4.pyx":801
 * # 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 = 801; __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 = 801; __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 = 801; __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 = 801; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "netCDF4.pyx":802
 * try:
 *     from collections import OrderedDict
 * except ImportError: # or else use drop-in substitute             # <<<<<<<<<<<<<<
 *     try:
 *         from ordereddict import OrderedDict
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("netCDF4", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __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":803
 *     from collections import OrderedDict
 * except ImportError: # or else use drop-in substitute
 *     try:             # <<<<<<<<<<<<<<
 *         from ordereddict import OrderedDict
 *     except ImportError:
 */
      {
        __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        /*try:*/ {

          /* "netCDF4.pyx":804
 * 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 = 804; __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 = 804; __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 = 804; __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 = 804; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L19_try_end;
        __pyx_L12_error:;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

        /* "netCDF4.pyx":805
 *     try:
 *         from ordereddict import OrderedDict
 *     except ImportError:             # <<<<<<<<<<<<<<
 *         raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')
 * try:
 */
        __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
        if (__pyx_t_6) {
          __Pyx_AddTraceback("netCDF4", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_11, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __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":806
 *         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__109, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; __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 = 806; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          goto __pyx_L13_exception_handled;
        }
        goto __pyx_L14_except_error;
        __pyx_L14_except_error:;
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        goto __pyx_L4_except_error;
        __pyx_L13_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_L19_try_end:;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L3_exception_handled;
    }
    goto __pyx_L4_except_error;
    __pyx_L4_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L3_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    __pyx_L9_try_end:;
  }

  /* "netCDF4.pyx":807
 *     except ImportError:
 *         raise ImportError('please install ordereddict (https://pypi.python.org/pypi/ordereddict)')
 * try:             # <<<<<<<<<<<<<<
 *     from itertools import izip as zip
 * except ImportError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "netCDF4.pyx":808
 *         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 = 808; __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 = 808; __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 = 808; __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 = 808; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L29_try_end;
    __pyx_L22_error:;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "netCDF4.pyx":809
 * try:
 *     from itertools import izip as zip
 * except ImportError:             # <<<<<<<<<<<<<<
 *     # python3: zip is already python2's itertools.izip
 *     pass
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      PyErr_Restore(0,0,0);
      goto __pyx_L23_exception_handled;
    }
    goto __pyx_L24_except_error;
    __pyx_L24_except_error:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L23_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    __pyx_L29_try_end:;
  }

  /* "netCDF4.pyx":813
 *     pass
 * 
 * __version__ = "1.1.1"             # <<<<<<<<<<<<<<
 * 
 * # Initialize numpy
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_1_1_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":816
 * 
 * # 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 = 816; __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 = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":817
 * # 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 = 817; __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 = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":818
 * 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 = 818; __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 = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":819
 * 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 = 819; __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 = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":820
 * 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 = 820; __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 = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":821
 * 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 = 821; __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 = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":822
 * 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 = 822; __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 = 822; __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 = 822; __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 = 822; __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":823
 * 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 = 823; __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 = 823; __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 = 823; __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 = 823; __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":824
 * 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 = 824; __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 = 824; __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 = 824; __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 = 824; __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":825
 * 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 = 825; __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 = 825; __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__111, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_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 = 825; __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 = 825; __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 = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_15) {

    /* "netCDF4.pyx":826
 * 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__112, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "netCDF4.pyx":827
 * 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();

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":1
 * from datetime import timedelta, datetime             # <<<<<<<<<<<<<<
 * 
 * gregorian = datetime(1582,10,15)
 */
  __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_s_timedelta);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_timedelta);
  __Pyx_GIVEREF(__pyx_n_s_timedelta);
  __Pyx_INCREF(__pyx_n_s_datetime);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_datetime);
  __Pyx_GIVEREF(__pyx_n_s_datetime);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_7, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_timedelta); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_timedelta, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":3
 * from datetime import timedelta, datetime
 * 
 * gregorian = datetime(1582,10,15)             # <<<<<<<<<<<<<<
 * 
 * def _dateparse(timestr):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gregorian, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":5
 * gregorian = datetime(1582,10,15)
 * 
 * def _dateparse(timestr):             # <<<<<<<<<<<<<<
 *     """parse a string of the form time-units since yyyy-mm-dd hh:mm:ss,
 *     return a datetime instance"""
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_1_dateparse, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dateparse, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":28
 * # utility functions (visible from python).
 * 
 * def stringtoarr(string,NUMCHARS,dtype='S'):             # <<<<<<<<<<<<<<
 *     """
 * stringtoarr(a, NUMCHARS,dtype='S')
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_3stringtoarr, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtoarr, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":51
 *     return arr
 * 
 * def stringtochar(a):             # <<<<<<<<<<<<<<
 *     """
 * stringtochar(a)
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_5stringtochar, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_stringtochar, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":70
 *     return b
 * 
 * def chartostring(b):             # <<<<<<<<<<<<<<
 *     """
 * chartostring(b)
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_7chartostring, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chartostring, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":91
 *     return a
 * 
 * def date2num(dates,units,calendar='standard'):             # <<<<<<<<<<<<<<
 *     """
 * date2num(dates,units,calendar='standard')
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_9date2num, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2num, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":168
 *         return cdftime.date2num(dates)
 * 
 * def num2date(times,units,calendar='standard'):             # <<<<<<<<<<<<<<
 *     """
 * num2date(times,units,calendar='standard')
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_11num2date, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_num2date, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":260
 *         return cdftime.num2date(times)
 * 
 * def date2index(dates, nctime, calendar=None, select='exact'):             # <<<<<<<<<<<<<<
 *     """
 * date2index(dates, nctime, calendar=None, select='exact')
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_13date2index, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_date2index, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":308
 *         return netcdftime.date2index(dates, nctime, calendar, select)
 * 
 * def getlibversion():             # <<<<<<<<<<<<<<
 *     """
 * getlibversion()
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_15getlibversion, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getlibversion, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":317
 *     return (<char *>nc_inq_libvers()).decode('ascii')
 * 
 * class MFDataset(Dataset):             # <<<<<<<<<<<<<<
 *     """
 * MFDataset(self, files, check=False, aggdim=None, exclude=[])
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_7netCDF4_Dataset)));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_MFDataset, __pyx_n_s_MFDataset, (PyObject *) NULL, __pyx_n_s_netCDF4, __pyx_kp_s_MFDataset_self_files_check_Fals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":349
 *     """
 * 
 *     def __init__(self, files, check=False, aggdim=None, exclude=[]):             # <<<<<<<<<<<<<<
 *         """
 * Open a Dataset spanning multiple files, making it look as if it was a
 */
  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9MFDataset_1__init__, 0, __pyx_n_s_MFDataset___init, NULL, __pyx_n_s_netCDF4, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_13, sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_13)->__pyx_arg_exclude = __pyx_t_11;
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_13, __pyx_pf_7netCDF4_9MFDataset_12__defaults__);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":522
 *             self._file_format.append(dset.file_format)
 * 
 *     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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__132)); 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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":526
 *         self.__dict__[name] = value
 * 
 *     def __getattribute__(self, name):             # <<<<<<<<<<<<<<
 *         if name in ['variables','dimensions','file_format','groups']:
 *             if name == 'dimensions': return self._dims
 */
  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_9MFDataset_5__getattribute__, 0, __pyx_n_s_MFDataset___getattribute, NULL, __pyx_n_s_netCDF4, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__134)); 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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":535
 *             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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 535; __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 = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":538
 *         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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __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 = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":542
 *             dset.close()
 * 
 *     def __str__(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__str__, 0, __pyx_n_s_MFDataset___str, NULL, __pyx_n_s_netCDF4, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__140)); 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_str_2, __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":317
 *     return (<char *>nc_inq_libvers()).decode('ascii')
 * 
 * class MFDataset(Dataset):             # <<<<<<<<<<<<<<
 *     """
 * MFDataset(self, files, check=False, aggdim=None, exclude=[])
 */
  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_MFDataset, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFDataset, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":559
 *         return ''.join(ncdump)
 * 
 * class _Dimension(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, dimname, dim, dimlens, dimtotlen):
 *         self.dimlens = dimlens
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_Dimension, __pyx_n_s_Dimension, (PyObject *) NULL, __pyx_n_s_netCDF4, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":560
 * 
 * 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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 560; __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 = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":564
 *         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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__144)); 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 (PyObject_SetItem(__pyx_t_1, __pyx_n_s_len, __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":566
 *     def __len__(self):
 *         return self.dimtotlen
 *     def isunlimited(self):             # <<<<<<<<<<<<<<
 *         return True
 *     def __str__(self):
 */
  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_10_Dimension_5isunlimited, 0, __pyx_n_s_Dimension_isunlimited, NULL, __pyx_n_s_netCDF4, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 566; __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 = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":568
 *     def isunlimited(self):
 *         return True
 *     def __str__(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__str__, 0, __pyx_n_s_Dimension___str, NULL, __pyx_n_s_netCDF4, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_str_2, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":559
 *         return ''.join(ncdump)
 * 
 * class _Dimension(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, dimname, dim, dimlens, dimtotlen):
 *         self.dimlens = dimlens
 */
  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Dimension, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 559; __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 = 559; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":574
 *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
 * 
 * class _Variable(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, dset, varname, var, recdimname):
 *         self.dimensions = var.dimensions
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_Variable, __pyx_n_s_Variable, (PyObject *) NULL, __pyx_n_s_netCDF4, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":575
 * 
 * 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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 575; __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 = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":588
 *         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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 588; __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 = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":590
 *     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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 590; __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 = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":592
 *     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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 592; __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 = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":599
 *         except:
 *             raise AttributeError(name)
 *     def __str__(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__str__, 0, __pyx_n_s_Variable___str, NULL, __pyx_n_s_netCDF4, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_str_2, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":615
 *         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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 615; __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 = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":617
 *     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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 617; __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 = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":620
 *         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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__164)); 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_set_auto_maskandscale, __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":623
 *         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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 623; __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 = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":574
 *             return repr(type(self))+": name = '%s', size = %s\n" % (self._name,len(self))
 * 
 * class _Variable(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, dset, varname, var, recdimname):
 *         self.dimensions = var.dimensions
 */
  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Variable, __pyx_t_7, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 574; __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 = 574; __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;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":727
 * 
 * 
 * class MFTime(_Variable):             # <<<<<<<<<<<<<<
 *     """
 * MFTime(self, time, units=None)
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Variable); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_2, __pyx_n_s_MFTime, __pyx_n_s_MFTime, (PyObject *) NULL, __pyx_n_s_netCDF4, __pyx_kp_s_MFTime_self_time_units_None_Cla); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":763
 *     """
 * 
 *     def __init__(self, time, units=None):             # <<<<<<<<<<<<<<
 *         """
 * Create a time Variable with units consistent across a multifile
 */
  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_6MFTime_1__init__, 0, __pyx_n_s_MFTime___init, NULL, __pyx_n_s_netCDF4, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_13, __pyx_tuple__169);
  if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_13) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":809
 * 
 * 
 *     def __getitem__(self, elem):             # <<<<<<<<<<<<<<
 *         return self.__time[elem] + self.__delta[elem]
 */
  __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_7netCDF4_6MFTime_3__getitem__, 0, __pyx_n_s_MFTime___getitem, NULL, __pyx_n_s_netCDF4, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 809; __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 = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "/Volumes/DataCaddy/python/netcdf4-python.jswhit.git/utils.pyx":727
 * 
 * 
 * class MFTime(_Variable):             # <<<<<<<<<<<<<<
 *     """
 * MFTime(self, time, units=None)
 */
  __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_MFTime, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 727; __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 = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":837
 * # check for required version of netcdf-4 and hdf5.
 * 
 * def _gethdf5libversion():             # <<<<<<<<<<<<<<
 *     majorvers = H5_VERS_MAJOR
 *     minorvers = H5_VERS_MINOR
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_17_gethdf5libversion, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gethdf5libversion, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":847
 *        return '%d.%d.%d-%s' % (majorvers,minorvers,releasevers,patchstring)
 * 
 * __netcdf4libversion__ = getlibversion().split()[0]             # <<<<<<<<<<<<<<
 * __hdf5libversion__ = _gethdf5libversion()
 * __has_rename_grp__ = HAS_RENAME_GRP
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_getlibversion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); 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);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __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 = 847; __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_empty_tuple, NULL); 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);
  __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 = 847; __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_netcdf4libversion, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":848
 * 
 * __netcdf4libversion__ = getlibversion().split()[0]
 * __hdf5libversion__ = _gethdf5libversion()             # <<<<<<<<<<<<<<
 * __has_rename_grp__ = HAS_RENAME_GRP
 * __has_nc_inq_path__ = HAS_NC_INQ_PATH
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_gethdf5libversion); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_hdf5libversion, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "netCDF4.pyx":849
 * __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 = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":850
 * __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 = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":851
 * __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 = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":856
 * # numpy data type <--> netCDF 4 data type mapping.
 * 
 * _nptonctype  = {'U1' : NC_CHAR,             # <<<<<<<<<<<<<<
 *                 'S1' : NC_CHAR,
 *                 'i1' : NC_BYTE,
 */
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_CHAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_U1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":857
 * 
 * _nptonctype  = {'U1' : NC_CHAR,
 *                 'S1' : NC_CHAR,             # <<<<<<<<<<<<<<
 *                 'i1' : NC_BYTE,
 *                 'u1' : NC_UBYTE,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_CHAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_S1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":858
 * _nptonctype  = {'U1' : NC_CHAR,
 *                 'S1' : NC_CHAR,
 *                 'i1' : NC_BYTE,             # <<<<<<<<<<<<<<
 *                 'u1' : NC_UBYTE,
 *                 'i2' : NC_SHORT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_BYTE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_i1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":859
 *                 'S1' : NC_CHAR,
 *                 'i1' : NC_BYTE,
 *                 'u1' : NC_UBYTE,             # <<<<<<<<<<<<<<
 *                 'i2' : NC_SHORT,
 *                 'u2' : NC_USHORT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_UBYTE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_u1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":860
 *                 'i1' : NC_BYTE,
 *                 'u1' : NC_UBYTE,
 *                 'i2' : NC_SHORT,             # <<<<<<<<<<<<<<
 *                 'u2' : NC_USHORT,
 *                 'i4' : NC_INT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_SHORT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_i2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":861
 *                 'u1' : NC_UBYTE,
 *                 'i2' : NC_SHORT,
 *                 'u2' : NC_USHORT,             # <<<<<<<<<<<<<<
 *                 'i4' : NC_INT,
 *                 'u4' : NC_UINT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_USHORT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_u2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":862
 *                 'i2' : NC_SHORT,
 *                 'u2' : NC_USHORT,
 *                 'i4' : NC_INT,             # <<<<<<<<<<<<<<
 *                 'u4' : NC_UINT,
 *                 'i8' : NC_INT64,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_INT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_i4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":863
 *                 'u2' : NC_USHORT,
 *                 'i4' : NC_INT,
 *                 'u4' : NC_UINT,             # <<<<<<<<<<<<<<
 *                 'i8' : NC_INT64,
 *                 'u8' : NC_UINT64,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_UINT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_u4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":864
 *                 'i4' : NC_INT,
 *                 'u4' : NC_UINT,
 *                 'i8' : NC_INT64,             # <<<<<<<<<<<<<<
 *                 'u8' : NC_UINT64,
 *                 'f4' : NC_FLOAT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_INT64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_i8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":865
 *                 'u4' : NC_UINT,
 *                 'i8' : NC_INT64,
 *                 'u8' : NC_UINT64,             # <<<<<<<<<<<<<<
 *                 'f4' : NC_FLOAT,
 *                 'f8' : NC_DOUBLE}
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_UINT64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_u8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":866
 *                 'i8' : NC_INT64,
 *                 'u8' : NC_UINT64,
 *                 'f4' : NC_FLOAT,             # <<<<<<<<<<<<<<
 *                 'f8' : NC_DOUBLE}
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_FLOAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_f4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":867
 *                 'u8' : NC_UINT64,
 *                 'f4' : NC_FLOAT,
 *                 'f8' : NC_DOUBLE}             # <<<<<<<<<<<<<<
 * 
 * default_fillvals = {#'S1':NC_FILL_CHAR,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_DOUBLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_f8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nptonctype, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "netCDF4.pyx":869
 *                 'f8' : NC_DOUBLE}
 * 
 * default_fillvals = {#'S1':NC_FILL_CHAR,             # <<<<<<<<<<<<<<
 *                      'U1':'\0',
 *                      'S1':'\0',
 */
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_U1, __pyx_kp_s__25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_S1, __pyx_kp_s__25) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":872
 *                      'U1':'\0',
 *                      'S1':'\0',
 *                      'i1':NC_FILL_BYTE,             # <<<<<<<<<<<<<<
 *                      'u1':NC_FILL_UBYTE,
 *                      'i2':NC_FILL_SHORT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_FILL_BYTE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_i1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":873
 *                      'S1':'\0',
 *                      'i1':NC_FILL_BYTE,
 *                      'u1':NC_FILL_UBYTE,             # <<<<<<<<<<<<<<
 *                      'i2':NC_FILL_SHORT,
 *                      'u2':NC_FILL_USHORT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_FILL_UBYTE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_u1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":874
 *                      'i1':NC_FILL_BYTE,
 *                      'u1':NC_FILL_UBYTE,
 *                      'i2':NC_FILL_SHORT,             # <<<<<<<<<<<<<<
 *                      'u2':NC_FILL_USHORT,
 *                      'i4':NC_FILL_INT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_FILL_SHORT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_i2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":875
 *                      'u1':NC_FILL_UBYTE,
 *                      'i2':NC_FILL_SHORT,
 *                      'u2':NC_FILL_USHORT,             # <<<<<<<<<<<<<<
 *                      'i4':NC_FILL_INT,
 *                      'u4':NC_FILL_UINT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(NC_FILL_USHORT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_u2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":876
 *                      'i2':NC_FILL_SHORT,
 *                      'u2':NC_FILL_USHORT,
 *                      'i4':NC_FILL_INT,             # <<<<<<<<<<<<<<
 *                      'u4':NC_FILL_UINT,
 *                      'i8':NC_FILL_INT64,
 */
  __pyx_t_2 = __Pyx_PyInt_From_long(NC_FILL_INT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_i4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":877
 *                      'u2':NC_FILL_USHORT,
 *                      'i4':NC_FILL_INT,
 *                      'u4':NC_FILL_UINT,             # <<<<<<<<<<<<<<
 *                      'i8':NC_FILL_INT64,
 *                      'u8':NC_FILL_UINT64,
 */
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_long(NC_FILL_UINT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_u4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":878
 *                      'i4':NC_FILL_INT,
 *                      'u4':NC_FILL_UINT,
 *                      'i8':NC_FILL_INT64,             # <<<<<<<<<<<<<<
 *                      'u8':NC_FILL_UINT64,
 *                      'f4':NC_FILL_FLOAT,
 */
  __pyx_t_2 = __Pyx_PyInt_From_PY_LONG_LONG(NC_FILL_INT64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_i8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":879
 *                      'u4':NC_FILL_UINT,
 *                      'i8':NC_FILL_INT64,
 *                      'u8':NC_FILL_UINT64,             # <<<<<<<<<<<<<<
 *                      'f4':NC_FILL_FLOAT,
 *                      'f8':NC_FILL_DOUBLE}
 */
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_PY_LONG_LONG(NC_FILL_UINT64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_u8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":880
 *                      'i8':NC_FILL_INT64,
 *                      'u8':NC_FILL_UINT64,
 *                      'f4':NC_FILL_FLOAT,             # <<<<<<<<<<<<<<
 *                      'f8':NC_FILL_DOUBLE}
 * 
 */
  __pyx_t_2 = PyFloat_FromDouble(NC_FILL_FLOAT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_f4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":881
 *                      'u8':NC_FILL_UINT64,
 *                      'f4':NC_FILL_FLOAT,
 *                      'f8':NC_FILL_DOUBLE}             # <<<<<<<<<<<<<<
 * 
 * is_native_little = numpy.dtype('<f4').byteorder == '='
 */
  __pyx_t_2 = PyFloat_FromDouble(NC_FILL_DOUBLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_f8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_fillvals, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "netCDF4.pyx":883
 *                      'f8':NC_FILL_DOUBLE}
 * 
 * is_native_little = numpy.dtype('<f4').byteorder == '='             # <<<<<<<<<<<<<<
 * is_native_big = numpy.dtype('>f4').byteorder == '='
 * 
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __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__174, NULL); 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);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __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__49, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_native_little, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "netCDF4.pyx":884
 * 
 * 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_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); 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);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__175, NULL); 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);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_byteorder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s__49, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_native_big, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "netCDF4.pyx":888
 * # 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 = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":892
 * # 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 = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":895
 * # 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 = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "netCDF4.pyx":896
 * # can be set to 'strict' or 'ignore'.
 * unicode_error = 'replace'
 * python3 = sys.version_info[0] > 2             # <<<<<<<<<<<<<<
 * 
 * _nctonptype = {}
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); 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);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __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_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_python3, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":898
 * python3 = sys.version_info[0] > 2
 * 
 * _nctonptype = {}             # <<<<<<<<<<<<<<
 * for _key,_value in _nptonctype.items():
 *     _nctonptype[_value] = _key
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nctonptype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "netCDF4.pyx":899
 * 
 * _nctonptype = {}
 * for _key,_value in _nptonctype.items():             # <<<<<<<<<<<<<<
 *     _nctonptype[_value] = _key
 * _supportedtypes = _nptonctype.keys()
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nptonctype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); 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);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_16 = 0;
    __pyx_t_17 = NULL;
  } else {
    __pyx_t_16 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_17 = Py_TYPE(__pyx_t_7)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_17 && PyList_CheckExact(__pyx_t_7)) {
      if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_7)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_17 && PyTuple_CheckExact(__pyx_t_7)) {
      if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_7, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_17(__pyx_t_7);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __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 = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_13 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_13);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __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 = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_18 = Py_TYPE(__pyx_t_11)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_18(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L33_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_13 = __pyx_t_18(__pyx_t_11); if (unlikely(!__pyx_t_13)) goto __pyx_L33_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_13);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_18 = NULL;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L34_unpacking_done;
      __pyx_L33_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_18 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __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 = 899; __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 = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    /* "netCDF4.pyx":900
 * _nctonptype = {}
 * for _key,_value in _nptonctype.items():
 *     _nctonptype[_value] = _key             # <<<<<<<<<<<<<<
 * _supportedtypes = _nptonctype.keys()
 * # make sure NC_CHAR points to S1
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __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 = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyObject_SetItem(__pyx_t_13, __pyx_t_1, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __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;

  /* "netCDF4.pyx":901
 * 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 = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_supportedtypes, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "netCDF4.pyx":903
 * _supportedtypes = _nptonctype.keys()
 * # make sure NC_CHAR points to S1
 * _nctonptype[NC_CHAR]='S1'             # <<<<<<<<<<<<<<
 * 
 * # internal C functions.
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nctonptype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (unlikely(__Pyx_SetItemInt(__pyx_t_7, NC_CHAR, __pyx_n_s_S1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "netCDF4.pyx":984
 *             return value_arr
 * 
 * def _set_default_format(object format='NETCDF4'):             # <<<<<<<<<<<<<<
 *     # Private function to set the netCDF file format
 *     if format == 'NETCDF4':
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_7netCDF4_19_set_default_format, NULL, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_format, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "netCDF4.pyx":1275
 * 
 * _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']
 */
  __pyx_t_7 = PyList_New(24); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_s_grpid);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_grpid);
  __Pyx_GIVEREF(__pyx_n_s_grpid);
  __Pyx_INCREF(__pyx_n_s_grp);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_grp);
  __Pyx_GIVEREF(__pyx_n_s_grp);
  __Pyx_INCREF(__pyx_n_s_varid);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_n_s_varid);
  __Pyx_GIVEREF(__pyx_n_s_varid);
  __Pyx_INCREF(__pyx_n_s_groups);
  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_n_s_groups);
  __Pyx_GIVEREF(__pyx_n_s_groups);
  __Pyx_INCREF(__pyx_n_s_dimensions);
  PyList_SET_ITEM(__pyx_t_7, 4, __pyx_n_s_dimensions);
  __Pyx_GIVEREF(__pyx_n_s_dimensions);
  __Pyx_INCREF(__pyx_n_s_variables);
  PyList_SET_ITEM(__pyx_t_7, 5, __pyx_n_s_variables);
  __Pyx_GIVEREF(__pyx_n_s_variables);
  __Pyx_INCREF(__pyx_n_s_dtype);
  PyList_SET_ITEM(__pyx_t_7, 6, __pyx_n_s_dtype);
  __Pyx_GIVEREF(__pyx_n_s_dtype);
  __Pyx_INCREF(__pyx_n_s_data_model);
  PyList_SET_ITEM(__pyx_t_7, 7, __pyx_n_s_data_model);
  __Pyx_GIVEREF(__pyx_n_s_data_model);
  __Pyx_INCREF(__pyx_n_s_disk_format);
  PyList_SET_ITEM(__pyx_t_7, 8, __pyx_n_s_disk_format);
  __Pyx_GIVEREF(__pyx_n_s_disk_format);
  __Pyx_INCREF(__pyx_n_s_nunlimdim);
  PyList_SET_ITEM(__pyx_t_7, 9, __pyx_n_s_nunlimdim);
  __Pyx_GIVEREF(__pyx_n_s_nunlimdim);
  __Pyx_INCREF(__pyx_n_s_path);
  PyList_SET_ITEM(__pyx_t_7, 10, __pyx_n_s_path);
  __Pyx_GIVEREF(__pyx_n_s_path);
  __Pyx_INCREF(__pyx_n_s_parent);
  PyList_SET_ITEM(__pyx_t_7, 11, __pyx_n_s_parent);
  __Pyx_GIVEREF(__pyx_n_s_parent);
  __Pyx_INCREF(__pyx_n_s_ndim);
  PyList_SET_ITEM(__pyx_t_7, 12, __pyx_n_s_ndim);
  __Pyx_GIVEREF(__pyx_n_s_ndim);
  __Pyx_INCREF(__pyx_n_s_mask);
  PyList_SET_ITEM(__pyx_t_7, 13, __pyx_n_s_mask);
  __Pyx_GIVEREF(__pyx_n_s_mask);
  __Pyx_INCREF(__pyx_n_s_scale);
  PyList_SET_ITEM(__pyx_t_7, 14, __pyx_n_s_scale);
  __Pyx_GIVEREF(__pyx_n_s_scale);
  __Pyx_INCREF(__pyx_n_s_cmptypes);
  PyList_SET_ITEM(__pyx_t_7, 15, __pyx_n_s_cmptypes);
  __Pyx_GIVEREF(__pyx_n_s_cmptypes);
  __Pyx_INCREF(__pyx_n_s_vltypes);
  PyList_SET_ITEM(__pyx_t_7, 16, __pyx_n_s_vltypes);
  __Pyx_GIVEREF(__pyx_n_s_vltypes);
  __Pyx_INCREF(__pyx_n_s_isprimitive);
  PyList_SET_ITEM(__pyx_t_7, 17, __pyx_n_s_isprimitive);
  __Pyx_GIVEREF(__pyx_n_s_isprimitive);
  __Pyx_INCREF(__pyx_n_s_file_format_2);
  PyList_SET_ITEM(__pyx_t_7, 18, __pyx_n_s_file_format_2);
  __Pyx_GIVEREF(__pyx_n_s_file_format_2);
  __Pyx_INCREF(__pyx_n_s_isvlen);
  PyList_SET_ITEM(__pyx_t_7, 19, __pyx_n_s_isvlen);
  __Pyx_GIVEREF(__pyx_n_s_isvlen);
  __Pyx_INCREF(__pyx_n_s_iscompound);
  PyList_SET_ITEM(__pyx_t_7, 20, __pyx_n_s_iscompound);
  __Pyx_GIVEREF(__pyx_n_s_iscompound);
  __Pyx_INCREF(__pyx_n_s_cmptype);
  PyList_SET_ITEM(__pyx_t_7, 21, __pyx_n_s_cmptype);
  __Pyx_GIVEREF(__pyx_n_s_cmptype);
  __Pyx_INCREF(__pyx_n_s_vltype);
  PyList_SET_ITEM(__pyx_t_7, 22, __pyx_n_s_vltype);
  __Pyx_GIVEREF(__pyx_n_s_vltype);
  __Pyx_INCREF(__pyx_n_s_keepweakref);
  PyList_SET_ITEM(__pyx_t_7, 23, __pyx_n_s_keepweakref);
  __Pyx_GIVEREF(__pyx_n_s_keepweakref);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_private_atts, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "netCDF4.pyx":4059
 *     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.
 */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  if (__pyx_m) {
    __Pyx_AddTraceback("init netCDF4", __pyx_clineno, __pyx_lineno, __pyx_filename);
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init netCDF4");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
#else
    PyErr_GetExcInfo(type, value, tb);
#endif
}
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(type, value, tb);
#endif
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_COMPILING_IN_CPYTHON
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
#if PY_VERSION_HEX >= 0x02060000
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
#endif
    result = (*call)(func, arg, kw);
#if PY_VERSION_HEX >= 0x02060000
    Py_LeaveRecursiveCall();
#endif
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_Restore(type, value, tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(type, value, tb);
#endif
}

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    #if PY_VERSION_HEX < 0x02050000
    if (PyClass_Check(type)) {
    #else
    if (PyType_Check(type)) {
    #endif
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        #if PY_VERSION_HEX < 0x02050000
        if (PyInstance_Check(type)) {
            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
            Py_INCREF(type);
        } else {
            type = 0;
            PyErr_SetString(PyExc_TypeError,
                "raise: exception must be an old-style class or instance");
            goto raise_error;
        }
        #else
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
        #endif
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else /* Python 3+ */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                if (PyObject_IsSubclass(instance_class, type)) {
                    type = instance_class;
                } else {
                    instance_class = NULL;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
#if PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
                        PyErr_Clear();
                    else
                        return NULL;
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        #if CYTHON_PEP393_ENABLED
        if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0))
            return -1;
        #endif
        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, length * kind);
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (PyErr_ExceptionMatches(PyExc_OverflowError))
                    PyErr_Clear();
                else
                    goto bad;
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_COMPILING_IN_CPYTHON
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON
    result = PyDict_GetItem(__pyx_d, name);
    if (result) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
        PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_ass_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (PyErr_ExceptionMatches(PyExc_OverflowError))
                    PyErr_Clear();
                else
                    goto bad;
            }
        }
        return ms->sq_ass_slice(obj, cstart, cstop, value);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_ass_subscript))
#endif
    {
        int result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_COMPILING_IN_CPYTHON
        result = mp->mp_ass_subscript(obj, py_slice, value);
#else
        result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object does not support slice %.10s",
        Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
bad:
    return -1;
}

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_COMPILING_IN_CPYTHON
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
            goto bad;
        PyErr_Clear();
        r = d;
        Py_INCREF(d);
    }
    return r;
bad:
    return NULL;
}

static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        length = strlen(cstring);
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    length = stop - start;
    if (unlikely(length <= 0))
        return PyUnicode_FromUnicode(NULL, 0);
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_PyObject_CallMethod1((PyObject*)&PyDict_Type, __pyx_n_s_keys, d);
    else
        return PyDict_Keys(d);
}

static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

#if !CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL)
}
#endif

static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
                        PyErr_Clear();
                    else
                        return -1;
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
#else
    if (is_list || PySequence_Check(o)) {
#endif
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
#if CYTHON_COMPILING_IN_PYPY
    float_value = PyNumber_Float(obj);
#else
    PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
    if (likely(nb) && likely(nb->nb_float)) {
        float_value = nb->nb_float(obj);
        if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
            PyErr_Format(PyExc_TypeError,
                "__float__ returned non-float (type %.200s)",
                Py_TYPE(float_value)->tp_name);
            Py_DECREF(float_value);
            goto bad;
        }
    } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
#if PY_MAJOR_VERSION >= 3
        float_value = PyFloat_FromString(obj);
#else
        float_value = PyFloat_FromString(obj, 0);
#endif
    } else {
        PyObject* args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        PyTuple_SET_ITEM(args, 0, obj);
        float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
        PyTuple_SET_ITEM(args, 0, 0);
        Py_DECREF(args);
    }
#endif
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
bad:
    return (double)-1;
}

static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
}
static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (likely(Py_TYPE(obj) == type)) return 1;
        #if PY_MAJOR_VERSION == 2
        else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(PyObject_TypeCheck(obj, type))) return 1;
    }
    __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
    return 0;
}

static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL)
        value = Py_None; /* Mark as deleted */
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    Py_DECREF(res);
    return 0;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
#ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
#define PY_WRITE_RESTRICTED WRITE_RESTRICTED
#endif
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    op->func_weakreflist = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyMem_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    if (m->func_weakreflist != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return PyMethod_New(func,
                            type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
#if CYTHON_COMPILING_IN_PYPY
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    Py_ssize_t size;
    switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
    case METH_VARARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0)
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 0)
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 1)
                return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
#else
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
	return PyCFunction_Call(func, arg, kw);
}
#endif
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/
    sizeof(__pyx_CyFunctionObject),   /*tp_basicsize*/
    0,                                  /*tp_itemsize*/
    (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/
    0,                                  /*tp_print*/
    0,                                  /*tp_getattr*/
    0,                                  /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
    0,                                  /*tp_compare*/
#else
    0,                                  /*reserved*/
#endif
    (reprfunc) __Pyx_CyFunction_repr,   /*tp_repr*/
    0,                                  /*tp_as_number*/
    0,                                  /*tp_as_sequence*/
    0,                                  /*tp_as_mapping*/
    0,                                  /*tp_hash*/
    __Pyx_CyFunction_Call,              /*tp_call*/
    0,                                  /*tp_str*/
    0,                                  /*tp_getattro*/
    0,                                  /*tp_setattro*/
    0,                                  /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
    0,                                  /*tp_doc*/
    (traverseproc) __Pyx_CyFunction_traverse,   /*tp_traverse*/
    (inquiry) __Pyx_CyFunction_clear,   /*tp_clear*/
    0,                                  /*tp_richcompare*/
    offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */
    0,                                  /*tp_iter*/
    0,                                  /*tp_iternext*/
    __pyx_CyFunction_methods,           /*tp_methods*/
    __pyx_CyFunction_members,           /*tp_members*/
    __pyx_CyFunction_getsets,           /*tp_getset*/
    0,                                  /*tp_base*/
    0,                                  /*tp_dict*/
    __Pyx_CyFunction_descr_get,         /*tp_descr_get*/
    0,                                  /*tp_descr_set*/
    offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
    0,                                  /*tp_init*/
    0,                                  /*tp_alloc*/
    0,                                  /*tp_new*/
    0,                                  /*tp_free*/
    0,                                  /*tp_is_gc*/
    0,                                  /*tp_bases*/
    0,                                  /*tp_mro*/
    0,                                  /*tp_cache*/
    0,                                  /*tp_subclasses*/
    0,                                  /*tp_weaklist*/
    0,                                  /*tp_del*/
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
#if PY_VERSION_HEX >= 0x030400a1
    0,                                  /*tp_finalize*/
#endif
};
static int __Pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (__pyx_CyFunctionType == NULL) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyMem_Malloc(size);
    if (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func)             \
    {                                                                     \
        func_type value = func(x);                                        \
        if (sizeof(target_type) < sizeof(func_type)) {                    \
            if (unlikely(value != (func_type) (target_type) value)) {     \
                func_type zero = 0;                                       \
                PyErr_SetString(PyExc_OverflowError,                      \
                    (is_unsigned && unlikely(value < zero)) ?             \
                    "can't convert negative value to " #target_type :     \
                    "value too large to convert to " #target_type);       \
                return (target_type) -1;                                  \
            }                                                             \
        }                                                                 \
        return (target_type) value;                                       \
    }

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG)
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to int");
                return (int) -1;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(int)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (int) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to int");
                return (int) -1;
            }
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong)
            } else if (sizeof(int) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong)
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(int)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(int) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(int) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong)
            } else if (sizeof(int) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong)
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_nc_type(nc_type value) {
    const nc_type neg_one = (nc_type) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(nc_type) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(nc_type) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(nc_type) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(nc_type) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(nc_type) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(nc_type),
                                     little, !is_unsigned);
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE nc_type __Pyx_PyInt_As_nc_type(PyObject *x) {
    const nc_type neg_one = (nc_type) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(nc_type) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(nc_type, long, PyInt_AS_LONG)
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to nc_type");
                return (nc_type) -1;
            }
            return (nc_type) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(nc_type)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (nc_type) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to nc_type");
                return (nc_type) -1;
            }
            if (sizeof(nc_type) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(nc_type, unsigned long, PyLong_AsUnsignedLong)
            } else if (sizeof(nc_type) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(nc_type, unsigned long long, PyLong_AsUnsignedLongLong)
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(nc_type)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(nc_type) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(nc_type) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (sizeof(nc_type) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(nc_type, long, PyLong_AsLong)
            } else if (sizeof(nc_type) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(nc_type, long long, PyLong_AsLongLong)
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            nc_type val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (nc_type) -1;
        }
    } else {
        nc_type val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (nc_type) -1;
        val = __Pyx_PyInt_As_nc_type(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_VERSION_HEX < 0x03030000
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    #if PY_VERSION_HEX >= 0x02050000
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                #if PY_VERSION_HEX < 0x03030000
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                #endif
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0; /* try absolute import on failure */
        }
        #endif
        if (!module) {
            #if PY_VERSION_HEX < 0x03030000
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
    #else
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    #if PY_VERSION_HEX < 0x03030000
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(long) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
    const unsigned long neg_one = (unsigned long) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(unsigned long) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(unsigned long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned long) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PY_LONG_LONG) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PY_LONG_LONG),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned PY_LONG_LONG) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned PY_LONG_LONG),
                                     little, !is_unsigned);
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
    const size_t neg_one = (size_t) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(size_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG)
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to size_t");
                return (size_t) -1;
            }
            return (size_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(size_t)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (size_t) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to size_t");
                return (size_t) -1;
            }
            if (sizeof(size_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(size_t, unsigned long, PyLong_AsUnsignedLong)
            } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(size_t, unsigned long long, PyLong_AsUnsignedLongLong)
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(size_t)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(size_t) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(size_t) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (sizeof(size_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(size_t, long, PyLong_AsLong)
            } else if (sizeof(size_t) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(size_t, long long, PyLong_AsLongLong)
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            size_t val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE ptrdiff_t __Pyx_PyInt_As_ptrdiff_t(PyObject *x) {
    const ptrdiff_t neg_one = (ptrdiff_t) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(ptrdiff_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(ptrdiff_t, long, PyInt_AS_LONG)
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to ptrdiff_t");
                return (ptrdiff_t) -1;
            }
            return (ptrdiff_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(ptrdiff_t)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (ptrdiff_t) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to ptrdiff_t");
                return (ptrdiff_t) -1;
            }
            if (sizeof(ptrdiff_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(ptrdiff_t, unsigned long, PyLong_AsUnsignedLong)
            } else if (sizeof(ptrdiff_t) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(ptrdiff_t, unsigned long long, PyLong_AsUnsignedLongLong)
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(ptrdiff_t)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(ptrdiff_t) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(ptrdiff_t) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (sizeof(ptrdiff_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(ptrdiff_t, long, PyLong_AsLong)
            } else if (sizeof(ptrdiff_t) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(ptrdiff_t, long long, PyLong_AsLongLong)
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            ptrdiff_t val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (ptrdiff_t) -1;
        }
    } else {
        ptrdiff_t val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (ptrdiff_t) -1;
        val = __Pyx_PyInt_As_ptrdiff_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_npy_intp(npy_intp value) {
    const npy_intp neg_one = (npy_intp) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(npy_intp) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(npy_intp) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(npy_intp) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(npy_intp) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(npy_intp) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(npy_intp),
                                     little, !is_unsigned);
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG)
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long) -1;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long) -1;
            }
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong)
            } else if (sizeof(long) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong)
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(long) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong)
            } else if (sizeof(long) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong)
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (!strict && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility",
            module_name, class_name);
        #if PY_VERSION_HEX < 0x02050000
        if (PyErr_Warn(NULL, warning) < 0) goto bad;
        #else
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
        #endif
    }
    else if ((size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s has the wrong size, try recompiling",
            module_name, class_name);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = (start + end) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,            /*int argcount,*/
        0,            /*int kwonlyargcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,      /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_globals = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
}
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
        char* defenc_c;
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
        if (!defenc) return NULL;
        defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        {
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
            char* c;
            for (c = defenc_c; c < end; c++) {
                if ((unsigned char) (*c) >= 128) {
                    PyUnicode_AsASCIIString(o);
                    return NULL;
                }
            }
        }
#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else /* PY_VERSION_HEX < 0x03030000 */
        if (PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_DATA_SIZE(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
        return PyUnicode_AsUTF8AndSize(o, length);
#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
#endif /* PY_VERSION_HEX < 0x03030000 */
    } else
#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII  || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
#if !CYTHON_COMPILING_IN_PYPY
#if PY_VERSION_HEX >= 0x02060000
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%.4s__ returned non-%.4s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b)))
      return PyInt_AS_LONG(b);
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
     #if CYTHON_USE_PYLONG_INTERNALS
       switch (Py_SIZE(b)) {
       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
       case  0: return 0;
       case  1: return ((PyLongObject*)b)->ob_digit[0];
       }
     #endif
    #endif
  #if PY_VERSION_HEX < 0x02060000
    return PyInt_AsSsize_t(b);
  #else
    return PyLong_AsSsize_t(b);
  #endif
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}


#endif /* Py_PYTHON_H */
