/* Generated by Cython 0.29.22 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "NPY_NO_DEPRECATED_API",
                "NPY_1_7_API_VERSION"
            ]
        ],
        "depends": [
            "/private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h",
            "/private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/core/include/numpy/arrayscalars.h",
            "/private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h",
            "/private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h",
            "/private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/core/include/numpy/ufuncobject.h"
        ],
        "extra_compile_args": [
            "-fno-strict-aliasing",
            "-O3"
        ],
        "include_dirs": [
            "/private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/core/include"
        ],
        "name": "S3netCDF4.CFA._CFAClasses",
        "sources": [
            "S3netCDF4/CFA/_CFAClasses.pyx"
        ]
    },
    "module_name": "S3netCDF4.CFA._CFAClasses"
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_22"
#define CYTHON_HEX_VERSION 0x001D16F0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#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_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#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
#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
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif 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

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #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)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #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
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#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_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #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)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #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_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #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]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#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
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? 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 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#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
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

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

#define __PYX_HAVE__S3netCDF4__CFA___CFAClasses
#define __PYX_HAVE_API__S3netCDF4__CFA___CFAClasses
/* Early includes */
#include <string.h>
#include <stdio.h>
#include "numpy/arrayobject.h"
#include "numpy/ndarrayobject.h"
#include "numpy/ndarraytypes.h"
#include "numpy/arrayscalars.h"
#include "numpy/ufuncobject.h"

    /* NumPy API declarations from "numpy/__init__.pxd" */
    
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#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 int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#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_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_ASSUME_SAFE_MACROS
#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
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

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

/* Header.proto */
#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif defined(_Complex_I)
    #define CYTHON_CCOMPLEX 1
  #else
    #define CYTHON_CCOMPLEX 0
  #endif
#endif
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #include <complex>
  #else
    #include <complex.h>
  #endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
  #undef _Complex_I
  #define _Complex_I 1.0fj
#endif


static const char *__pyx_f[] = {
  "S3netCDF4/CFA/_CFAClasses.pyx",
  "stringsource",
  "__init__.pxd",
  "type.pxd",
};

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":690
 * # in Cython to enable them only on the right systems.
 * 
 * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 */
typedef npy_int8 __pyx_t_5numpy_int8_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":691
 * 
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t
 */
typedef npy_int16 __pyx_t_5numpy_int16_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":692
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * #ctypedef npy_int96      int96_t
 */
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":693
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_int96      int96_t
 * #ctypedef npy_int128     int128_t
 */
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":697
 * #ctypedef npy_int128     int128_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 */
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":698
 * 
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t
 */
typedef npy_uint16 __pyx_t_5numpy_uint16_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":699
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * #ctypedef npy_uint96     uint96_t
 */
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":700
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_uint96     uint96_t
 * #ctypedef npy_uint128    uint128_t
 */
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":704
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":705
 * 
 * ctypedef npy_float32    float32_t
 * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_float80    float80_t
 * #ctypedef npy_float128   float128_t
 */
typedef npy_float64 __pyx_t_5numpy_float64_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":714
 * # The int types are mapped a bit surprising --
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t
 */
typedef npy_long __pyx_t_5numpy_int_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":715
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   longlong_t
 * 
 */
typedef npy_longlong __pyx_t_5numpy_long_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":716
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_ulong      uint_t
 */
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":718
 * ctypedef npy_longlong   longlong_t
 * 
 * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t
 */
typedef npy_ulong __pyx_t_5numpy_uint_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":719
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":720
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
 */
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":722
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":723
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":725
 * ctypedef npy_uintp      uintp_t
 * 
 * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t
 */
typedef npy_double __pyx_t_5numpy_float_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":726
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":727
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< float > __pyx_t_float_complex;
  #else
    typedef float _Complex __pyx_t_float_complex;
  #endif
#else
    typedef struct { float real, imag; } __pyx_t_float_complex;
#endif
static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

/* Declarations.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< double > __pyx_t_double_complex;
  #else
    typedef double _Complex __pyx_t_double_complex;
  #endif
#else
    typedef struct { double real, imag; } __pyx_t_double_complex;
#endif
static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);


/*--- Type declarations ---*/
struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset;
struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup;
struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable;
struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":729
 * ctypedef npy_longdouble longdouble_t
 * 
 * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t
 */
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":730
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":731
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cdouble     complex_t
 */
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":733
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;
struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_createGroup;
struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createVariable;
struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createDimension;
struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionValues;
struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writeInitialPartitionInfo;
struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___createNCPartition;

/* "S3netCDF4/CFA/_CFAClasses.pyx":135
 *         raise CFAError("Not permitted.")
 * 
 *     cpdef CFAGroup createGroup(CFADataset self, basestring grp_name,             # <<<<<<<<<<<<<<
 *                                dict metadata=dict()):
 *         """Create a group with the name grp_name.
 */
struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_createGroup {
  int __pyx_n;
  PyObject *metadata;
};

/* "S3netCDF4/CFA/_CFAClasses.pyx":371
 *                 dim.axis_type = "N"
 * 
 *     cpdef CFAVariable createVariable(CFAGroup self,             # <<<<<<<<<<<<<<
 *                          basestring var_name,
 *                          np.dtype nc_dtype,
 */
struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createVariable {
  int __pyx_n;
  PyObject *dim_names;
  PyArrayObject *subarray_shape;
  int max_subarray_size;
  PyObject *metadata;
};

/* "S3netCDF4/CFA/_CFAClasses.pyx":547
 *         return True
 * 
 *     cpdef CFADimension createDimension(CFAGroup self,             # <<<<<<<<<<<<<<
 *                           basestring dim_name="",
 *                           int dim_len=-1,
 */
struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createDimension {
  int __pyx_n;
  PyObject *dim_name;
  int dim_len;
  PyObject *axis_type;
  PyObject *metadata;
};

/* "S3netCDF4/CFA/_CFAClasses.pyx":946
 *         return self.pmdimensions
 * 
 *     cpdef getPartitionValues(CFAVariable self, key="location"):             # <<<<<<<<<<<<<<
 *         """Get the partition values for a particular element of the partition
 *         key = "location" | "index" | "ncvar" | "file" | "format" | "shape"
 */
struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionValues {
  int __pyx_n;
  PyObject *key;
};

/* "S3netCDF4/CFA/_CFAClasses.pyx":1049
 *         ncp.variables["pmshape"][:] = self.pmshape
 * 
 *     cpdef writeInitialPartitionInfo(CFAVariable self, basestring cfa_version,             # <<<<<<<<<<<<<<
 *                                     object nc_parent=None):
 *         """Set the partitions - this is a reference to a group contained in the
 */
struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writeInitialPartitionInfo {
  int __pyx_n;
  PyObject *nc_parent;
};

/* "S3netCDF4/CFA/_CFAClasses.pyx":1068
 *         # writePartition repeatedly
 * 
 *     cdef __createNCPartition(CFAVariable self, basestring cfa_version="0.5",             # <<<<<<<<<<<<<<
 *                               object nc_parent=None):
 *         """Create the datastructure in a netCDF file for the netCDF partition
 */
struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___createNCPartition {
  int __pyx_n;
  PyObject *cfa_version;
  PyObject *nc_parent;
};

/* "S3netCDF4/CFA/_CFAClasses.pyx":25
 * from S3netCDF4.CFA._CFASplitter import CFASplitter
 * 
 * cdef class CFADataset:             # <<<<<<<<<<<<<<
 *     """
 *        Class containing details of a CFADataset (master array)
 */
struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset {
  PyObject_HEAD
  struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_vtab;
  PyObject *name;
  PyObject *format;
  PyObject *cfa_groups;
  PyObject *metadata;
  PyObject *cfa_version;
};


/* "S3netCDF4/CFA/_CFAClasses.pyx":244
 * 
 * 
 * cdef class CFAGroup:             # <<<<<<<<<<<<<<
 *     """
 *         Class containing details of a CFAGroup (master array grouping)
 */
struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup {
  PyObject_HEAD
  struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_vtab;
  PyObject *grp_name;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *dataset;
  PyObject *metadata;
  PyObject *cfa_vars;
  PyObject *cfa_dims;
};


/* "S3netCDF4/CFA/_CFAClasses.pyx":628
 *                           "index location ncvar file format shape")
 * 
 * cdef class CFAVariable:             # <<<<<<<<<<<<<<
 *     """
 *         Class containing definition of a CFA Variable, containing CFASubarrays.
 */
struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable {
  PyObject_HEAD
  struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_vtab;
  PyObject *var_name;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *group;
  PyArray_Descr *nc_dtype;
  PyObject *metadata;
  PyObject *cf_role;
  PyObject *cfa_dimensions;
  PyObject *pmdimensions;
  PyArrayObject *pmshape;
  PyObject *base;
  PyArrayObject *_shape;
  PyObject *nc_partition_group;
  PyArrayObject *subarray_shape;
};


/* "S3netCDF4/CFA/_CFAClasses.pyx":1333
 *             self.pmdimensions = pm_dimensions.replace(" ", "").split(",")
 * 
 * cdef class CFADimension:             # <<<<<<<<<<<<<<
 *     """
 *         Class containing definition of a CFA Dimension.
 */
struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension {
  PyObject_HEAD
  struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_vtab;
  PyObject *dim_name;
  int dim_len;
  PyObject *metadata;
  PyObject *axis_type;
  PyArray_Descr *nc_dtype;
};



/* "S3netCDF4/CFA/_CFAClasses.pyx":25
 * from S3netCDF4.CFA._CFASplitter import CFASplitter
 * 
 * cdef class CFADataset:             # <<<<<<<<<<<<<<
 *     """
 *        Class containing details of a CFADataset (master array)
 */

struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADataset {
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *(*createGroup)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_createGroup *__pyx_optional_args);
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *(*getGroup)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*renameGroup)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*getName)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, int __pyx_skip_dispatch);
  PyObject *(*getGroups)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, int __pyx_skip_dispatch);
  PyObject *(*getMetadata)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, int __pyx_skip_dispatch);
  PyObject *(*getCFAVersion)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, int __pyx_skip_dispatch);
  PyObject *(*getFormat)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFADataset;


/* "S3netCDF4/CFA/_CFAClasses.pyx":244
 * 
 * 
 * cdef class CFAGroup:             # <<<<<<<<<<<<<<
 *     """
 *         Class containing details of a CFAGroup (master array grouping)
 */

struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup {
  PyObject *(*_ensure_axis_has_type)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *(*createVariable)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, PyArray_Descr *, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createVariable *__pyx_optional_args);
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *(*getVariable)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*getVariables)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, int __pyx_skip_dispatch);
  PyObject *(*renameVariable)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *(*createDimension)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createDimension *__pyx_optional_args);
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *(*getDimension)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*getDimensions)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, int __pyx_skip_dispatch);
  PyObject *(*renameDimension)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*getMetadata)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, int __pyx_skip_dispatch);
  PyObject *(*getName)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, int __pyx_skip_dispatch);
  PyObject *(*setName)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *(*getDataset)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup;


/* "S3netCDF4/CFA/_CFAClasses.pyx":628
 *                           "index location ncvar file format shape")
 * 
 * cdef class CFAVariable:             # <<<<<<<<<<<<<<
 *     """
 *         Class containing definition of a CFA Variable, containing CFASubarrays.
 */

struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable {
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *(*getGroup)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch);
  PyObject *(*getName)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch);
  PyArray_Descr *(*getType)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch);
  PyObject *(*getMetadata)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch);
  PyObject *(*getDimensions)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch);
  PyObject *(*getRole)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch);
  PyArrayObject *(*shape)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch);
  PyObject *(*getBaseFilename)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch);
  PyArrayObject *(*getPartitionMatrixShape)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch);
  PyObject *(*getPartitionMatrixDimensions)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch);
  PyObject *(*getPartitionValues)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionValues *__pyx_optional_args);
  PyObject *(*__pyx___calculateLocation)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *);
  PyObject *(*__pyx___definePartition)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *);
  PyObject *(*getPartition)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*writePartition)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*writeInitialPartitionInfo)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writeInitialPartitionInfo *__pyx_optional_args);
  PyObject *(*__pyx___createNCPartition)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___createNCPartition *__pyx_optional_args);
  PyObject *(*parse)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*dump)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch);
  PyObject *(*load)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable;


/* "S3netCDF4/CFA/_CFAClasses.pyx":1333
 *             self.pmdimensions = pm_dimensions.replace(" ", "").split(",")
 * 
 * cdef class CFADimension:             # <<<<<<<<<<<<<<
 *     """
 *         Class containing definition of a CFA Dimension.
 */

struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADimension {
  PyObject *(*dump)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, int __pyx_skip_dispatch);
  PyArray_Descr *(*getType)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, int __pyx_skip_dispatch);
  PyObject *(*setType)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, PyArray_Descr *, int __pyx_skip_dispatch);
  PyObject *(*getName)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, int __pyx_skip_dispatch);
  PyObject *(*getMetadata)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, int __pyx_skip_dispatch);
  int (*getLen)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, int __pyx_skip_dispatch);
  PyObject *(*getAxisType)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFADimension;

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

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

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

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

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

/* RaiseArgTupleInvalid.proto */
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);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* IncludeStringH.proto */
#include <string.h>

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

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

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

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

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

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

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

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
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);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* SliceObject.proto */
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);

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

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

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* py_dict_pop.proto */
static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod2.proto */
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* CallUnboundCMethod1.proto */
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

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

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

/* GetItemInt.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 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);

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

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
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);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#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);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

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

/* SliceObject.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);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

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

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

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#endif

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __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);

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

/* GCCDiagnostics.proto */
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* RealImag.proto */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #define __Pyx_CREAL(z) ((z).real())
    #define __Pyx_CIMAG(z) ((z).imag())
  #else
    #define __Pyx_CREAL(z) (__real__(z))
    #define __Pyx_CIMAG(z) (__imag__(z))
  #endif
#else
    #define __Pyx_CREAL(z) ((z).real)
    #define __Pyx_CIMAG(z) ((z).imag)
#endif
#if defined(__cplusplus) && CYTHON_CCOMPLEX\
        && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_float(a, b)   ((a)==(b))
    #define __Pyx_c_sum_float(a, b)  ((a)+(b))
    #define __Pyx_c_diff_float(a, b) ((a)-(b))
    #define __Pyx_c_prod_float(a, b) ((a)*(b))
    #define __Pyx_c_quot_float(a, b) ((a)/(b))
    #define __Pyx_c_neg_float(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
    #define __Pyx_c_conj_float(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (::std::abs(z))
        #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_float(z) ((z)==0)
    #define __Pyx_c_conj_float(z)    (conjf(z))
    #if 1
        #define __Pyx_c_abs_float(z)     (cabsf(z))
        #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

/* Arithmetic.proto */
#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    #define __Pyx_c_diff_double(a, b) ((a)-(b))
    #define __Pyx_c_prod_double(a, b) ((a)*(b))
    #define __Pyx_c_quot_double(a, b) ((a)/(b))
    #define __Pyx_c_neg_double(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    #define __Pyx_c_conj_double(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (::std::abs(z))
        #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero_double(z) ((z)==0)
    #define __Pyx_c_conj_double(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs_double(z)     (cabs(z))
        #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

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

static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_createGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_grp_name, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_createGroup *__pyx_optional_args); /* proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_grp_name, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_renameGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_old_name, PyObject *__pyx_v_new_name, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getGroups(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getCFAVersion(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getFormat(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup__ensure_axis_has_type(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_var_name, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createVariable(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_var_name, PyArray_Descr *__pyx_v_nc_dtype, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createVariable *__pyx_optional_args); /* proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getVariable(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_var_name, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getVariables(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_renameVariable(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_old_name, PyObject *__pyx_v_new_name, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createDimension(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createDimension *__pyx_optional_args); /* proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getDimension(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_dim_name, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getDimensions(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_renameDimension(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_old_name, PyObject *__pyx_v_new_name, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_setName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_new_name, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getDataset(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyArray_Descr *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getDimensions(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getRole(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyArrayObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_shape(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getBaseFilename(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyArrayObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionMatrixShape(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionMatrixDimensions(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionValues(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionValues *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___calculateLocation(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___definePartition(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartition(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_index, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writePartition(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_partition, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writeInitialPartitionInfo(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_cfa_version, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writeInitialPartitionInfo *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___createNCPartition(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___createNCPartition *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_parse(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_cfa_metadata, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_dump(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_load(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_cfa_metadata, PyObject *__pyx_v_nc_object, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_dump(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyArray_Descr *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_setType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, PyArray_Descr *__pyx_v_dtype, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getLen(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getAxisType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/

/* Module declarations from 'cpython.buffer' */

/* Module declarations from 'libc.string' */

/* Module declarations from 'libc.stdio' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

/* Module declarations from 'cpython' */

/* Module declarations from 'cpython.object' */

/* Module declarations from 'cpython.ref' */

/* Module declarations from 'cpython.mem' */

/* Module declarations from 'numpy' */

/* Module declarations from 'numpy' */
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
static PyTypeObject *__pyx_ptype_5numpy_number = 0;
static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
static PyTypeObject *__pyx_ptype_5numpy_character = 0;
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;

/* Module declarations from 'S3netCDF4.CFA._CFAClasses' */
static PyTypeObject *__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADataset = 0;
static PyTypeObject *__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup = 0;
static PyTypeObject *__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable = 0;
static PyTypeObject *__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADimension = 0;
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFADataset__set_state(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, PyObject *); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFAGroup__set_state(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFAVariable__set_state(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFADimension__set_state(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "S3netCDF4.CFA._CFAClasses"
extern int __pyx_module_is_main_S3netCDF4__CFA___CFAClasses;
int __pyx_module_is_main_S3netCDF4__CFA___CFAClasses = 0;

/* Implementation of 'S3netCDF4.CFA._CFAClasses' */
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_ImportError;
static const char __pyx_k_N[] = "N";
static const char __pyx_k_T[] = "T";
static const char __pyx_k_U[] = "U";
static const char __pyx_k_X[] = "X";
static const char __pyx_k_Y[] = "Y";
static const char __pyx_k_Z[] = "Z";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_t[] = "t";
static const char __pyx_k_w[] = "w";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_y[] = "y";
static const char __pyx_k_z[] = "z";
static const char __pyx_k__3[] = "\t{} : {}\n";
static const char __pyx_k_ma[] = "ma";
static const char __pyx_k_nc[] = ".nc";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_0_4[] = "0.4";
static const char __pyx_k_0_5[] = "0.5";
static const char __pyx_k__13[] = "";
static const char __pyx_k__21[] = "/";
static const char __pyx_k__22[] = ".";
static const char __pyx_k__25[] = ", ";
static const char __pyx_k__29[] = " ";
static const char __pyx_k__31[] = ",";
static const char __pyx_k__35[] = "*";
static const char __pyx_k_any[] = "any";
static const char __pyx_k_cfa[] = "cfa_";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_lat[] = "lat";
static const char __pyx_k_lon[] = "lon";
static const char __pyx_k_nca[] = ".nca";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_axis[] = "axis";
static const char __pyx_k_base[] = "base";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_dump[] = "dump";
static const char __pyx_k_file[] = "file";
static const char __pyx_k_int8[] = "int8";
static const char __pyx_k_json[] = "json";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_load[] = "load";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_root[] = "root";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_dtype[] = "dtype";
static const char __pyx_k_empty[] = "empty";
static const char __pyx_k_flags[] = "flags";
static const char __pyx_k_group[] = "group";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_int16[] = "int16";
static const char __pyx_k_int32[] = "int32";
static const char __pyx_k_int64[] = "int64";
static const char __pyx_k_level[] = "level";
static const char __pyx_k_loads[] = "loads";
static const char __pyx_k_ncvar[] = "ncvar";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_parse[] = "parse";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_shape[] = "shape";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_zeros[] = "zeros";
static const char __pyx_k_astype[] = "astype";
static const char __pyx_k_bounds[] = "bounds";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_getLen[] = "getLen";
static const char __pyx_k_groups[] = "groups";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_memory[] = "memory";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_nditer[] = "nditer";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_source[] = "source";
static const char __pyx_k_target[] = "target";
static const char __pyx_k_tolist[] = "tolist";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_Dataset[] = "Dataset";
static const char __pyx_k_NETCDF4[] = "NETCDF4";
static const char __pyx_k_authors[] = "__authors__";
static const char __pyx_k_cf_role[] = "cf_role";
static const char __pyx_k_dataset[] = "dataset";
static const char __pyx_k_dim_len[] = "dim_len";
static const char __pyx_k_getName[] = "getName";
static const char __pyx_k_getRole[] = "getRole";
static const char __pyx_k_getType[] = "getType";
static const char __pyx_k_getattr[] = "__getattr__";
static const char __pyx_k_indices[] = "indices";
static const char __pyx_k_license[] = "__license__";
static const char __pyx_k_netCDF4[] = "netCDF4";
static const char __pyx_k_os_path[] = "os.path";
static const char __pyx_k_persist[] = "persist";
static const char __pyx_k_pmshape[] = "pmshape";
static const char __pyx_k_refs_ok[] = "refs_ok";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_setName[] = "setName";
static const char __pyx_k_setType[] = "setType";
static const char __pyx_k_CFAError[] = "CFAError";
static const char __pyx_k_CFAGroup[] = "CFAGroup";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_basename[] = "basename";
static const char __pyx_k_cfa_dims[] = "cfa_dims";
static const char __pyx_k_cfa_vars[] = "cfa_vars";
static const char __pyx_k_dim_name[] = "dim_name";
static const char __pyx_k_diskless[] = "diskless";
static const char __pyx_k_finished[] = "finished";
static const char __pyx_k_getGroup[] = "getGroup";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_grp_name[] = "grp_name";
static const char __pyx_k_iternext[] = "iternext";
static const char __pyx_k_location[] = "location";
static const char __pyx_k_metadata[] = "metadata";
static const char __pyx_k_nc_dtype[] = "nc_dtype";
static const char __pyx_k_new_name[] = "new_name";
static const char __pyx_k_old_name[] = "old_name";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_subarray[] = "subarray";
static const char __pyx_k_var_name[] = "var_name";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_axis_type[] = "axis_type";
static const char __pyx_k_cfa_array[] = "cfa_array";
static const char __pyx_k_cfa_group[] = "cfa_group";
static const char __pyx_k_copyright[] = "__copyright__";
static const char __pyx_k_dim_names[] = "dim_names";
static const char __pyx_k_getFormat[] = "getFormat";
static const char __pyx_k_getGroups[] = "getGroups";
static const char __pyx_k_is_masked[] = "is_masked";
static const char __pyx_k_nc_object[] = "nc_object";
static const char __pyx_k_nc_parent[] = "nc_parent";
static const char __pyx_k_partition[] = "partition";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_variables[] = "variables";
static const char __pyx_k_CFADataset[] = "CFADataset";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_Partitions[] = "Partitions";
static const char __pyx_k_axis_types[] = "axis_types";
static const char __pyx_k_cfa_groups[] = "cfa_groups";
static const char __pyx_k_dimensions[] = "dimensions";
static const char __pyx_k_getDataset[] = "getDataset";
static const char __pyx_k_group_name[] = "group_name";
static const char __pyx_k_namedtuple[] = "namedtuple";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_CFASplitter[] = "CFASplitter";
static const char __pyx_k_CFAVariable[] = "CFAVariable";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_Neil_Massey[] = "Neil Massey";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_cfa_version[] = "cfa_version";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_createGroup[] = "createGroup";
static const char __pyx_k_getAxisType[] = "getAxisType";
static const char __pyx_k_getMetadata[] = "getMetadata";
static const char __pyx_k_getVariable[] = "getVariable";
static const char __pyx_k_inmemory_nc[] = "inmemory.nc";
static const char __pyx_k_multi_index[] = "multi_index";
static const char __pyx_k_ndimensions[] = "ndimensions";
static const char __pyx_k_renameGroup[] = "renameGroup";
static const char __pyx_k_return_type[] = "return_type";
static const char __pyx_k_CFADimension[] = "CFADimension";
static const char __pyx_k_CFAPartition[] = "CFAPartition";
static const char __pyx_k_cfa_metadata[] = "cfa_metadata";
static const char __pyx_k_cfa_variable[] = "cfa_variable";
static const char __pyx_k_getDimension[] = "getDimension";
static const char __pyx_k_getPartition[] = "getPartition";
static const char __pyx_k_getVariables[] = "getVariables";
static const char __pyx_k_pmdimensions[] = "pmdimensions";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_CFAGroupError[] = "CFAGroupError";
static const char __pyx_k_Not_permitted[] = "Not permitted.";
static const char __pyx_k_cf_dimensions[] = "cf_dimensions";
static const char __pyx_k_format_groups[] = " : format = {} : groups = {}\n";
static const char __pyx_k_getCFAVersion[] = "getCFAVersion";
static const char __pyx_k_getDimensions[] = "getDimensions";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_cfa_dimensions[] = "cfa_dimensions";
static const char __pyx_k_createVariable[] = "createVariable";
static const char __pyx_k_renameVariable[] = "renameVariable";
static const char __pyx_k_subarray_shape[] = "subarray_shape";
static const char __pyx_k_writePartition[] = "writePartition";
static const char __pyx_k_createDimension[] = "createDimension";
static const char __pyx_k_getBaseFilename[] = "getBaseFilename";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_renameDimension[] = "renameDimension";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_CFASubArrayError[] = "CFASubArrayError";
static const char __pyx_k_CFAVariableError[] = "CFAVariableError";
static const char __pyx_k_netCDF4__netCDF4[] = "netCDF4._netCDF4";
static const char __pyx_k_setSubarrayShape[] = "setSubarrayShape";
static const char __pyx_k_CFADimensionError[] = "CFADimensionError";
static const char __pyx_k_CFAPartitionError[] = "CFAPartitionError";
static const char __pyx_k_max_subarray_size[] = "max_subarray_size";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_getPartitionValues[] = "getPartitionValues";
static const char __pyx_k_nc_partition_group[] = "nc_partition_group";
static const char __pyx_k_ensure_axis_has_type[] = "_ensure_axis_has_type";
static const char __pyx_k_CFAVariableIndexError[] = "CFAVariableIndexError";
static const char __pyx_k_name_dimensions_shape[] = " : name = {} : dimensions = {} : shape = {}\n";
static const char __pyx_k_name_length_axis_type[] = " : name = {} : length = {} : axis_type = {}\n";
static const char __pyx_k_pyx_unpickle_CFAGroup[] = "__pyx_unpickle_CFAGroup";
static const char __pyx_k_CFAPartitionIndexError[] = "CFAPartitionIndexError";
static const char __pyx_k_calculateSubarrayShape[] = "calculateSubarrayShape";
static const char __pyx_k_Unsupported_CFA_version[] = "Unsupported CFA version {}.";
static const char __pyx_k_getPartitionMatrixShape[] = "getPartitionMatrixShape";
static const char __pyx_k_partition_source_target[] = "partition source target";
static const char __pyx_k_pyx_unpickle_CFADataset[] = "__pyx_unpickle_CFADataset";
static const char __pyx_k_pyx_unpickle_CFAVariable[] = "__pyx_unpickle_CFAVariable";
static const char __pyx_k_S3netCDF4_CFA__CFAClasses[] = "S3netCDF4.CFA._CFAClasses";
static const char __pyx_k_name_dimensions_variables[] = " : name = {} : dimensions = {} : variables = {}\n";
static const char __pyx_k_pyx_unpickle_CFADimension[] = "__pyx_unpickle_CFADimension";
static const char __pyx_k_writeInitialPartitionInfo[] = "writeInitialPartitionInfo";
static const char __pyx_k_S3netCDF4_CFA__CFASplitter[] = "S3netCDF4.CFA._CFASplitter";
static const char __pyx_k_cfa_variable_metadata_keys[] = "cfa_variable_metadata_keys";
static const char __pyx_k_S3netCDF4_CFA__CFAExceptions[] = "S3netCDF4.CFA._CFAExceptions";
static const char __pyx_k_getPartitionMatrixDimensions[] = "getPartitionMatrixDimensions";
static const char __pyx_k_C_2019_2021_Science_and_Technol[] = "(C) 2019-2021 Science and Technology Facilities Council";
static const char __pyx_k_Dimension_does_not_exist_in_CFA[] = "Dimension: {} does not exist in CFA group: {}. Please create the dimension using CFAGroup::createDimension";
static const char __pyx_k_Incompatible_netCDF_version_for[] = "Incompatible netCDF version ({}) for cfa_version ({})";
static const char __pyx_k_cfa_dimensions_or_cf_dimensions[] = "cfa_dimensions or cf_dimensions not defined in {} metadata";
static const char __pyx_k_is_neither_a_variable_nor_a_dim[] = "{} is neither a variable nor a dimension";
static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
static const char __pyx_k_BSD_see_LICENSE_file_in_top_leve[] = "BSD - see LICENSE file in top-level directory";
static const char __pyx_k_Cannot_index_CFA_array_with_type[] = "Cannot index CFA array with type: {} from {}";
static const char __pyx_k_Could_not_createDimension_dimens[] = "Could not createDimension {}, dimension already exists";
static const char __pyx_k_Could_not_createGroup_group_alre[] = "Could not createGroup {}, group already exists";
static const char __pyx_k_Could_not_createVariable_variabl[] = "Could not createVariable {}, variable already exists";
static const char __pyx_k_Could_not_getDimension_dimension[] = "Could not getDimension {}, dimension does not exist.";
static const char __pyx_k_Could_not_getGroup_group_does_no[] = "Could not getGroup {}, group does not exist.";
static const char __pyx_k_Could_not_getVariable_variable_d[] = "Could not getVariable {}, variable does not exist.";
static const char __pyx_k_Could_not_renameDimension_dimens[] = "Could not renameDimension {}, dimension does not exist.";
static const char __pyx_k_Could_not_renameGroup_group_does[] = "Could not renameGroup {}, group does not exist.";
static const char __pyx_k_Could_not_renameVariable_variabl[] = "Could not renameVariable {}, variable does not exist.";
static const char __pyx_k_Dimension_in_desired_sub_array_i[] = "Dimension in desired sub_array is larger than dimension in array for dimension: {}";
static const char __pyx_k_Dimensions_of_CFAVariable_are_no[] = "Dimensions of CFAVariable are not specified but the subarray_shape is specified. This is not possible. Please specify the dimensions of the CFAVariable.";
static const char __pyx_k_Incompatible_checksums_s_vs_0x19[] = "Incompatible checksums (%s vs 0x19ace02 = (cfa_dims, cfa_vars, dataset, grp_name, metadata))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x2a[] = "Incompatible checksums (%s vs 0x2afd349 = (axis_type, dim_len, dim_name, metadata, nc_dtype))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x2c[] = "Incompatible checksums (%s vs 0x2c9008d = (_shape, base, cf_role, cfa_dimensions, group, metadata, nc_dtype, nc_partition_group, pmdimensions, pmshape, subarray_shape, var_name))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xac[] = "Incompatible checksums (%s vs 0xac13b3c = (cfa_groups, cfa_version, format, metadata, name))";
static const char __pyx_k_Index_into_CFA_array_is_out_of_r[] = "Index into CFA array is out of range: {}";
static const char __pyx_k_No_partition_with_index_exists_f[] = "No partition with index: {} exists for the variable: {}";
static const char __pyx_k_Number_of_dimensions_in_subarray[] = "Number of dimensions in subarray_shape does not match those in shape.";
static const char __pyx_k_Partitions_not_defined_in_metada[] = "Partitions not defined in {} metadata";
static const char __pyx_k_cfa_array_not_defined_in_metadat[] = "cfa_array not defined in {} metadata";
static const char __pyx_k_cfa_group_not_defined_in_metadat[] = "cfa_group not defined in {} metadata";
static const char __pyx_k_index_location_ncvar_file_format[] = "index location ncvar file format shape";
static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
static PyObject *__pyx_kp_u_0_4;
static PyObject *__pyx_kp_u_0_5;
static PyObject *__pyx_kp_u_BSD_see_LICENSE_file_in_top_leve;
static PyObject *__pyx_n_s_CFADataset;
static PyObject *__pyx_n_s_CFADimension;
static PyObject *__pyx_n_s_CFADimensionError;
static PyObject *__pyx_n_s_CFAError;
static PyObject *__pyx_n_s_CFAGroup;
static PyObject *__pyx_n_s_CFAGroupError;
static PyObject *__pyx_n_s_CFAPartition;
static PyObject *__pyx_n_u_CFAPartition;
static PyObject *__pyx_n_s_CFAPartitionError;
static PyObject *__pyx_n_s_CFAPartitionIndexError;
static PyObject *__pyx_n_s_CFASplitter;
static PyObject *__pyx_n_s_CFASubArrayError;
static PyObject *__pyx_n_s_CFAVariable;
static PyObject *__pyx_n_s_CFAVariableError;
static PyObject *__pyx_n_s_CFAVariableIndexError;
static PyObject *__pyx_kp_u_C_2019_2021_Science_and_Technol;
static PyObject *__pyx_kp_u_Cannot_index_CFA_array_with_type;
static PyObject *__pyx_kp_u_Could_not_createDimension_dimens;
static PyObject *__pyx_kp_u_Could_not_createGroup_group_alre;
static PyObject *__pyx_kp_u_Could_not_createVariable_variabl;
static PyObject *__pyx_kp_u_Could_not_getDimension_dimension;
static PyObject *__pyx_kp_u_Could_not_getGroup_group_does_no;
static PyObject *__pyx_kp_u_Could_not_getVariable_variable_d;
static PyObject *__pyx_kp_u_Could_not_renameDimension_dimens;
static PyObject *__pyx_kp_u_Could_not_renameGroup_group_does;
static PyObject *__pyx_kp_u_Could_not_renameVariable_variabl;
static PyObject *__pyx_n_s_Dataset;
static PyObject *__pyx_kp_u_Dimension_does_not_exist_in_CFA;
static PyObject *__pyx_kp_u_Dimension_in_desired_sub_array_i;
static PyObject *__pyx_kp_u_Dimensions_of_CFAVariable_are_no;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x19;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x2a;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x2c;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xac;
static PyObject *__pyx_kp_u_Incompatible_netCDF_version_for;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_kp_u_Index_into_CFA_array_is_out_of_r;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_n_u_N;
static PyObject *__pyx_n_u_NETCDF4;
static PyObject *__pyx_kp_u_Neil_Massey;
static PyObject *__pyx_kp_u_No_partition_with_index_exists_f;
static PyObject *__pyx_kp_u_Not_permitted;
static PyObject *__pyx_kp_u_Number_of_dimensions_in_subarray;
static PyObject *__pyx_n_u_Partitions;
static PyObject *__pyx_kp_u_Partitions_not_defined_in_metada;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_S3netCDF4_CFA__CFAClasses;
static PyObject *__pyx_n_s_S3netCDF4_CFA__CFAExceptions;
static PyObject *__pyx_n_s_S3netCDF4_CFA__CFASplitter;
static PyObject *__pyx_n_u_T;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_u_U;
static PyObject *__pyx_kp_u_Unsupported_CFA_version;
static PyObject *__pyx_n_u_X;
static PyObject *__pyx_n_u_Y;
static PyObject *__pyx_n_u_Z;
static PyObject *__pyx_kp_u__13;
static PyObject *__pyx_kp_u__21;
static PyObject *__pyx_kp_u__22;
static PyObject *__pyx_kp_u__25;
static PyObject *__pyx_kp_u__29;
static PyObject *__pyx_kp_u__3;
static PyObject *__pyx_kp_u__31;
static PyObject *__pyx_n_s__35;
static PyObject *__pyx_n_s_any;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_s_astype;
static PyObject *__pyx_n_s_authors;
static PyObject *__pyx_n_u_axis;
static PyObject *__pyx_n_s_axis_type;
static PyObject *__pyx_n_s_axis_types;
static PyObject *__pyx_n_s_base;
static PyObject *__pyx_n_u_base;
static PyObject *__pyx_n_s_basename;
static PyObject *__pyx_n_u_bounds;
static PyObject *__pyx_n_s_calculateSubarrayShape;
static PyObject *__pyx_n_u_cf_dimensions;
static PyObject *__pyx_n_s_cf_role;
static PyObject *__pyx_n_u_cf_role;
static PyObject *__pyx_n_u_cfa;
static PyObject *__pyx_n_u_cfa_array;
static PyObject *__pyx_kp_u_cfa_array_not_defined_in_metadat;
static PyObject *__pyx_n_s_cfa_dimensions;
static PyObject *__pyx_n_u_cfa_dimensions;
static PyObject *__pyx_kp_u_cfa_dimensions_or_cf_dimensions;
static PyObject *__pyx_n_s_cfa_dims;
static PyObject *__pyx_n_u_cfa_group;
static PyObject *__pyx_kp_u_cfa_group_not_defined_in_metadat;
static PyObject *__pyx_n_s_cfa_groups;
static PyObject *__pyx_n_s_cfa_metadata;
static PyObject *__pyx_n_u_cfa_variable;
static PyObject *__pyx_n_s_cfa_variable_metadata_keys;
static PyObject *__pyx_n_s_cfa_vars;
static PyObject *__pyx_n_s_cfa_version;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_n_s_copyright;
static PyObject *__pyx_n_s_createDimension;
static PyObject *__pyx_n_s_createGroup;
static PyObject *__pyx_n_s_createVariable;
static PyObject *__pyx_n_s_dataset;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dim_len;
static PyObject *__pyx_n_u_dim_len;
static PyObject *__pyx_n_s_dim_name;
static PyObject *__pyx_n_u_dim_name;
static PyObject *__pyx_n_s_dim_names;
static PyObject *__pyx_n_s_dimensions;
static PyObject *__pyx_n_s_diskless;
static PyObject *__pyx_n_s_dtype;
static PyObject *__pyx_n_s_dump;
static PyObject *__pyx_n_s_empty;
static PyObject *__pyx_n_s_ensure_axis_has_type;
static PyObject *__pyx_n_s_file;
static PyObject *__pyx_n_u_file;
static PyObject *__pyx_n_s_finished;
static PyObject *__pyx_n_s_flags;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_u_format;
static PyObject *__pyx_kp_u_format_groups;
static PyObject *__pyx_n_s_getAxisType;
static PyObject *__pyx_n_s_getBaseFilename;
static PyObject *__pyx_n_s_getCFAVersion;
static PyObject *__pyx_n_s_getDataset;
static PyObject *__pyx_n_s_getDimension;
static PyObject *__pyx_n_s_getDimensions;
static PyObject *__pyx_n_s_getFormat;
static PyObject *__pyx_n_s_getGroup;
static PyObject *__pyx_n_s_getGroups;
static PyObject *__pyx_n_s_getLen;
static PyObject *__pyx_n_s_getMetadata;
static PyObject *__pyx_n_s_getName;
static PyObject *__pyx_n_s_getPartition;
static PyObject *__pyx_n_s_getPartitionMatrixDimensions;
static PyObject *__pyx_n_s_getPartitionMatrixShape;
static PyObject *__pyx_n_s_getPartitionValues;
static PyObject *__pyx_n_s_getRole;
static PyObject *__pyx_n_s_getType;
static PyObject *__pyx_n_s_getVariable;
static PyObject *__pyx_n_s_getVariables;
static PyObject *__pyx_n_s_getattr;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_group;
static PyObject *__pyx_n_s_group_name;
static PyObject *__pyx_n_s_groups;
static PyObject *__pyx_n_s_grp_name;
static PyObject *__pyx_n_u_i;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_u_index;
static PyObject *__pyx_kp_u_index_location_ncvar_file_format;
static PyObject *__pyx_n_s_indices;
static PyObject *__pyx_kp_u_inmemory_nc;
static PyObject *__pyx_n_s_int16;
static PyObject *__pyx_n_s_int32;
static PyObject *__pyx_n_s_int64;
static PyObject *__pyx_n_s_int8;
static PyObject *__pyx_n_s_is_masked;
static PyObject *__pyx_kp_u_is_neither_a_variable_nor_a_dim;
static PyObject *__pyx_n_s_iternext;
static PyObject *__pyx_n_s_json;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_u_lat;
static PyObject *__pyx_n_u_level;
static PyObject *__pyx_n_s_license;
static PyObject *__pyx_n_s_load;
static PyObject *__pyx_n_s_loads;
static PyObject *__pyx_n_s_location;
static PyObject *__pyx_n_u_location;
static PyObject *__pyx_n_u_lon;
static PyObject *__pyx_n_s_ma;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_max_subarray_size;
static PyObject *__pyx_n_s_memory;
static PyObject *__pyx_n_s_metadata;
static PyObject *__pyx_n_u_metadata;
static PyObject *__pyx_n_s_mode;
static PyObject *__pyx_n_s_multi_index;
static PyObject *__pyx_n_u_multi_index;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_kp_u_name_dimensions_shape;
static PyObject *__pyx_kp_u_name_dimensions_variables;
static PyObject *__pyx_kp_u_name_length_axis_type;
static PyObject *__pyx_n_s_namedtuple;
static PyObject *__pyx_kp_u_nc;
static PyObject *__pyx_n_s_nc_dtype;
static PyObject *__pyx_n_s_nc_object;
static PyObject *__pyx_n_s_nc_parent;
static PyObject *__pyx_n_s_nc_partition_group;
static PyObject *__pyx_kp_u_nca;
static PyObject *__pyx_n_s_ncvar;
static PyObject *__pyx_n_u_ncvar;
static PyObject *__pyx_n_u_ndimensions;
static PyObject *__pyx_n_s_nditer;
static PyObject *__pyx_n_s_netCDF4;
static PyObject *__pyx_n_s_netCDF4__netCDF4;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_new_name;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_kp_u_numpy_core_multiarray_failed_to;
static PyObject *__pyx_kp_u_numpy_core_umath_failed_to_impor;
static PyObject *__pyx_n_s_old_name;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_os_path;
static PyObject *__pyx_n_s_parse;
static PyObject *__pyx_n_s_partition;
static PyObject *__pyx_kp_u_partition_source_target;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_persist;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_pmdimensions;
static PyObject *__pyx_n_u_pmdimensions;
static PyObject *__pyx_n_s_pmshape;
static PyObject *__pyx_n_u_pmshape;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_CFADataset;
static PyObject *__pyx_n_s_pyx_unpickle_CFADimension;
static PyObject *__pyx_n_s_pyx_unpickle_CFAGroup;
static PyObject *__pyx_n_s_pyx_unpickle_CFAVariable;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_u_refs_ok;
static PyObject *__pyx_n_s_renameDimension;
static PyObject *__pyx_n_s_renameGroup;
static PyObject *__pyx_n_s_renameVariable;
static PyObject *__pyx_n_s_replace;
static PyObject *__pyx_n_u_return_type;
static PyObject *__pyx_n_u_root;
static PyObject *__pyx_n_s_setName;
static PyObject *__pyx_n_s_setSubarrayShape;
static PyObject *__pyx_n_s_setType;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_shape;
static PyObject *__pyx_n_u_shape;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_source;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_u_subarray;
static PyObject *__pyx_n_s_subarray_shape;
static PyObject *__pyx_n_u_t;
static PyObject *__pyx_n_s_target;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_u_time;
static PyObject *__pyx_n_s_tolist;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_var_name;
static PyObject *__pyx_n_s_variables;
static PyObject *__pyx_n_u_w;
static PyObject *__pyx_n_s_writeInitialPartitionInfo;
static PyObject *__pyx_n_s_writePartition;
static PyObject *__pyx_n_u_x;
static PyObject *__pyx_n_u_y;
static PyObject *__pyx_n_u_z;
static PyObject *__pyx_n_s_zeros;
static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset___init__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_cfa_groups, PyObject *__pyx_v_format, PyObject *__pyx_v_cfa_version, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_2__repr__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_4__getitem__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_grp_name); /* proto */
static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_6__setitem__(CYTHON_UNUSED struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_grp_name, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_8__getattr__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_10__setattr__(CYTHON_UNUSED struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_grp_name, CYTHON_UNUSED PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_12createGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_grp_name, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_14getGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_grp_name); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_16renameGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_old_name, PyObject *__pyx_v_new_name); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_18getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_20getGroups(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_22getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_24getCFAVersion(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_26getFormat(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_28__reduce_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_30__setstate_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup___init__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_group_name, PyObject *__pyx_v_dataset, PyObject *__pyx_v_cfa_dims, PyObject *__pyx_v_cfa_vars, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_2__repr__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_4__getitem__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_6__getattr__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_8_ensure_axis_has_type(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_var_name); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_10createVariable(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_var_name, PyArray_Descr *__pyx_v_nc_dtype, PyObject *__pyx_v_dim_names, PyArrayObject *__pyx_v_subarray_shape, int __pyx_v_max_subarray_size, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_12getVariable(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_var_name); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_14getVariables(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_16renameVariable(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_old_name, PyObject *__pyx_v_new_name); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_18createDimension(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_dim_name, int __pyx_v_dim_len, PyObject *__pyx_v_axis_type, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_20getDimension(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_dim_name); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_22getDimensions(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_24renameDimension(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_old_name, PyObject *__pyx_v_new_name); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_26getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_28getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_30setName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_new_name); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_32getDataset(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_34__reduce_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_36__setstate_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___init__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_var_name, PyArray_Descr *__pyx_v_nc_dtype, PyObject *__pyx_v_group, PyObject *__pyx_v_cf_role, PyObject *__pyx_v_cfa_dimensions, PyObject *__pyx_v_pmdimensions, PyArrayObject *__pyx_v_pmshape, PyObject *__pyx_v_base, PyObject *__pyx_v_metadata, PyObject *__pyx_v_nc_partition_group); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_2__repr__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_4__getitem__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_in_key); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_6getGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_10getType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_12getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_14getDimensions(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_16getRole(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_18shape(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_20getBaseFilename(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_22getPartitionMatrixShape(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_24getPartitionMatrixDimensions(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_26getPartitionValues(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_28getPartition(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_30writePartition(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_partition); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_32writeInitialPartitionInfo(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_cfa_version, PyObject *__pyx_v_nc_parent); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_34parse(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_cfa_metadata); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_36dump(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_38load(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_cfa_metadata, PyObject *__pyx_v_nc_object); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name___get__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_2__set__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_4__del__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata___get__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_2__set__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_4__del__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_40__reduce_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_42__setstate_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension___init__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, PyObject *__pyx_v_dim_name, int __pyx_v_dim_len, PyObject *__pyx_v_axis_type, PyObject *__pyx_v_metadata); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_2__repr__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_4dump(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_6getType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8setType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, PyArray_Descr *__pyx_v_dtype); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_10getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_12getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_14getLen(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_16getAxisType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata___get__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self); /* proto */
static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_2__set__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_4__del__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_18__reduce_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_20__setstate_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFADataset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_2__pyx_unpickle_CFAGroup(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_4__pyx_unpickle_CFAVariable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_6__pyx_unpickle_CFADimension(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_9S3netCDF4_3CFA_11_CFAClasses_CFADataset(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9S3netCDF4_3CFA_11_CFAClasses_CFADimension(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop = {0, &__pyx_n_s_pop, 0, 0, 0};
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_26922498;
static PyObject *__pyx_int_45077321;
static PyObject *__pyx_int_46727309;
static PyObject *__pyx_int_180435772;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_k_;
static PyObject *__pyx_k__2;
static PyObject *__pyx_k__5;
static PyObject *__pyx_k__6;
static PyObject *__pyx_k__7;
static PyObject *__pyx_k__8;
static PyObject *__pyx_k__10;
static PyArrayObject *__pyx_k__11;
static PyObject *__pyx_k__12;
static PyObject *__pyx_k__14;
static PyObject *__pyx_k__15;
static PyObject *__pyx_k__16;
static PyArrayObject *__pyx_k__17;
static PyObject *__pyx_k__18;
static PyObject *__pyx_k__32;
static PyObject *__pyx_slice__4;
static PyObject *__pyx_slice__9;
static PyObject *__pyx_slice__19;
static PyObject *__pyx_tuple__20;
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__30;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_codeobj__38;
static PyObject *__pyx_codeobj__40;
static PyObject *__pyx_codeobj__42;
static PyObject *__pyx_codeobj__44;
/* Late includes */

/* "S3netCDF4/CFA/_CFAClasses.pyx":56
 *     cdef basestring cfa_version
 * 
 *     def __init__(CFADataset self,             # <<<<<<<<<<<<<<
 *                  basestring name,
 *                  dict cfa_groups=dict(),
 */

/* Python wrapper */
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset___init__[] = "\n            Initialise a CFADataset object\n            Args:\n                name (string): the name of the dataset\n                cfa_groups (dict): A dictionary containing the groups in the\n                    Dataset.  There will always be at least one group.  If the\n                    input data does not have groups, then a 'root' group should\n                    be created.\n                format (string): the format (datamodel) of the Dataset\n                cfa_version (string): the version of the CFA conventions used,\n                    either 0.4 or 0.5.\n                metadata (dict): The external metadata for the Dataset, i.e. the\n                    metadata in the original netCDF file\n            Returns:\n                None\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset___init__;
#endif
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_cfa_groups = 0;
  PyObject *__pyx_v_format = 0;
  PyObject *__pyx_v_cfa_version = 0;
  PyObject *__pyx_v_metadata = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_cfa_groups,&__pyx_n_s_format,&__pyx_n_s_cfa_version,&__pyx_n_s_metadata,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = __pyx_k_;
    values[2] = ((PyObject*)__pyx_n_u_NETCDF4);
    values[3] = ((PyObject*)__pyx_kp_u_0_4);
    values[4] = __pyx_k__2;
    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);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfa_groups);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfa_version);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_metadata);
          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_ERR(0, 56, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_cfa_groups = ((PyObject*)values[1]);
    __pyx_v_format = ((PyObject*)values[2]);
    __pyx_v_cfa_version = ((PyObject*)values[3]);
    __pyx_v_metadata = ((PyObject*)values[4]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 56, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyBaseString_Type), 1, "name", 1))) __PYX_ERR(0, 57, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfa_groups), (&PyDict_Type), 1, "cfa_groups", 1))) __PYX_ERR(0, 58, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_format), (&PyBaseString_Type), 1, "format", 1))) __PYX_ERR(0, 59, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfa_version), (&PyBaseString_Type), 1, "cfa_version", 1))) __PYX_ERR(0, 60, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_metadata), (&PyDict_Type), 1, "metadata", 1))) __PYX_ERR(0, 61, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset___init__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self), __pyx_v_name, __pyx_v_cfa_groups, __pyx_v_format, __pyx_v_cfa_version, __pyx_v_metadata);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset___init__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_cfa_groups, PyObject *__pyx_v_format, PyObject *__pyx_v_cfa_version, PyObject *__pyx_v_metadata) {
  int __pyx_r;
  __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;
  PyObject *__pyx_t_7 = NULL;
  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("__init__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":82
 *         # Python passing the variable by reference and then passing it back to
 *         # be altered by the calling function
 *         self.name = basestring(name)             # <<<<<<<<<<<<<<
 *         self.cfa_groups = dict(cfa_groups)
 *         self.format = basestring(format)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBaseString_Type)), __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":83
 *         # be altered by the calling function
 *         self.name = basestring(name)
 *         self.cfa_groups = dict(cfa_groups)             # <<<<<<<<<<<<<<
 *         self.format = basestring(format)
 *         self.metadata = dict(metadata)
 */
  if (unlikely(__pyx_v_cfa_groups == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    __PYX_ERR(0, 83, __pyx_L1_error)
  }
  __pyx_t_1 = PyDict_Copy(__pyx_v_cfa_groups); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->cfa_groups);
  __Pyx_DECREF(__pyx_v_self->cfa_groups);
  __pyx_v_self->cfa_groups = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":84
 *         self.name = basestring(name)
 *         self.cfa_groups = dict(cfa_groups)
 *         self.format = basestring(format)             # <<<<<<<<<<<<<<
 *         self.metadata = dict(metadata)
 *         # set the CFA version - we need to ensure that, if the version is 0.5,
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBaseString_Type)), __pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->format);
  __Pyx_DECREF(__pyx_v_self->format);
  __pyx_v_self->format = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":85
 *         self.cfa_groups = dict(cfa_groups)
 *         self.format = basestring(format)
 *         self.metadata = dict(metadata)             # <<<<<<<<<<<<<<
 *         # set the CFA version - we need to ensure that, if the version is 0.5,
 *         # then a compatible NETCDF version has been chosen - i.e. NETCDF4
 */
  if (unlikely(__pyx_v_metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    __PYX_ERR(0, 85, __pyx_L1_error)
  }
  __pyx_t_1 = PyDict_Copy(__pyx_v_metadata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->metadata);
  __Pyx_DECREF(__pyx_v_self->metadata);
  __pyx_v_self->metadata = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":88
 *         # set the CFA version - we need to ensure that, if the version is 0.5,
 *         # then a compatible NETCDF version has been chosen - i.e. NETCDF4
 *         if cfa_version[0:3] == "0.5" and format != "NETCDF4":             # <<<<<<<<<<<<<<
 *             raise CFAError(
 *                 "Incompatible netCDF version ({}) for cfa_version ({})".format(
 */
  if (unlikely(__pyx_v_cfa_version == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 88, __pyx_L1_error)
  }
  __pyx_t_1 = PySequence_GetSlice(__pyx_v_cfa_version, 0, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u_0_5, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_format, __pyx_n_u_NETCDF4, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 88, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_2)) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":89
 *         # then a compatible NETCDF version has been chosen - i.e. NETCDF4
 *         if cfa_version[0:3] == "0.5" and format != "NETCDF4":
 *             raise CFAError(             # <<<<<<<<<<<<<<
 *                 "Incompatible netCDF version ({}) for cfa_version ({})".format(
 *                     format, cfa_version
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CFAError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":90
 *         if cfa_version[0:3] == "0.5" and format != "NETCDF4":
 *             raise CFAError(
 *                 "Incompatible netCDF version ({}) for cfa_version ({})".format(             # <<<<<<<<<<<<<<
 *                     format, cfa_version
 *                 )
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Incompatible_netCDF_version_for, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 90, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":91
 *             raise CFAError(
 *                 "Incompatible netCDF version ({}) for cfa_version ({})".format(
 *                     format, cfa_version             # <<<<<<<<<<<<<<
 *                 )
 *             )
 */
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_format, __pyx_v_cfa_version};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_format, __pyx_v_cfa_version};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
    } else
    #endif
    {
      __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 90, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (__pyx_t_8) {
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
      }
      __Pyx_INCREF(__pyx_v_format);
      __Pyx_GIVEREF(__pyx_v_format);
      PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_format);
      __Pyx_INCREF(__pyx_v_cfa_version);
      __Pyx_GIVEREF(__pyx_v_cfa_version);
      PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_cfa_version);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __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_ERR(0, 89, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":88
 *         # set the CFA version - we need to ensure that, if the version is 0.5,
 *         # then a compatible NETCDF version has been chosen - i.e. NETCDF4
 *         if cfa_version[0:3] == "0.5" and format != "NETCDF4":             # <<<<<<<<<<<<<<
 *             raise CFAError(
 *                 "Incompatible netCDF version ({}) for cfa_version ({})".format(
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":94
 *                 )
 *             )
 *         self.cfa_version = basestring(cfa_version)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(CFADataset self):
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBaseString_Type)), __pyx_v_cfa_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->cfa_version);
  __Pyx_DECREF(__pyx_v_self->cfa_version);
  __pyx_v_self->cfa_version = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":56
 *     cdef basestring cfa_version
 * 
 *     def __init__(CFADataset self,             # <<<<<<<<<<<<<<
 *                  basestring name,
 *                  dict cfa_groups=dict(),
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":96
 *         self.cfa_version = basestring(cfa_version)
 * 
 *     def __repr__(CFADataset self):             # <<<<<<<<<<<<<<
 *         """String representation of the Dataset."""
 *         repstr = repr(type(self)) + " : format = {} : groups = {}\n".format(
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_3__repr__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_2__repr__[] = "String representation of the Dataset.";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_2__repr__;
#endif
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_2__repr__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_2__repr__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self) {
  PyObject *__pyx_v_repstr = NULL;
  PyObject *__pyx_v_md = NULL;
  PyObject *__pyx_7genexpr__pyx_v_grp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":98
 *     def __repr__(CFADataset self):
 *         """String representation of the Dataset."""
 *         repstr = repr(type(self)) + " : format = {} : groups = {}\n".format(             # <<<<<<<<<<<<<<
 *             self.format,
 *             str([grp for grp in self.cfa_groups])
 */
  __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_format_groups, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":100
 *         repstr = repr(type(self)) + " : format = {} : groups = {}\n".format(
 *             self.format,
 *             str([grp for grp in self.cfa_groups])             # <<<<<<<<<<<<<<
 *         )
 *         for md in self.metadata:
 */
  { /* enter inner scope */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = 0;
    if (unlikely(__pyx_v_self->cfa_groups == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 100, __pyx_L5_error)
    }
    __pyx_t_9 = __Pyx_dict_iterator(__pyx_v_self->cfa_groups, 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 100, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_5);
    __pyx_t_5 = __pyx_t_9;
    __pyx_t_9 = 0;
    while (1) {
      __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_7, &__pyx_t_6, &__pyx_t_9, NULL, NULL, __pyx_t_8);
      if (unlikely(__pyx_t_10 == 0)) break;
      if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 100, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_grp, __pyx_t_9);
      __pyx_t_9 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_7genexpr__pyx_v_grp))) __PYX_ERR(0, 100, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_grp); __pyx_7genexpr__pyx_v_grp = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_grp); __pyx_7genexpr__pyx_v_grp = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_self->format, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_self->format, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 98, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self->format);
    __Pyx_GIVEREF(__pyx_v_self->format);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_self->format);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":98
 *     def __repr__(CFADataset self):
 *         """String representation of the Dataset."""
 *         repstr = repr(type(self)) + " : format = {} : groups = {}\n".format(             # <<<<<<<<<<<<<<
 *             self.format,
 *             str([grp for grp in self.cfa_groups])
 */
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_repstr = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":102
 *             str([grp for grp in self.cfa_groups])
 *         )
 *         for md in self.metadata:             # <<<<<<<<<<<<<<
 *             repstr += "\t{} : {}\n".format(md, self.metadata[md])
 *         return repstr[:-1]
 */
  __pyx_t_7 = 0;
  if (unlikely(__pyx_v_self->metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 102, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->metadata, 1, ((PyObject *)NULL), (&__pyx_t_6), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __pyx_t_3 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_6, &__pyx_t_7, &__pyx_t_2, NULL, NULL, __pyx_t_8);
    if (unlikely(__pyx_t_10 == 0)) break;
    if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_md, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":103
 *         )
 *         for md in self.metadata:
 *             repstr += "\t{} : {}\n".format(md, self.metadata[md])             # <<<<<<<<<<<<<<
 *         return repstr[:-1]
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__3, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_v_self->metadata == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 103, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_self->metadata, __pyx_v_md); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_md, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_md, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_md);
      __Pyx_GIVEREF(__pyx_v_md);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_10, __pyx_v_md);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_10, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __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_t_1 = PyNumber_InPlaceAdd(__pyx_v_repstr, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_repstr, __pyx_t_1);
    __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":104
 *         for md in self.metadata:
 *             repstr += "\t{} : {}\n".format(md, self.metadata[md])
 *         return repstr[:-1]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(CFADataset self, basestring grp_name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_repstr, 0, -1L, NULL, NULL, &__pyx_slice__4, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":96
 *         self.cfa_version = basestring(cfa_version)
 * 
 *     def __repr__(CFADataset self):             # <<<<<<<<<<<<<<
 *         """String representation of the Dataset."""
 *         repstr = repr(type(self)) + " : format = {} : groups = {}\n".format(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_repstr);
  __Pyx_XDECREF(__pyx_v_md);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_grp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":106
 *         return repstr[:-1]
 * 
 *     def __getitem__(CFADataset self, basestring grp_name):             # <<<<<<<<<<<<<<
 *         """
 *             Overload the getitem to return a group.
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_grp_name); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_4__getitem__[] = "\n            Overload the getitem to return a group.\n            Args:\n                grp_name (string): the name of the group to return\n\n            Returns:\n                CFAGroup: the instance of the group with name of grp_name\n\n            Exceptions:\n\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_4__getitem__;
#endif
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_grp_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grp_name), (&PyBaseString_Type), 1, "grp_name", 1))) __PYX_ERR(0, 106, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_4__getitem__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self), ((PyObject*)__pyx_v_grp_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_4__getitem__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_grp_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("__getitem__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":118
 * 
 *         """
 *         return self.getGroup(grp_name)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(CFADataset self, basestring grp_name, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self->__pyx_vtab)->getGroup(__pyx_v_self, __pyx_v_grp_name, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":106
 *         return repstr[:-1]
 * 
 *     def __getitem__(CFADataset self, basestring grp_name):             # <<<<<<<<<<<<<<
 *         """
 *             Overload the getitem to return a group.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":120
 *         return self.getGroup(grp_name)
 * 
 *     def __setitem__(CFADataset self, basestring grp_name, value):             # <<<<<<<<<<<<<<
 *         """Overload the setitem to return an error"""
 *         raise CFAError("Not permitted.")
 */

/* Python wrapper */
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_7__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_grp_name, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_6__setitem__[] = "Overload the setitem to return an error";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_6__setitem__;
#endif
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_7__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_grp_name, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grp_name), (&PyBaseString_Type), 1, "grp_name", 1))) __PYX_ERR(0, 120, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_6__setitem__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self), ((PyObject*)__pyx_v_grp_name), ((PyObject *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_6__setitem__(CYTHON_UNUSED struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_grp_name, CYTHON_UNUSED PyObject *__pyx_v_value) {
  int __pyx_r;
  __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("__setitem__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":122
 *     def __setitem__(CFADataset self, basestring grp_name, value):
 *         """Overload the setitem to return an error"""
 *         raise CFAError("Not permitted.")             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(CFADataset self, basestring name):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CFAError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Not_permitted) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Not_permitted);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __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_ERR(0, 122, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":120
 *         return self.getGroup(grp_name)
 * 
 *     def __setitem__(CFADataset self, basestring grp_name, value):             # <<<<<<<<<<<<<<
 *         """Overload the setitem to return an error"""
 *         raise CFAError("Not permitted.")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":124
 *         raise CFAError("Not permitted.")
 * 
 *     def __getattr__(CFADataset self, basestring name):             # <<<<<<<<<<<<<<
 *         """Overload the getattribute to return a group"""
 *         if name == "metadata":
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_9__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_8__getattr__[] = "Overload the getattribute to return a group";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_8__getattr__;
#endif
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_9__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyBaseString_Type), 1, "name", 1))) __PYX_ERR(0, 124, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_8__getattr__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self), ((PyObject*)__pyx_v_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_8__getattr__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":126
 *     def __getattr__(CFADataset self, basestring name):
 *         """Overload the getattribute to return a group"""
 *         if name == "metadata":             # <<<<<<<<<<<<<<
 *             return self.metadata
 *         else:
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_metadata, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 126, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":127
 *         """Overload the getattribute to return a group"""
 *         if name == "metadata":
 *             return self.metadata             # <<<<<<<<<<<<<<
 *         else:
 *             return self.getGroup(name)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->metadata);
    __pyx_r = __pyx_v_self->metadata;
    goto __pyx_L0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":126
 *     def __getattr__(CFADataset self, basestring name):
 *         """Overload the getattribute to return a group"""
 *         if name == "metadata":             # <<<<<<<<<<<<<<
 *             return self.metadata
 *         else:
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":129
 *             return self.metadata
 *         else:
 *             return self.getGroup(name)             # <<<<<<<<<<<<<<
 * 
 *     def __setattr__(CFADataset self, basestring grp_name, value):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self->__pyx_vtab)->getGroup(__pyx_v_self, __pyx_v_name, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":124
 *         raise CFAError("Not permitted.")
 * 
 *     def __getattr__(CFADataset self, basestring name):             # <<<<<<<<<<<<<<
 *         """Overload the getattribute to return a group"""
 *         if name == "metadata":
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":131
 *             return self.getGroup(name)
 * 
 *     def __setattr__(CFADataset self, basestring grp_name, value):             # <<<<<<<<<<<<<<
 *         """Overload the setattribute to return an error"""
 *         raise CFAError("Not permitted.")
 */

/* Python wrapper */
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_11__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_grp_name, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_10__setattr__[] = "Overload the setattribute to return an error";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_10__setattr__;
#endif
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_11__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_grp_name, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grp_name), (&PyBaseString_Type), 1, "grp_name", 1))) __PYX_ERR(0, 131, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_10__setattr__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self), ((PyObject*)__pyx_v_grp_name), ((PyObject *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_10__setattr__(CYTHON_UNUSED struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_grp_name, CYTHON_UNUSED PyObject *__pyx_v_value) {
  int __pyx_r;
  __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("__setattr__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":133
 *     def __setattr__(CFADataset self, basestring grp_name, value):
 *         """Overload the setattribute to return an error"""
 *         raise CFAError("Not permitted.")             # <<<<<<<<<<<<<<
 * 
 *     cpdef CFAGroup createGroup(CFADataset self, basestring grp_name,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CFAError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Not_permitted) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Not_permitted);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __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_ERR(0, 133, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":131
 *             return self.getGroup(name)
 * 
 *     def __setattr__(CFADataset self, basestring grp_name, value):             # <<<<<<<<<<<<<<
 *         """Overload the setattribute to return an error"""
 *         raise CFAError("Not permitted.")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":135
 *         raise CFAError("Not permitted.")
 * 
 *     cpdef CFAGroup createGroup(CFADataset self, basestring grp_name,             # <<<<<<<<<<<<<<
 *                                dict metadata=dict()):
 *         """Create a group with the name grp_name.
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_13createGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_createGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_grp_name, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_createGroup *__pyx_optional_args) {
  PyObject *__pyx_v_metadata = __pyx_k__5;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__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;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("createGroup", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_metadata = __pyx_optional_args->metadata;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_createGroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_13createGroup)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_grp_name, __pyx_v_metadata};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_grp_name, __pyx_v_metadata};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_grp_name);
          __Pyx_GIVEREF(__pyx_v_grp_name);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_grp_name);
          __Pyx_INCREF(__pyx_v_metadata);
          __Pyx_GIVEREF(__pyx_v_metadata);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_metadata);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup))))) __PYX_ERR(0, 135, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":151
 * 
 *         # Check that the group hasn't already been added
 *         if grp_name in self.cfa_groups:             # <<<<<<<<<<<<<<
 *             raise CFAGroupError((
 *                 "Could not createGroup {}, group already exists"
 */
  if (unlikely(__pyx_v_self->cfa_groups == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 151, __pyx_L1_error)
  }
  __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_v_grp_name, __pyx_v_self->cfa_groups, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (unlikely(__pyx_t_8)) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":152
 *         # Check that the group hasn't already been added
 *         if grp_name in self.cfa_groups:
 *             raise CFAGroupError((             # <<<<<<<<<<<<<<
 *                 "Could not createGroup {}, group already exists"
 *             ).format(grp_name))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CFAGroupError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":154
 *             raise CFAGroupError((
 *                 "Could not createGroup {}, group already exists"
 *             ).format(grp_name))             # <<<<<<<<<<<<<<
 *         # create the group and add it to the dictionary of groups
 *         self.cfa_groups[grp_name] = CFAGroup(
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Could_not_createGroup_group_alre, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_v_grp_name) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_grp_name);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __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_ERR(0, 152, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":151
 * 
 *         # Check that the group hasn't already been added
 *         if grp_name in self.cfa_groups:             # <<<<<<<<<<<<<<
 *             raise CFAGroupError((
 *                 "Could not createGroup {}, group already exists"
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":156
 *             ).format(grp_name))
 *         # create the group and add it to the dictionary of groups
 *         self.cfa_groups[grp_name] = CFAGroup(             # <<<<<<<<<<<<<<
 *                                         grp_name,
 *                                         dataset=self,
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_grp_name);
  __Pyx_GIVEREF(__pyx_v_grp_name);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_grp_name);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":158
 *         self.cfa_groups[grp_name] = CFAGroup(
 *                                         grp_name,
 *                                         dataset=self,             # <<<<<<<<<<<<<<
 *                                         metadata=metadata
 *                                     )
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dataset, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 158, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":159
 *                                         grp_name,
 *                                         dataset=self,
 *                                         metadata=metadata             # <<<<<<<<<<<<<<
 *                                     )
 *         # return the group
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_metadata, __pyx_v_metadata) < 0) __PYX_ERR(0, 158, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":156
 *             ).format(grp_name))
 *         # create the group and add it to the dictionary of groups
 *         self.cfa_groups[grp_name] = CFAGroup(             # <<<<<<<<<<<<<<
 *                                         grp_name,
 *                                         dataset=self,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __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(__pyx_v_self->cfa_groups == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 156, __pyx_L1_error)
  }
  if (unlikely(PyDict_SetItem(__pyx_v_self->cfa_groups, __pyx_v_grp_name, __pyx_t_3) < 0)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":162
 *                                     )
 *         # return the group
 *         return self.cfa_groups[grp_name]             # <<<<<<<<<<<<<<
 * 
 *     cpdef CFAGroup getGroup(CFADataset self, basestring grp_name):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (unlikely(__pyx_v_self->cfa_groups == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 162, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->cfa_groups, __pyx_v_grp_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup))))) __PYX_ERR(0, 162, __pyx_L1_error)
  __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":135
 *         raise CFAError("Not permitted.")
 * 
 *     cpdef CFAGroup createGroup(CFADataset self, basestring grp_name,             # <<<<<<<<<<<<<<
 *                                dict metadata=dict()):
 *         """Create a group with the name grp_name.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.createGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_13createGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_12createGroup[] = "Create a group with the name grp_name.\n\n        Args:\n            grp_name (string): the name of the group.\n            metadata (dict)  : the metadata for the group\n\n        Returns:\n            CFAGroup: The instance of the group if created successfully.\n\n        Exceptions:\n            CFAError: if the group already exists\n        ";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_13createGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_grp_name = 0;
  PyObject *__pyx_v_metadata = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("createGroup (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grp_name,&__pyx_n_s_metadata,0};
    PyObject* values[2] = {0,0};
    values[1] = __pyx_k__5;
    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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grp_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_metadata);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createGroup") < 0)) __PYX_ERR(0, 135, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_grp_name = ((PyObject*)values[0]);
    __pyx_v_metadata = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("createGroup", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 135, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.createGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grp_name), (&PyBaseString_Type), 1, "grp_name", 1))) __PYX_ERR(0, 135, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_metadata), (&PyDict_Type), 1, "metadata", 1))) __PYX_ERR(0, 136, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_12createGroup(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self), __pyx_v_grp_name, __pyx_v_metadata);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_12createGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_grp_name, PyObject *__pyx_v_metadata) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_createGroup __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("createGroup", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.metadata = __pyx_v_metadata;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFADataset->createGroup(__pyx_v_self, __pyx_v_grp_name, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __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("S3netCDF4.CFA._CFAClasses.CFADataset.createGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":164
 *         return self.cfa_groups[grp_name]
 * 
 *     cpdef CFAGroup getGroup(CFADataset self, basestring grp_name):             # <<<<<<<<<<<<<<
 *         """Get a group with the name grp_name.
 * 
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_15getGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_grp_name); /*proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_grp_name, int __pyx_skip_dispatch) {
  CYTHON_UNUSED PyObject *__pyx_v_e = NULL;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  char const *__pyx_t_14;
  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;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getGroup", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getGroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_15getGroup)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_grp_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_grp_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup))))) __PYX_ERR(0, 164, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":175
 *         """
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return self.cfa_groups[grp_name]
 *         except KeyError as e:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":176
 * 
 *         try:
 *             return self.cfa_groups[grp_name]             # <<<<<<<<<<<<<<
 *         except KeyError as e:
 *             raise CFAGroupError((
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      if (unlikely(__pyx_v_self->cfa_groups == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 176, __pyx_L3_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->cfa_groups, __pyx_v_grp_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup))))) __PYX_ERR(0, 176, __pyx_L3_error)
      __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":175
 *         """
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return self.cfa_groups[grp_name]
 *         except KeyError as e:
 */
    }
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":177
 *         try:
 *             return self.cfa_groups[grp_name]
 *         except KeyError as e:             # <<<<<<<<<<<<<<
 *             raise CFAGroupError((
 *                 "Could not getGroup {}, group does not exist."
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.getGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 177, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_e = __pyx_t_2;
      /*try:*/ {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":178
 *             return self.cfa_groups[grp_name]
 *         except KeyError as e:
 *             raise CFAGroupError((             # <<<<<<<<<<<<<<
 *                 "Could not getGroup {}, group does not exist."
 *             ).format(grp_name))
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_CFAGroupError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 178, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_9);

        /* "S3netCDF4/CFA/_CFAClasses.pyx":180
 *             raise CFAGroupError((
 *                 "Could not getGroup {}, group does not exist."
 *             ).format(grp_name))             # <<<<<<<<<<<<<<
 * 
 *     cpdef object renameGroup(CFADataset self,
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Could_not_getGroup_group_does_no, __pyx_n_s_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 180, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_v_grp_name) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_grp_name);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 180, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 178, __pyx_L14_error)
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":177
 *         try:
 *             return self.cfa_groups[grp_name]
 *         except KeyError as e:             # <<<<<<<<<<<<<<
 *             raise CFAGroupError((
 *                 "Could not getGroup {}, group does not exist."
 */
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 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;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __pyx_t_8 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e);
            __pyx_v_e = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":175
 *         """
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return self.cfa_groups[grp_name]
 *         except KeyError as e:
 */
    __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_L7_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;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":164
 *         return self.cfa_groups[grp_name]
 * 
 *     cpdef CFAGroup getGroup(CFADataset self, basestring grp_name):             # <<<<<<<<<<<<<<
 *         """Get a group with the name grp_name.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.getGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_15getGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_grp_name); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_14getGroup[] = "Get a group with the name grp_name.\n\n        Args:\n            grp_name (string): the name of the group.\n\n        Returns:\n            CFAGroup: The group identified by grp_name\n\n        ";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_15getGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_grp_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getGroup (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grp_name), (&PyBaseString_Type), 1, "grp_name", 1))) __PYX_ERR(0, 164, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_14getGroup(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self), ((PyObject*)__pyx_v_grp_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_14getGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_grp_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("getGroup", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getGroup(__pyx_v_self, __pyx_v_grp_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __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("S3netCDF4.CFA._CFAClasses.CFADataset.getGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":182
 *             ).format(grp_name))
 * 
 *     cpdef object renameGroup(CFADataset self,             # <<<<<<<<<<<<<<
 *                              basestring old_name,
 *                              basestring new_name
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_17renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_renameGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_old_name, PyObject *__pyx_v_new_name, int __pyx_skip_dispatch) {
  CYTHON_UNUSED PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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;
  int __pyx_t_13;
  char const *__pyx_t_14;
  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;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("renameGroup", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_renameGroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_17renameGroup)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_old_name, __pyx_v_new_name};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_old_name, __pyx_v_new_name};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 182, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_old_name);
          __Pyx_GIVEREF(__pyx_v_old_name);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_old_name);
          __Pyx_INCREF(__pyx_v_new_name);
          __Pyx_GIVEREF(__pyx_v_new_name);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_new_name);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":196
 *         """
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_groups[new_name] = self.cfa_groups.pop(old_name)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":198
 *         try:
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_groups[new_name] = self.cfa_groups.pop(old_name)             # <<<<<<<<<<<<<<
 *             self.cfa_groups[new_name].setName(new_name)
 *         except KeyError as e:
 */
      if (unlikely(__pyx_v_self->cfa_groups == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
        __PYX_ERR(0, 198, __pyx_L3_error)
      }
      __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_self->cfa_groups, __pyx_v_old_name, ((PyObject *)NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__pyx_v_self->cfa_groups == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 198, __pyx_L3_error)
      }
      if (unlikely(PyDict_SetItem(__pyx_v_self->cfa_groups, __pyx_v_new_name, __pyx_t_1) < 0)) __PYX_ERR(0, 198, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":199
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_groups[new_name] = self.cfa_groups.pop(old_name)
 *             self.cfa_groups[new_name].setName(new_name)             # <<<<<<<<<<<<<<
 *         except KeyError as e:
 *             raise CFAGroupError((
 */
      if (unlikely(__pyx_v_self->cfa_groups == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 199, __pyx_L3_error)
      }
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->cfa_groups, __pyx_v_new_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_setName); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_new_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_new_name);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":196
 *         """
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_groups[new_name] = self.cfa_groups.pop(old_name)
 */
    }
    __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_L8_try_end;
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":200
 *             self.cfa_groups[new_name] = self.cfa_groups.pop(old_name)
 *             self.cfa_groups[new_name].setName(new_name)
 *         except KeyError as e:             # <<<<<<<<<<<<<<
 *             raise CFAGroupError((
 *                 "Could not renameGroup {}, group does not exist."
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.renameGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 200, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_e = __pyx_t_3;
      /*try:*/ {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":201
 *             self.cfa_groups[new_name].setName(new_name)
 *         except KeyError as e:
 *             raise CFAGroupError((             # <<<<<<<<<<<<<<
 *                 "Could not renameGroup {}, group does not exist."
 *             ).format(old_name))
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CFAGroupError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_4);

        /* "S3netCDF4/CFA/_CFAClasses.pyx":203
 *             raise CFAGroupError((
 *                 "Could not renameGroup {}, group does not exist."
 *             ).format(old_name))             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Could_not_renameGroup_group_does, __pyx_n_s_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 203, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_v_old_name) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_old_name);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 203, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __pyx_L14_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_ERR(0, 201, __pyx_L14_error)
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":200
 *             self.cfa_groups[new_name] = self.cfa_groups.pop(old_name)
 *             self.cfa_groups[new_name].setName(new_name)
 *         except KeyError as e:             # <<<<<<<<<<<<<<
 *             raise CFAGroupError((
 *                 "Could not renameGroup {}, group does not exist."
 */
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 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;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __pyx_t_5 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e);
            __pyx_v_e = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
          __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":196
 *         """
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_groups[new_name] = self.cfa_groups.pop(old_name)
 */
    __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_L8_try_end:;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":204
 *                 "Could not renameGroup {}, group does not exist."
 *             ).format(old_name))
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring getName(CFADataset self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":182
 *             ).format(grp_name))
 * 
 *     cpdef object renameGroup(CFADataset self,             # <<<<<<<<<<<<<<
 *                              basestring old_name,
 *                              basestring new_name
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.renameGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_17renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_16renameGroup[] = "Rename a group from old_name to new_name.\n\n        Args:\n            old_name(string): the current name of the group.\n            new_name(string): the new name of the group.\n\n        Returns:\n            bool: True if group renamed successfully, False otherwise.\n        ";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_17renameGroup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_old_name = 0;
  PyObject *__pyx_v_new_name = 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_old_name,&__pyx_n_s_new_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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_old_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_new_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("renameGroup", 1, 2, 2, 1); __PYX_ERR(0, 182, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameGroup") < 0)) __PYX_ERR(0, 182, __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_old_name = ((PyObject*)values[0]);
    __pyx_v_new_name = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("renameGroup", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 182, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.renameGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_name), (&PyBaseString_Type), 1, "old_name", 1))) __PYX_ERR(0, 183, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_name), (&PyBaseString_Type), 1, "new_name", 1))) __PYX_ERR(0, 184, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_16renameGroup(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self), __pyx_v_old_name, __pyx_v_new_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_16renameGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v_old_name, PyObject *__pyx_v_new_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("renameGroup", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_renameGroup(__pyx_v_self, __pyx_v_old_name, __pyx_v_new_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __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("S3netCDF4.CFA._CFAClasses.CFADataset.renameGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":206
 *         return True
 * 
 *     cpdef basestring getName(CFADataset self):             # <<<<<<<<<<<<<<
 *         """Get the name of the dataset.
 * 
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_19getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getName", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getName); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_19getName)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 206, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":212
 *             string: the name of the dataset
 *         """
 *         return self.name             # <<<<<<<<<<<<<<
 * 
 *     cpdef list getGroups(CFADataset self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":206
 *         return True
 * 
 *     cpdef basestring getName(CFADataset self):             # <<<<<<<<<<<<<<
 *         """Get the name of the dataset.
 * 
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFADataset.getName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_19getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_18getName[] = "Get the name of the dataset.\n\n        Returns:\n            string: the name of the dataset\n        ";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_19getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getName (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_18getName(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_18getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__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("getName", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getName(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __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("S3netCDF4.CFA._CFAClasses.CFADataset.getName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":214
 *         return self.name
 * 
 *     cpdef list getGroups(CFADataset self):             # <<<<<<<<<<<<<<
 *         """Get the name of all the groups for this CFADataset.
 * 
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_21getGroups(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getGroups(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_8genexpr1__pyx_v_k = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getGroups", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getGroups); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_21getGroups)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 214, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":220
 *             list<string>: A list of all the names of the groups in this CFADataset
 *         """
 *         return [k for k in self.cfa_groups.keys()]             # <<<<<<<<<<<<<<
 * 
 *     cpdef dict getMetadata(CFADataset self):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = 0;
    if (unlikely(__pyx_v_self->cfa_groups == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys");
      __PYX_ERR(0, 220, __pyx_L5_error)
    }
    __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_self->cfa_groups, 1, __pyx_n_s_keys, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;
    while (1) {
      __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_6, &__pyx_t_5, &__pyx_t_3, NULL, NULL, __pyx_t_7);
      if (unlikely(__pyx_t_8 == 0)) break;
      if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 220, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_k, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_8genexpr1__pyx_v_k))) __PYX_ERR(0, 220, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k); __pyx_8genexpr1__pyx_v_k = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k); __pyx_8genexpr1__pyx_v_k = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":214
 *         return self.name
 * 
 *     cpdef list getGroups(CFADataset self):             # <<<<<<<<<<<<<<
 *         """Get the name of all the groups for this CFADataset.
 * 
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFADataset.getGroups", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_21getGroups(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_20getGroups[] = "Get the name of all the groups for this CFADataset.\n\n        Returns:\n            list<string>: A list of all the names of the groups in this CFADataset\n        ";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_21getGroups(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getGroups (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_20getGroups(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_20getGroups(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__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("getGroups", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getGroups(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __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("S3netCDF4.CFA._CFAClasses.CFADataset.getGroups", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":222
 *         return [k for k in self.cfa_groups.keys()]
 * 
 *     cpdef dict getMetadata(CFADataset self):             # <<<<<<<<<<<<<<
 *         """Return the metadata for the CFADataset.
 * 
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_23getMetadata(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getMetadata", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMetadata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_23getMetadata)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 222, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":227
 *         Returns:
 *             dict<mixed>: The dictionary of metadata for the Dataset."""
 *         return self.metadata             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring getCFAVersion(CFADataset self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->metadata);
  __pyx_r = __pyx_v_self->metadata;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":222
 *         return [k for k in self.cfa_groups.keys()]
 * 
 *     cpdef dict getMetadata(CFADataset self):             # <<<<<<<<<<<<<<
 *         """Return the metadata for the CFADataset.
 * 
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFADataset.getMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_23getMetadata(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_22getMetadata[] = "Return the metadata for the CFADataset.\n\n        Returns:\n            dict<mixed>: The dictionary of metadata for the Dataset.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_23getMetadata(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMetadata (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_22getMetadata(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_22getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__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("getMetadata", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getMetadata(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __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("S3netCDF4.CFA._CFAClasses.CFADataset.getMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":229
 *         return self.metadata
 * 
 *     cpdef basestring getCFAVersion(CFADataset self):             # <<<<<<<<<<<<<<
 *         """Return the CFA version for the CFADataset.
 * 
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_25getCFAVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getCFAVersion(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getCFAVersion", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getCFAVersion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_25getCFAVersion)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 229, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":234
 *         Returns:
 *             basestring: the CFA version of the Dataset."""
 *         return self.cfa_version             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring getFormat(CFADataset self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->cfa_version);
  __pyx_r = __pyx_v_self->cfa_version;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":229
 *         return self.metadata
 * 
 *     cpdef basestring getCFAVersion(CFADataset self):             # <<<<<<<<<<<<<<
 *         """Return the CFA version for the CFADataset.
 * 
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFADataset.getCFAVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_25getCFAVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_24getCFAVersion[] = "Return the CFA version for the CFADataset.\n\n        Returns:\n            basestring: the CFA version of the Dataset.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_25getCFAVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getCFAVersion (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_24getCFAVersion(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_24getCFAVersion(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__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("getCFAVersion", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getCFAVersion(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __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("S3netCDF4.CFA._CFAClasses.CFADataset.getCFAVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":236
 *         return self.cfa_version
 * 
 *     cpdef basestring getFormat(CFADataset self):             # <<<<<<<<<<<<<<
 *         """Return the file format for the CFADataset.
 * 
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_27getFormat(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getFormat(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getFormat", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getFormat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_27getFormat)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 236, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":241
 *         Returns:
 *             string: the file format of the CFADataset"""
 *         return self.format             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->format);
  __pyx_r = __pyx_v_self->format;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":236
 *         return self.cfa_version
 * 
 *     cpdef basestring getFormat(CFADataset self):             # <<<<<<<<<<<<<<
 *         """Return the file format for the CFADataset.
 * 
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFADataset.getFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_27getFormat(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_26getFormat[] = "Return the file format for the CFADataset.\n\n        Returns:\n            string: the file format of the CFADataset";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_27getFormat(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getFormat (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_26getFormat(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_26getFormat(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__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("getFormat", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getFormat(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __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("S3netCDF4.CFA._CFAClasses.CFADataset.getFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_28__reduce_cython__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_28__reduce_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __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("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.cfa_groups, self.cfa_version, self.format, self.metadata, self.name)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->cfa_groups);
  __Pyx_GIVEREF(__pyx_v_self->cfa_groups);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->cfa_groups);
  __Pyx_INCREF(__pyx_v_self->cfa_version);
  __Pyx_GIVEREF(__pyx_v_self->cfa_version);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->cfa_version);
  __Pyx_INCREF(__pyx_v_self->format);
  __Pyx_GIVEREF(__pyx_v_self->format);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->format);
  __Pyx_INCREF(__pyx_v_self->metadata);
  __Pyx_GIVEREF(__pyx_v_self->metadata);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->metadata);
  __Pyx_INCREF(__pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_v_self->name);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->name);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.cfa_groups, self.cfa_version, self.format, self.metadata, self.name)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.cfa_groups, self.cfa_version, self.format, self.metadata, self.name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.cfa_groups is not None or self.cfa_version is not None or self.format is not None or self.metadata is not None or self.name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.cfa_groups, self.cfa_version, self.format, self.metadata, self.name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.cfa_groups is not None or self.cfa_version is not None or self.format is not None or self.metadata is not None or self.name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CFADataset, (type(self), 0xac13b3c, None), state
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->cfa_groups != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->cfa_version != ((PyObject*)Py_None));
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->format != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->metadata != ((PyObject*)Py_None));
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->name != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_2 != 0);
    __pyx_t_3 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.cfa_groups is not None or self.cfa_version is not None or self.format is not None or self.metadata is not None or self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CFADataset, (type(self), 0xac13b3c, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.cfa_groups is not None or self.cfa_version is not None or self.format is not None or self.metadata is not None or self.name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_CFADataset, (type(self), 0xac13b3c, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CFADataset, (type(self), 0xac13b3c, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_CFADataset); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_180435772);
    __Pyx_GIVEREF(__pyx_int_180435772);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_180435772);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.cfa_groups is not None or self.cfa_version is not None or self.format is not None or self.metadata is not None or self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CFADataset, (type(self), 0xac13b3c, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CFADataset, (type(self), 0xac13b3c, None), state
 *     else:
 *         return __pyx_unpickle_CFADataset, (type(self), 0xac13b3c, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CFADataset__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_CFADataset); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_180435772);
    __Pyx_GIVEREF(__pyx_int_180435772);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_180435772);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CFADataset, (type(self), 0xac13b3c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CFADataset__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_30__setstate_cython__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_30__setstate_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_CFADataset, (type(self), 0xac13b3c, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CFADataset__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFADataset__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CFADataset, (type(self), 0xac13b3c, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CFADataset__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADataset.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":289
 *     cdef dict cfa_dims
 * 
 *     def __init__(CFAGroup self,             # <<<<<<<<<<<<<<
 *                  basestring group_name,
 *                  dataset=None,
 */

/* Python wrapper */
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup___init__[] = "Initialise a CFAGroups object";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup___init__;
#endif
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_group_name = 0;
  PyObject *__pyx_v_dataset = 0;
  PyObject *__pyx_v_cfa_dims = 0;
  PyObject *__pyx_v_cfa_vars = 0;
  PyObject *__pyx_v_metadata = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group_name,&__pyx_n_s_dataset,&__pyx_n_s_cfa_dims,&__pyx_n_s_cfa_vars,&__pyx_n_s_metadata,0};
    PyObject* values[5] = {0,0,0,0,0};

    /* "S3netCDF4/CFA/_CFAClasses.pyx":291
 *     def __init__(CFAGroup self,
 *                  basestring group_name,
 *                  dataset=None,             # <<<<<<<<<<<<<<
 *                  dict cfa_dims=dict(),
 *                  dict cfa_vars=dict(),
 */
    values[1] = ((PyObject *)Py_None);
    values[2] = __pyx_k__6;
    values[3] = __pyx_k__7;
    values[4] = __pyx_k__8;
    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);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dataset);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfa_dims);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfa_vars);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_metadata);
          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_ERR(0, 289, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_group_name = ((PyObject*)values[0]);
    __pyx_v_dataset = values[1];
    __pyx_v_cfa_dims = ((PyObject*)values[2]);
    __pyx_v_cfa_vars = ((PyObject*)values[3]);
    __pyx_v_metadata = ((PyObject*)values[4]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 289, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group_name), (&PyBaseString_Type), 1, "group_name", 1))) __PYX_ERR(0, 290, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfa_dims), (&PyDict_Type), 1, "cfa_dims", 1))) __PYX_ERR(0, 292, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfa_vars), (&PyDict_Type), 1, "cfa_vars", 1))) __PYX_ERR(0, 293, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_metadata), (&PyDict_Type), 1, "metadata", 1))) __PYX_ERR(0, 294, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup___init__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self), __pyx_v_group_name, __pyx_v_dataset, __pyx_v_cfa_dims, __pyx_v_cfa_vars, __pyx_v_metadata);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":289
 *     cdef dict cfa_dims
 * 
 *     def __init__(CFAGroup self,             # <<<<<<<<<<<<<<
 *                  basestring group_name,
 *                  dataset=None,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup___init__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_group_name, PyObject *__pyx_v_dataset, PyObject *__pyx_v_cfa_dims, PyObject *__pyx_v_cfa_vars, PyObject *__pyx_v_metadata) {
  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("__init__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":299
 *         # have to initialise like this to avoid storing a reference to the
 *         # variable that is passed in
 *         self.grp_name = basestring(group_name)             # <<<<<<<<<<<<<<
 *         self.dataset = dataset      # it's okay to store a reference to this!
 *         self.metadata = dict(metadata)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBaseString_Type)), __pyx_v_group_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->grp_name);
  __Pyx_DECREF(__pyx_v_self->grp_name);
  __pyx_v_self->grp_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":300
 *         # variable that is passed in
 *         self.grp_name = basestring(group_name)
 *         self.dataset = dataset      # it's okay to store a reference to this!             # <<<<<<<<<<<<<<
 *         self.metadata = dict(metadata)
 *         self.cfa_dims = dict(cfa_dims)
 */
  if (!(likely(((__pyx_v_dataset) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dataset, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADataset))))) __PYX_ERR(0, 300, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_dataset;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dataset);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->dataset));
  __pyx_v_self->dataset = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":301
 *         self.grp_name = basestring(group_name)
 *         self.dataset = dataset      # it's okay to store a reference to this!
 *         self.metadata = dict(metadata)             # <<<<<<<<<<<<<<
 *         self.cfa_dims = dict(cfa_dims)
 *         self.cfa_vars = dict(cfa_vars)
 */
  if (unlikely(__pyx_v_metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    __PYX_ERR(0, 301, __pyx_L1_error)
  }
  __pyx_t_1 = PyDict_Copy(__pyx_v_metadata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->metadata);
  __Pyx_DECREF(__pyx_v_self->metadata);
  __pyx_v_self->metadata = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":302
 *         self.dataset = dataset      # it's okay to store a reference to this!
 *         self.metadata = dict(metadata)
 *         self.cfa_dims = dict(cfa_dims)             # <<<<<<<<<<<<<<
 *         self.cfa_vars = dict(cfa_vars)
 * 
 */
  if (unlikely(__pyx_v_cfa_dims == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    __PYX_ERR(0, 302, __pyx_L1_error)
  }
  __pyx_t_1 = PyDict_Copy(__pyx_v_cfa_dims); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->cfa_dims);
  __Pyx_DECREF(__pyx_v_self->cfa_dims);
  __pyx_v_self->cfa_dims = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":303
 *         self.metadata = dict(metadata)
 *         self.cfa_dims = dict(cfa_dims)
 *         self.cfa_vars = dict(cfa_vars)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(CFAGroup self):
 */
  if (unlikely(__pyx_v_cfa_vars == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    __PYX_ERR(0, 303, __pyx_L1_error)
  }
  __pyx_t_1 = PyDict_Copy(__pyx_v_cfa_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->cfa_vars);
  __Pyx_DECREF(__pyx_v_self->cfa_vars);
  __pyx_v_self->cfa_vars = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":289
 *     cdef dict cfa_dims
 * 
 *     def __init__(CFAGroup self,             # <<<<<<<<<<<<<<
 *                  basestring group_name,
 *                  dataset=None,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":305
 *         self.cfa_vars = dict(cfa_vars)
 * 
 *     def __repr__(CFAGroup self):             # <<<<<<<<<<<<<<
 *         """String representation of the CFAGroup."""
 *         repstr = repr(type(self)) + " : name = {} : dimensions = {} : variables = {}\n".format(
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_3__repr__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_2__repr__[] = "String representation of the CFAGroup.";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_2__repr__;
#endif
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_2__repr__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_2__repr__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self) {
  PyObject *__pyx_v_repstr = NULL;
  PyObject *__pyx_v_md = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_dim = NULL;
  PyObject *__pyx_8genexpr3__pyx_v_var = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":307
 *     def __repr__(CFAGroup self):
 *         """String representation of the CFAGroup."""
 *         repstr = repr(type(self)) + " : name = {} : dimensions = {} : variables = {}\n".format(             # <<<<<<<<<<<<<<
 *             self.grp_name,
 *             str([dim for dim in self.cfa_dims]),
 */
  __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_name_dimensions_variables, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":309
 *         repstr = repr(type(self)) + " : name = {} : dimensions = {} : variables = {}\n".format(
 *             self.grp_name,
 *             str([dim for dim in self.cfa_dims]),             # <<<<<<<<<<<<<<
 *             str([var for var in self.cfa_vars])
 *         )
 */
  { /* enter inner scope */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = 0;
    if (unlikely(__pyx_v_self->cfa_dims == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 309, __pyx_L5_error)
    }
    __pyx_t_9 = __Pyx_dict_iterator(__pyx_v_self->cfa_dims, 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 309, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_5);
    __pyx_t_5 = __pyx_t_9;
    __pyx_t_9 = 0;
    while (1) {
      __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_7, &__pyx_t_6, &__pyx_t_9, NULL, NULL, __pyx_t_8);
      if (unlikely(__pyx_t_10 == 0)) break;
      if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 309, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_dim, __pyx_t_9);
      __pyx_t_9 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_8genexpr2__pyx_v_dim))) __PYX_ERR(0, 309, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_dim); __pyx_8genexpr2__pyx_v_dim = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_dim); __pyx_8genexpr2__pyx_v_dim = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":310
 *             self.grp_name,
 *             str([dim for dim in self.cfa_dims]),
 *             str([var for var in self.cfa_vars])             # <<<<<<<<<<<<<<
 *         )
 *         for md in self.metadata:
 */
  { /* enter inner scope */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 310, __pyx_L11_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = 0;
    if (unlikely(__pyx_v_self->cfa_vars == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 310, __pyx_L11_error)
    }
    __pyx_t_11 = __Pyx_dict_iterator(__pyx_v_self->cfa_vars, 1, ((PyObject *)NULL), (&__pyx_t_6), (&__pyx_t_8)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 310, __pyx_L11_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_9);
    __pyx_t_9 = __pyx_t_11;
    __pyx_t_11 = 0;
    while (1) {
      __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_9, __pyx_t_6, &__pyx_t_7, &__pyx_t_11, NULL, NULL, __pyx_t_8);
      if (unlikely(__pyx_t_10 == 0)) break;
      if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 310, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_var, __pyx_t_11);
      __pyx_t_11 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_8genexpr3__pyx_v_var))) __PYX_ERR(0, 310, __pyx_L11_error)
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_var); __pyx_8genexpr3__pyx_v_var = 0;
    goto __pyx_L14_exit_scope;
    __pyx_L11_error:;
    __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_var); __pyx_8genexpr3__pyx_v_var = 0;
    goto __pyx_L1_error;
    __pyx_L14_exit_scope:;
  } /* exit inner scope */
  __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->grp_name, __pyx_t_5, __pyx_t_9};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->grp_name, __pyx_t_5, __pyx_t_9};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self->grp_name);
    __Pyx_GIVEREF(__pyx_v_self->grp_name);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_8, __pyx_v_self->grp_name);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_8, __pyx_t_9);
    __pyx_t_5 = 0;
    __pyx_t_9 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":307
 *     def __repr__(CFAGroup self):
 *         """String representation of the CFAGroup."""
 *         repstr = repr(type(self)) + " : name = {} : dimensions = {} : variables = {}\n".format(             # <<<<<<<<<<<<<<
 *             self.grp_name,
 *             str([dim for dim in self.cfa_dims]),
 */
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_repstr = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":312
 *             str([var for var in self.cfa_vars])
 *         )
 *         for md in self.metadata:             # <<<<<<<<<<<<<<
 *             repstr += "\t{} : {}\n".format(md, self.metadata[md])
 *         return repstr[:-1]
 */
  __pyx_t_6 = 0;
  if (unlikely(__pyx_v_self->metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 312, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->metadata, 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __pyx_t_3 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_7, &__pyx_t_6, &__pyx_t_2, NULL, NULL, __pyx_t_8);
    if (unlikely(__pyx_t_10 == 0)) break;
    if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_md, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":313
 *         )
 *         for md in self.metadata:
 *             repstr += "\t{} : {}\n".format(md, self.metadata[md])             # <<<<<<<<<<<<<<
 *         return repstr[:-1]
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__3, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_v_self->metadata == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 313, __pyx_L1_error)
    }
    __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_self->metadata, __pyx_v_md); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_md, __pyx_t_11};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_md, __pyx_t_11};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 313, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_9) {
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL;
      }
      __Pyx_INCREF(__pyx_v_md);
      __Pyx_GIVEREF(__pyx_v_md);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_10, __pyx_v_md);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_10, __pyx_t_11);
      __pyx_t_11 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_repstr, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_repstr, __pyx_t_1);
    __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":314
 *         for md in self.metadata:
 *             repstr += "\t{} : {}\n".format(md, self.metadata[md])
 *         return repstr[:-1]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(CFAGroup self, basestring name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_repstr, 0, -1L, NULL, NULL, &__pyx_slice__4, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":305
 *         self.cfa_vars = dict(cfa_vars)
 * 
 *     def __repr__(CFAGroup self):             # <<<<<<<<<<<<<<
 *         """String representation of the CFAGroup."""
 *         repstr = repr(type(self)) + " : name = {} : dimensions = {} : variables = {}\n".format(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_repstr);
  __Pyx_XDECREF(__pyx_v_md);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_dim);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_var);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":316
 *         return repstr[:-1]
 * 
 *     def __getitem__(CFAGroup self, basestring name):             # <<<<<<<<<<<<<<
 *         """Overload getitem to behave as getattr"""
 *         if name == "metadata":
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_4__getitem__[] = "Overload getitem to behave as getattr";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_4__getitem__;
#endif
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyBaseString_Type), 1, "name", 1))) __PYX_ERR(0, 316, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_4__getitem__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self), ((PyObject*)__pyx_v_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_4__getitem__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_name) {
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":318
 *     def __getitem__(CFAGroup self, basestring name):
 *         """Overload getitem to behave as getattr"""
 *         if name == "metadata":             # <<<<<<<<<<<<<<
 *             return self.metadata
 *         else:
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_metadata, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 318, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":319
 *         """Overload getitem to behave as getattr"""
 *         if name == "metadata":
 *             return self.metadata             # <<<<<<<<<<<<<<
 *         else:
 *             return self.__getattr__(name)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->metadata);
    __pyx_r = __pyx_v_self->metadata;
    goto __pyx_L0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":318
 *     def __getitem__(CFAGroup self, basestring name):
 *         """Overload getitem to behave as getattr"""
 *         if name == "metadata":             # <<<<<<<<<<<<<<
 *             return self.metadata
 *         else:
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":321
 *             return self.metadata
 *         else:
 *             return self.__getattr__(name)             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(CFAGroup self, basestring name):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getattr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_name);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":316
 *         return repstr[:-1]
 * 
 *     def __getitem__(CFAGroup self, basestring name):             # <<<<<<<<<<<<<<
 *         """Overload getitem to behave as getattr"""
 *         if name == "metadata":
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":323
 *             return self.__getattr__(name)
 * 
 *     def __getattr__(CFAGroup self, basestring name):             # <<<<<<<<<<<<<<
 *         """Return the variable or dimension with the name of varname"""
 *         if name == "shape":
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_7__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_6__getattr__[] = "Return the variable or dimension with the name of varname";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_6__getattr__;
#endif
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_7__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyBaseString_Type), 1, "name", 1))) __PYX_ERR(0, 323, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_6__getattr__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self), ((PyObject*)__pyx_v_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_6__getattr__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":325
 *     def __getattr__(CFAGroup self, basestring name):
 *         """Return the variable or dimension with the name of varname"""
 *         if name == "shape":             # <<<<<<<<<<<<<<
 *             return self.shape
 *         elif name == "metadata":
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_shape, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 325, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":326
 *         """Return the variable or dimension with the name of varname"""
 *         if name == "shape":
 *             return self.shape             # <<<<<<<<<<<<<<
 *         elif name == "metadata":
 *             return self.metadata
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":325
 *     def __getattr__(CFAGroup self, basestring name):
 *         """Return the variable or dimension with the name of varname"""
 *         if name == "shape":             # <<<<<<<<<<<<<<
 *             return self.shape
 *         elif name == "metadata":
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":327
 *         if name == "shape":
 *             return self.shape
 *         elif name == "metadata":             # <<<<<<<<<<<<<<
 *             return self.metadata
 *         elif name in self.cfa_vars:
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_metadata, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 327, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":328
 *             return self.shape
 *         elif name == "metadata":
 *             return self.metadata             # <<<<<<<<<<<<<<
 *         elif name in self.cfa_vars:
 *             return self.getVariable(name)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->metadata);
    __pyx_r = __pyx_v_self->metadata;
    goto __pyx_L0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":327
 *         if name == "shape":
 *             return self.shape
 *         elif name == "metadata":             # <<<<<<<<<<<<<<
 *             return self.metadata
 *         elif name in self.cfa_vars:
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":329
 *         elif name == "metadata":
 *             return self.metadata
 *         elif name in self.cfa_vars:             # <<<<<<<<<<<<<<
 *             return self.getVariable(name)
 *         elif name in self.cfa_dims:
 */
  if (unlikely(__pyx_v_self->cfa_vars == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 329, __pyx_L1_error)
  }
  __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_self->cfa_vars, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 329, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":330
 *             return self.metadata
 *         elif name in self.cfa_vars:
 *             return self.getVariable(name)             # <<<<<<<<<<<<<<
 *         elif name in self.cfa_dims:
 *             return self.getDimension(name)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self->__pyx_vtab)->getVariable(__pyx_v_self, __pyx_v_name, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":329
 *         elif name == "metadata":
 *             return self.metadata
 *         elif name in self.cfa_vars:             # <<<<<<<<<<<<<<
 *             return self.getVariable(name)
 *         elif name in self.cfa_dims:
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":331
 *         elif name in self.cfa_vars:
 *             return self.getVariable(name)
 *         elif name in self.cfa_dims:             # <<<<<<<<<<<<<<
 *             return self.getDimension(name)
 *         else:
 */
  if (unlikely(__pyx_v_self->cfa_dims == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 331, __pyx_L1_error)
  }
  __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_self->cfa_dims, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 331, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":332
 *             return self.getVariable(name)
 *         elif name in self.cfa_dims:
 *             return self.getDimension(name)             # <<<<<<<<<<<<<<
 *         else:
 *             raise CFAGroupError("{} is neither a variable nor a dimension"
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self->__pyx_vtab)->getDimension(__pyx_v_self, __pyx_v_name, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":331
 *         elif name in self.cfa_vars:
 *             return self.getVariable(name)
 *         elif name in self.cfa_dims:             # <<<<<<<<<<<<<<
 *             return self.getDimension(name)
 *         else:
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":334
 *             return self.getDimension(name)
 *         else:
 *             raise CFAGroupError("{} is neither a variable nor a dimension"             # <<<<<<<<<<<<<<
 *                                 "".format(name))
 * 
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CFAGroupError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":335
 *         else:
 *             raise CFAGroupError("{} is neither a variable nor a dimension"
 *                                 "".format(name))             # <<<<<<<<<<<<<<
 * 
 *     cpdef _ensure_axis_has_type(CFAGroup self, basestring var_name):
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_is_neither_a_variable_nor_a_dim, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_name);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __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_ERR(0, 334, __pyx_L1_error)
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":323
 *             return self.__getattr__(name)
 * 
 *     def __getattr__(CFAGroup self, basestring name):             # <<<<<<<<<<<<<<
 *         """Return the variable or dimension with the name of varname"""
 *         if name == "shape":
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":337
 *                                 "".format(name))
 * 
 *     cpdef _ensure_axis_has_type(CFAGroup self, basestring var_name):             # <<<<<<<<<<<<<<
 *         """Before calling the splitting algorithm (which may be called by
 *         createVariable), we need to assign the axis types to the dimensions,
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_9_ensure_axis_has_type(PyObject *__pyx_v_self, PyObject *__pyx_v_var_name); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup__ensure_axis_has_type(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_var_name, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_dimensions = NULL;
  PyObject *__pyx_v_d = NULL;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_dim = NULL;
  PyObject *__pyx_v_axis_type = NULL;
  PyObject *__pyx_v_dim_md = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_ensure_axis_has_type", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ensure_axis_has_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_9_ensure_axis_has_type)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_var_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_var_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":348
 *            N - not defined."""
 *         # loop over the cfa_dims
 *         dimensions = self.getDimensions()             # <<<<<<<<<<<<<<
 *         for d in dimensions:
 *             # get the dimension and the dimension variable
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self->__pyx_vtab)->getDimensions(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dimensions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":349
 *         # loop over the cfa_dims
 *         dimensions = self.getDimensions()
 *         for d in dimensions:             # <<<<<<<<<<<<<<
 *             # get the dimension and the dimension variable
 *             dim = self.getDimension(d)
 */
  if (unlikely(__pyx_v_dimensions == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 349, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_dimensions; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
  for (;;) {
    if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 349, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":351
 *         for d in dimensions:
 *             # get the dimension and the dimension variable
 *             dim = self.getDimension(d)             # <<<<<<<<<<<<<<
 *             axis_type = dim.getAxisType()
 *             if axis_type != "U":
 */
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_d))||((__pyx_v_d) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_d)->tp_name), 0))) __PYX_ERR(0, 351, __pyx_L1_error)
    __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self->__pyx_vtab)->getDimension(__pyx_v_self, ((PyObject*)__pyx_v_d), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_dim, ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":352
 *             # get the dimension and the dimension variable
 *             dim = self.getDimension(d)
 *             axis_type = dim.getAxisType()             # <<<<<<<<<<<<<<
 *             if axis_type != "U":
 *                 continue
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_dim->__pyx_vtab)->getAxisType(__pyx_v_dim, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_axis_type, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":353
 *             dim = self.getDimension(d)
 *             axis_type = dim.getAxisType()
 *             if axis_type != "U":             # <<<<<<<<<<<<<<
 *                 continue
 *             dim_md = dim.getMetadata()
 */
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_axis_type, __pyx_n_u_U, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 353, __pyx_L1_error)
    __pyx_t_7 = (__pyx_t_6 != 0);
    if (__pyx_t_7) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":354
 *             axis_type = dim.getAxisType()
 *             if axis_type != "U":
 *                 continue             # <<<<<<<<<<<<<<
 *             dim_md = dim.getMetadata()
 *             if "axis" in dim_md and dim_md["axis"] in ["T", "Z", "Y", "X", "N"]:
 */
      goto __pyx_L3_continue;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":353
 *             dim = self.getDimension(d)
 *             axis_type = dim.getAxisType()
 *             if axis_type != "U":             # <<<<<<<<<<<<<<
 *                 continue
 *             dim_md = dim.getMetadata()
 */
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":355
 *             if axis_type != "U":
 *                 continue
 *             dim_md = dim.getMetadata()             # <<<<<<<<<<<<<<
 *             if "axis" in dim_md and dim_md["axis"] in ["T", "Z", "Y", "X", "N"]:
 *                 dim.axis_type = dim_md["axis"]
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_dim->__pyx_vtab)->getMetadata(__pyx_v_dim, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_dim_md, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":356
 *                 continue
 *             dim_md = dim.getMetadata()
 *             if "axis" in dim_md and dim_md["axis"] in ["T", "Z", "Y", "X", "N"]:             # <<<<<<<<<<<<<<
 *                 dim.axis_type = dim_md["axis"]
 *             # no variable, or no axis attribute so we're going to guess from the
 */
    if (unlikely(__pyx_v_dim_md == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 356, __pyx_L1_error)
    }
    __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_axis, __pyx_v_dim_md, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 356, __pyx_L1_error)
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L7_bool_binop_done;
    }
    if (unlikely(__pyx_v_dim_md == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 356, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_dim_md, __pyx_n_u_axis); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_T, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 356, __pyx_L1_error)
    if (!__pyx_t_6) {
    } else {
      __pyx_t_8 = __pyx_t_6;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_Z, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 356, __pyx_L1_error)
    if (!__pyx_t_6) {
    } else {
      __pyx_t_8 = __pyx_t_6;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_Y, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 356, __pyx_L1_error)
    if (!__pyx_t_6) {
    } else {
      __pyx_t_8 = __pyx_t_6;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_X, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 356, __pyx_L1_error)
    if (!__pyx_t_6) {
    } else {
      __pyx_t_8 = __pyx_t_6;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_N, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 356, __pyx_L1_error)
    __pyx_t_8 = __pyx_t_6;
    __pyx_L9_bool_binop_done:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = (__pyx_t_8 != 0);
    __pyx_t_7 = __pyx_t_6;
    __pyx_L7_bool_binop_done:;
    if (__pyx_t_7) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":357
 *             dim_md = dim.getMetadata()
 *             if "axis" in dim_md and dim_md["axis"] in ["T", "Z", "Y", "X", "N"]:
 *                 dim.axis_type = dim_md["axis"]             # <<<<<<<<<<<<<<
 *             # no variable, or no axis attribute so we're going to guess from the
 *             # name of the dimension
 */
      if (unlikely(__pyx_v_dim_md == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 357, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_dim_md, __pyx_n_u_axis); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 357, __pyx_L1_error)
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_dim->axis_type);
      __Pyx_DECREF(__pyx_v_dim->axis_type);
      __pyx_v_dim->axis_type = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":356
 *                 continue
 *             dim_md = dim.getMetadata()
 *             if "axis" in dim_md and dim_md["axis"] in ["T", "Z", "Y", "X", "N"]:             # <<<<<<<<<<<<<<
 *                 dim.axis_type = dim_md["axis"]
 *             # no variable, or no axis attribute so we're going to guess from the
 */
      goto __pyx_L6;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":360
 *             # no variable, or no axis attribute so we're going to guess from the
 *             # name of the dimension
 *             elif (len(d) < 3 and d[0] == "t") or "time" in d:             # <<<<<<<<<<<<<<
 *                 dim.axis_type = "T"
 *             elif (len(d) < 3 and d[0] == "z") or "level" in d:
 */
    __pyx_t_9 = PyObject_Length(__pyx_v_d); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 360, __pyx_L1_error)
    __pyx_t_6 = ((__pyx_t_9 < 3) != 0);
    if (!__pyx_t_6) {
      goto __pyx_L15_next_or;
    } else {
    }
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_d, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_t, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 360, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_L15_next_or:;
    __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_time, __pyx_v_d, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 360, __pyx_L1_error)
    __pyx_t_8 = (__pyx_t_6 != 0);
    __pyx_t_7 = __pyx_t_8;
    __pyx_L14_bool_binop_done:;
    if (__pyx_t_7) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":361
 *             # name of the dimension
 *             elif (len(d) < 3 and d[0] == "t") or "time" in d:
 *                 dim.axis_type = "T"             # <<<<<<<<<<<<<<
 *             elif (len(d) < 3 and d[0] == "z") or "level" in d:
 *                 dim.axis_type = "Z"
 */
      __Pyx_INCREF(__pyx_n_u_T);
      __Pyx_GIVEREF(__pyx_n_u_T);
      __Pyx_GOTREF(__pyx_v_dim->axis_type);
      __Pyx_DECREF(__pyx_v_dim->axis_type);
      __pyx_v_dim->axis_type = ((PyObject*)__pyx_n_u_T);

      /* "S3netCDF4/CFA/_CFAClasses.pyx":360
 *             # no variable, or no axis attribute so we're going to guess from the
 *             # name of the dimension
 *             elif (len(d) < 3 and d[0] == "t") or "time" in d:             # <<<<<<<<<<<<<<
 *                 dim.axis_type = "T"
 *             elif (len(d) < 3 and d[0] == "z") or "level" in d:
 */
      goto __pyx_L6;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":362
 *             elif (len(d) < 3 and d[0] == "t") or "time" in d:
 *                 dim.axis_type = "T"
 *             elif (len(d) < 3 and d[0] == "z") or "level" in d:             # <<<<<<<<<<<<<<
 *                 dim.axis_type = "Z"
 *             elif (len(d) < 3 and d[0] == "y") or d[0:3] == "lat":
 */
    __pyx_t_9 = PyObject_Length(__pyx_v_d); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 362, __pyx_L1_error)
    __pyx_t_8 = ((__pyx_t_9 < 3) != 0);
    if (!__pyx_t_8) {
      goto __pyx_L18_next_or;
    } else {
    }
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_d, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_z, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 362, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L17_bool_binop_done;
    }
    __pyx_L18_next_or:;
    __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_level, __pyx_v_d, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 362, __pyx_L1_error)
    __pyx_t_6 = (__pyx_t_8 != 0);
    __pyx_t_7 = __pyx_t_6;
    __pyx_L17_bool_binop_done:;
    if (__pyx_t_7) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":363
 *                 dim.axis_type = "T"
 *             elif (len(d) < 3 and d[0] == "z") or "level" in d:
 *                 dim.axis_type = "Z"             # <<<<<<<<<<<<<<
 *             elif (len(d) < 3 and d[0] == "y") or d[0:3] == "lat":
 *                 dim.axis_type = "Y"
 */
      __Pyx_INCREF(__pyx_n_u_Z);
      __Pyx_GIVEREF(__pyx_n_u_Z);
      __Pyx_GOTREF(__pyx_v_dim->axis_type);
      __Pyx_DECREF(__pyx_v_dim->axis_type);
      __pyx_v_dim->axis_type = ((PyObject*)__pyx_n_u_Z);

      /* "S3netCDF4/CFA/_CFAClasses.pyx":362
 *             elif (len(d) < 3 and d[0] == "t") or "time" in d:
 *                 dim.axis_type = "T"
 *             elif (len(d) < 3 and d[0] == "z") or "level" in d:             # <<<<<<<<<<<<<<
 *                 dim.axis_type = "Z"
 *             elif (len(d) < 3 and d[0] == "y") or d[0:3] == "lat":
 */
      goto __pyx_L6;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":364
 *             elif (len(d) < 3 and d[0] == "z") or "level" in d:
 *                 dim.axis_type = "Z"
 *             elif (len(d) < 3 and d[0] == "y") or d[0:3] == "lat":             # <<<<<<<<<<<<<<
 *                 dim.axis_type = "Y"
 *             elif (len(d) < 3 and d[0] == "x") or d[0:3] == "lon":
 */
    __pyx_t_9 = PyObject_Length(__pyx_v_d); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 364, __pyx_L1_error)
    __pyx_t_6 = ((__pyx_t_9 < 3) != 0);
    if (!__pyx_t_6) {
      goto __pyx_L21_next_or;
    } else {
    }
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_d, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_y, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 364, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L20_bool_binop_done;
    }
    __pyx_L21_next_or:;
    __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_d, 0, 3, NULL, NULL, &__pyx_slice__9, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_lat, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 364, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __pyx_t_6;
    __pyx_L20_bool_binop_done:;
    if (__pyx_t_7) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":365
 *                 dim.axis_type = "Z"
 *             elif (len(d) < 3 and d[0] == "y") or d[0:3] == "lat":
 *                 dim.axis_type = "Y"             # <<<<<<<<<<<<<<
 *             elif (len(d) < 3 and d[0] == "x") or d[0:3] == "lon":
 *                 dim.axis_type = "X"
 */
      __Pyx_INCREF(__pyx_n_u_Y);
      __Pyx_GIVEREF(__pyx_n_u_Y);
      __Pyx_GOTREF(__pyx_v_dim->axis_type);
      __Pyx_DECREF(__pyx_v_dim->axis_type);
      __pyx_v_dim->axis_type = ((PyObject*)__pyx_n_u_Y);

      /* "S3netCDF4/CFA/_CFAClasses.pyx":364
 *             elif (len(d) < 3 and d[0] == "z") or "level" in d:
 *                 dim.axis_type = "Z"
 *             elif (len(d) < 3 and d[0] == "y") or d[0:3] == "lat":             # <<<<<<<<<<<<<<
 *                 dim.axis_type = "Y"
 *             elif (len(d) < 3 and d[0] == "x") or d[0:3] == "lon":
 */
      goto __pyx_L6;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":366
 *             elif (len(d) < 3 and d[0] == "y") or d[0:3] == "lat":
 *                 dim.axis_type = "Y"
 *             elif (len(d) < 3 and d[0] == "x") or d[0:3] == "lon":             # <<<<<<<<<<<<<<
 *                 dim.axis_type = "X"
 *             else:
 */
    __pyx_t_9 = PyObject_Length(__pyx_v_d); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 366, __pyx_L1_error)
    __pyx_t_6 = ((__pyx_t_9 < 3) != 0);
    if (!__pyx_t_6) {
      goto __pyx_L24_next_or;
    } else {
    }
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_d, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_x, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 366, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_6) {
    } else {
      __pyx_t_7 = __pyx_t_6;
      goto __pyx_L23_bool_binop_done;
    }
    __pyx_L24_next_or:;
    __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_d, 0, 3, NULL, NULL, &__pyx_slice__9, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_lon, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 366, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __pyx_t_6;
    __pyx_L23_bool_binop_done:;
    if (__pyx_t_7) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":367
 *                 dim.axis_type = "Y"
 *             elif (len(d) < 3 and d[0] == "x") or d[0:3] == "lon":
 *                 dim.axis_type = "X"             # <<<<<<<<<<<<<<
 *             else:
 *                 dim.axis_type = "N"
 */
      __Pyx_INCREF(__pyx_n_u_X);
      __Pyx_GIVEREF(__pyx_n_u_X);
      __Pyx_GOTREF(__pyx_v_dim->axis_type);
      __Pyx_DECREF(__pyx_v_dim->axis_type);
      __pyx_v_dim->axis_type = ((PyObject*)__pyx_n_u_X);

      /* "S3netCDF4/CFA/_CFAClasses.pyx":366
 *             elif (len(d) < 3 and d[0] == "y") or d[0:3] == "lat":
 *                 dim.axis_type = "Y"
 *             elif (len(d) < 3 and d[0] == "x") or d[0:3] == "lon":             # <<<<<<<<<<<<<<
 *                 dim.axis_type = "X"
 *             else:
 */
      goto __pyx_L6;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":369
 *                 dim.axis_type = "X"
 *             else:
 *                 dim.axis_type = "N"             # <<<<<<<<<<<<<<
 * 
 *     cpdef CFAVariable createVariable(CFAGroup self,
 */
    /*else*/ {
      __Pyx_INCREF(__pyx_n_u_N);
      __Pyx_GIVEREF(__pyx_n_u_N);
      __Pyx_GOTREF(__pyx_v_dim->axis_type);
      __Pyx_DECREF(__pyx_v_dim->axis_type);
      __pyx_v_dim->axis_type = ((PyObject*)__pyx_n_u_N);
    }
    __pyx_L6:;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":349
 *         # loop over the cfa_dims
 *         dimensions = self.getDimensions()
 *         for d in dimensions:             # <<<<<<<<<<<<<<
 *             # get the dimension and the dimension variable
 *             dim = self.getDimension(d)
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":337
 *                                 "".format(name))
 * 
 *     cpdef _ensure_axis_has_type(CFAGroup self, basestring var_name):             # <<<<<<<<<<<<<<
 *         """Before calling the splitting algorithm (which may be called by
 *         createVariable), we need to assign the axis types to the dimensions,
 */

  /* 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_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup._ensure_axis_has_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dimensions);
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF((PyObject *)__pyx_v_dim);
  __Pyx_XDECREF(__pyx_v_axis_type);
  __Pyx_XDECREF(__pyx_v_dim_md);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_9_ensure_axis_has_type(PyObject *__pyx_v_self, PyObject *__pyx_v_var_name); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_8_ensure_axis_has_type[] = "Before calling the splitting algorithm (which may be called by\n        createVariable), we need to assign the axis types to the dimensions,\n        if the axis type is undefined (==\"U\").\n         These axis types can be:\n           T - time - (axis=\"T\", name=\"t\077\077\" or name contains \"time\")\n           Z - level - (axis=\"Z\", name=\"z\077\077\" or name contains \"level\")\n           Y - y axis / latitude (axis=\"Y\", name=\"lat*\" or name=\"y\077\077\")\n           X - x axis / longitude (axis=\"X\", name=\"lon*\" or name=\"x\077\077\")\n           N - not defined.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_9_ensure_axis_has_type(PyObject *__pyx_v_self, PyObject *__pyx_v_var_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_ensure_axis_has_type (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var_name), (&PyBaseString_Type), 1, "var_name", 1))) __PYX_ERR(0, 337, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_8_ensure_axis_has_type(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self), ((PyObject*)__pyx_v_var_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_8_ensure_axis_has_type(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_var_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("_ensure_axis_has_type", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup__ensure_axis_has_type(__pyx_v_self, __pyx_v_var_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __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("S3netCDF4.CFA._CFAClasses.CFAGroup._ensure_axis_has_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":371
 *                 dim.axis_type = "N"
 * 
 *     cpdef CFAVariable createVariable(CFAGroup self,             # <<<<<<<<<<<<<<
 *                          basestring var_name,
 *                          np.dtype nc_dtype,
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_11createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createVariable(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_var_name, PyArray_Descr *__pyx_v_nc_dtype, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createVariable *__pyx_optional_args) {
  PyObject *__pyx_v_dim_names = __pyx_k__10;
  PyArrayObject *__pyx_v_subarray_shape = __pyx_k__11;
  int __pyx_v_max_subarray_size = ((int)0);
  PyObject *__pyx_v_metadata = __pyx_k__12;
  PyObject *__pyx_v_dim = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_shape = NULL;
  PyObject *__pyx_v_axis_types = NULL;
  PyObject *__pyx_v_dim_name = NULL;
  PyObject *__pyx_v_axis_type = NULL;
  PyObject *__pyx_v_cfa_splitter = NULL;
  PyObject *__pyx_v_pmshape = NULL;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("createVariable", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dim_names = __pyx_optional_args->dim_names;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_subarray_shape = __pyx_optional_args->subarray_shape;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_max_subarray_size = __pyx_optional_args->max_subarray_size;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_metadata = __pyx_optional_args->metadata;
          }
        }
      }
    }
  }
  __Pyx_INCREF((PyObject *)__pyx_v_subarray_shape);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_createVariable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_11createVariable)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_max_subarray_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        __pyx_t_6 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_6 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[7] = {__pyx_t_5, __pyx_v_var_name, ((PyObject *)__pyx_v_nc_dtype), __pyx_v_dim_names, ((PyObject *)__pyx_v_subarray_shape), __pyx_t_3, __pyx_v_metadata};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 6+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[7] = {__pyx_t_5, __pyx_v_var_name, ((PyObject *)__pyx_v_nc_dtype), __pyx_v_dim_names, ((PyObject *)__pyx_v_subarray_shape), __pyx_t_3, __pyx_v_metadata};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 6+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(6+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 371, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_var_name);
          __Pyx_GIVEREF(__pyx_v_var_name);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_var_name);
          __Pyx_INCREF(((PyObject *)__pyx_v_nc_dtype));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_nc_dtype));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_nc_dtype));
          __Pyx_INCREF(__pyx_v_dim_names);
          __Pyx_GIVEREF(__pyx_v_dim_names);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_dim_names);
          __Pyx_INCREF(((PyObject *)__pyx_v_subarray_shape));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_subarray_shape));
          PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, ((PyObject *)__pyx_v_subarray_shape));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_6, __pyx_t_3);
          __Pyx_INCREF(__pyx_v_metadata);
          __Pyx_GIVEREF(__pyx_v_metadata);
          PyTuple_SET_ITEM(__pyx_t_7, 5+__pyx_t_6, __pyx_v_metadata);
          __pyx_t_3 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable))))) __PYX_ERR(0, 371, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":401
 * 
 *         # Check that the variable hasn't already been added
 *         if var_name in self.cfa_vars:             # <<<<<<<<<<<<<<
 *             raise CFAVariableError((
 *                 "Could not createVariable {}, variable already exists"
 */
  if (unlikely(__pyx_v_self->cfa_vars == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 401, __pyx_L1_error)
  }
  __pyx_t_8 = (__Pyx_PyDict_ContainsTF(__pyx_v_var_name, __pyx_v_self->cfa_vars, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 401, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (unlikely(__pyx_t_9)) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":402
 *         # Check that the variable hasn't already been added
 *         if var_name in self.cfa_vars:
 *             raise CFAVariableError((             # <<<<<<<<<<<<<<
 *                 "Could not createVariable {}, variable already exists"
 *             ).format(var_name))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CFAVariableError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":404
 *             raise CFAVariableError((
 *                 "Could not createVariable {}, variable already exists"
 *             ).format(var_name))             # <<<<<<<<<<<<<<
 * 
 *         # ensure that the axes have a type associated with them before running
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Could_not_createVariable_variabl, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_v_var_name) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_var_name);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __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_ERR(0, 402, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":401
 * 
 *         # Check that the variable hasn't already been added
 *         if var_name in self.cfa_vars:             # <<<<<<<<<<<<<<
 *             raise CFAVariableError((
 *                 "Could not createVariable {}, variable already exists"
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":408
 *         # ensure that the axes have a type associated with them before running
 *         # the splitting algorithm
 *         self._ensure_axis_has_type(var_name)             # <<<<<<<<<<<<<<
 * 
 *         # There are three cases for creating the CFA subarray:
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self->__pyx_vtab)->_ensure_axis_has_type(__pyx_v_self, __pyx_v_var_name, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":422
 * 
 *         # check that the dimensions exist in the cfa_dims dict
 *         for dim in dim_names:             # <<<<<<<<<<<<<<
 *             if dim not in self.cfa_dims:
 *                 raise CFADimensionError(
 */
  if (unlikely(__pyx_v_dim_names == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 422, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_dim_names; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
  for (;;) {
    if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":423
 *         # check that the dimensions exist in the cfa_dims dict
 *         for dim in dim_names:
 *             if dim not in self.cfa_dims:             # <<<<<<<<<<<<<<
 *                 raise CFADimensionError(
 *                     "Dimension: {} does not exist in CFA group: {}. Please "
 */
    if (unlikely(__pyx_v_self->cfa_dims == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 423, __pyx_L1_error)
    }
    __pyx_t_9 = (__Pyx_PyDict_ContainsTF(__pyx_v_dim, __pyx_v_self->cfa_dims, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 423, __pyx_L1_error)
    __pyx_t_8 = (__pyx_t_9 != 0);
    if (unlikely(__pyx_t_8)) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":424
 *         for dim in dim_names:
 *             if dim not in self.cfa_dims:
 *                 raise CFADimensionError(             # <<<<<<<<<<<<<<
 *                     "Dimension: {} does not exist in CFA group: {}. Please "
 *                     "create the dimension using CFAGroup::createDimension".format(
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CFADimensionError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

      /* "S3netCDF4/CFA/_CFAClasses.pyx":426
 *                 raise CFADimensionError(
 *                     "Dimension: {} does not exist in CFA group: {}. Please "
 *                     "create the dimension using CFAGroup::createDimension".format(             # <<<<<<<<<<<<<<
 *                         dim, self.grp_name
 *                     )
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Dimension_does_not_exist_in_CFA, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "S3netCDF4/CFA/_CFAClasses.pyx":427
 *                     "Dimension: {} does not exist in CFA group: {}. Please "
 *                     "create the dimension using CFAGroup::createDimension".format(
 *                         dim, self.grp_name             # <<<<<<<<<<<<<<
 *                     )
 *                 )
 */
      __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_dim, __pyx_v_self->grp_name};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_dim, __pyx_v_self->grp_name};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__pyx_t_5) {
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL;
        }
        __Pyx_INCREF(__pyx_v_dim);
        __Pyx_GIVEREF(__pyx_v_dim);
        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_v_dim);
        __Pyx_INCREF(__pyx_v_self->grp_name);
        __Pyx_GIVEREF(__pyx_v_self->grp_name);
        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_v_self->grp_name);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __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_ERR(0, 424, __pyx_L1_error)

      /* "S3netCDF4/CFA/_CFAClasses.pyx":423
 *         # check that the dimensions exist in the cfa_dims dict
 *         for dim in dim_names:
 *             if dim not in self.cfa_dims:             # <<<<<<<<<<<<<<
 *                 raise CFADimensionError(
 *                     "Dimension: {} does not exist in CFA group: {}. Please "
 */
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":422
 * 
 *         # check that the dimensions exist in the cfa_dims dict
 *         for dim in dim_names:             # <<<<<<<<<<<<<<
 *             if dim not in self.cfa_dims:
 *                 raise CFADimensionError(
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":432
 * 
 *         # check that if subarray_shape is specified then shape is also specified
 *         if subarray_shape.size != 0:             # <<<<<<<<<<<<<<
 *             if len(dim_names) == 0:
 *                 raise CFASubArrayError(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_subarray_shape), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":433
 *         # check that if subarray_shape is specified then shape is also specified
 *         if subarray_shape.size != 0:
 *             if len(dim_names) == 0:             # <<<<<<<<<<<<<<
 *                 raise CFASubArrayError(
 *                     "Dimensions of CFAVariable are not specified but the"
 */
    if (unlikely(__pyx_v_dim_names == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 433, __pyx_L1_error)
    }
    __pyx_t_10 = PyList_GET_SIZE(__pyx_v_dim_names); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 433, __pyx_L1_error)
    __pyx_t_8 = ((__pyx_t_10 == 0) != 0);
    if (unlikely(__pyx_t_8)) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":434
 *         if subarray_shape.size != 0:
 *             if len(dim_names) == 0:
 *                 raise CFASubArrayError(             # <<<<<<<<<<<<<<
 *                     "Dimensions of CFAVariable are not specified but the"
 *                     " subarray_shape is specified. This is not possible."
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CFASubArrayError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_kp_u_Dimensions_of_CFAVariable_are_no) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u_Dimensions_of_CFAVariable_are_no);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __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_ERR(0, 434, __pyx_L1_error)

      /* "S3netCDF4/CFA/_CFAClasses.pyx":433
 *         # check that if subarray_shape is specified then shape is also specified
 *         if subarray_shape.size != 0:
 *             if len(dim_names) == 0:             # <<<<<<<<<<<<<<
 *                 raise CFASubArrayError(
 *                     "Dimensions of CFAVariable are not specified but the"
 */
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":441
 *             else:
 *                 # check the size of the specified subarray
 *                 if subarray_shape.size != len(dim_names):             # <<<<<<<<<<<<<<
 *                     raise CFASubArrayError(
 *                         "Number of dimensions in subarray_shape does not match"
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_subarray_shape), __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(__pyx_v_dim_names == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 441, __pyx_L1_error)
      }
      __pyx_t_10 = PyList_GET_SIZE(__pyx_v_dim_names); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 441, __pyx_L1_error)
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 441, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(__pyx_t_8)) {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":442
 *                 # check the size of the specified subarray
 *                 if subarray_shape.size != len(dim_names):
 *                     raise CFASubArrayError(             # <<<<<<<<<<<<<<
 *                         "Number of dimensions in subarray_shape does not match"
 *                         " those in shape."
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CFASubArrayError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_kp_u_Number_of_dimensions_in_subarray) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u_Number_of_dimensions_in_subarray);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __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_ERR(0, 442, __pyx_L1_error)

        /* "S3netCDF4/CFA/_CFAClasses.pyx":441
 *             else:
 *                 # check the size of the specified subarray
 *                 if subarray_shape.size != len(dim_names):             # <<<<<<<<<<<<<<
 *                     raise CFASubArrayError(
 *                         "Number of dimensions in subarray_shape does not match"
 */
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":447
 *                     )
 *                 # check each dimension is not longer than that in array
 *                 for i in range(0, subarray_shape.size):             # <<<<<<<<<<<<<<
 *                     if subarray_shape[i] > self.cfa_dims[dim_names[i]].getLen():
 *                         raise CFASubArrayError(
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_subarray_shape), __pyx_n_s_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_0);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
        __pyx_t_12 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 447, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_12)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 447, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 447, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_12(__pyx_t_1);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 447, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":448
 *                 # check each dimension is not longer than that in array
 *                 for i in range(0, subarray_shape.size):
 *                     if subarray_shape[i] > self.cfa_dims[dim_names[i]].getLen():             # <<<<<<<<<<<<<<
 *                         raise CFASubArrayError(
 *                             "Dimension in desired sub_array is larger than"
 */
        __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_subarray_shape), __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__pyx_v_self->cfa_dims == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 448, __pyx_L1_error)
        }
        if (unlikely(__pyx_v_dim_names == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 448, __pyx_L1_error)
        }
        __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_dim_names, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->cfa_dims, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getLen); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(__pyx_t_8)) {

          /* "S3netCDF4/CFA/_CFAClasses.pyx":449
 *                 for i in range(0, subarray_shape.size):
 *                     if subarray_shape[i] > self.cfa_dims[dim_names[i]].getLen():
 *                         raise CFASubArrayError(             # <<<<<<<<<<<<<<
 *                             "Dimension in desired sub_array is larger than"
 *                             " dimension in array for dimension: {}".format(
 */
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CFASubArrayError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);

          /* "S3netCDF4/CFA/_CFAClasses.pyx":451
 *                         raise CFASubArrayError(
 *                             "Dimension in desired sub_array is larger than"
 *                             " dimension in array for dimension: {}".format(             # <<<<<<<<<<<<<<
 *                                 dim_names[i]
 *                             )
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Dimension_in_desired_sub_array_i, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 451, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);

          /* "S3netCDF4/CFA/_CFAClasses.pyx":452
 *                             "Dimension in desired sub_array is larger than"
 *                             " dimension in array for dimension: {}".format(
 *                                 dim_names[i]             # <<<<<<<<<<<<<<
 *                             )
 *                         )
 */
          if (unlikely(__pyx_v_dim_names == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(0, 452, __pyx_L1_error)
          }
          __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_dim_names, __pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 452, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_5 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_5)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_11);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 449, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_Raise(__pyx_t_7, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __PYX_ERR(0, 449, __pyx_L1_error)

          /* "S3netCDF4/CFA/_CFAClasses.pyx":448
 *                 # check each dimension is not longer than that in array
 *                 for i in range(0, subarray_shape.size):
 *                     if subarray_shape[i] > self.cfa_dims[dim_names[i]].getLen():             # <<<<<<<<<<<<<<
 *                         raise CFASubArrayError(
 *                             "Dimension in desired sub_array is larger than"
 */
        }

        /* "S3netCDF4/CFA/_CFAClasses.pyx":447
 *                     )
 *                 # check each dimension is not longer than that in array
 *                 for i in range(0, subarray_shape.size):             # <<<<<<<<<<<<<<
 *                     if subarray_shape[i] > self.cfa_dims[dim_names[i]].getLen():
 *                         raise CFASubArrayError(
 */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":432
 * 
 *         # check that if subarray_shape is specified then shape is also specified
 *         if subarray_shape.size != 0:             # <<<<<<<<<<<<<<
 *             if len(dim_names) == 0:
 *                 raise CFASubArrayError(
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":456
 *                         )
 * 
 *         if len(dim_names) == 0:             # <<<<<<<<<<<<<<
 *             # create the variable and add it to the dictionary of variables
 *             self.cfa_vars[var_name] = CFAVariable(
 */
  if (unlikely(__pyx_v_dim_names == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 456, __pyx_L1_error)
  }
  __pyx_t_10 = PyList_GET_SIZE(__pyx_v_dim_names); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 456, __pyx_L1_error)
  __pyx_t_8 = ((__pyx_t_10 == 0) != 0);
  if (__pyx_t_8) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":459
 *             # create the variable and add it to the dictionary of variables
 *             self.cfa_vars[var_name] = CFAVariable(
 *                         var_name=var_name,             # <<<<<<<<<<<<<<
 *                         nc_dtype=nc_dtype,
 *                         group=self,
 */
    __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_var_name, __pyx_v_var_name) < 0) __PYX_ERR(0, 459, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":460
 *             self.cfa_vars[var_name] = CFAVariable(
 *                         var_name=var_name,
 *                         nc_dtype=nc_dtype,             # <<<<<<<<<<<<<<
 *                         group=self,
 *                         metadata=metadata
 */
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nc_dtype, ((PyObject *)__pyx_v_nc_dtype)) < 0) __PYX_ERR(0, 459, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":461
 *                         var_name=var_name,
 *                         nc_dtype=nc_dtype,
 *                         group=self,             # <<<<<<<<<<<<<<
 *                         metadata=metadata
 *                       )
 */
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_group, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 459, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":462
 *                         nc_dtype=nc_dtype,
 *                         group=self,
 *                         metadata=metadata             # <<<<<<<<<<<<<<
 *                       )
 *         else:
 */
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_metadata, __pyx_v_metadata) < 0) __PYX_ERR(0, 459, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":458
 *         if len(dim_names) == 0:
 *             # create the variable and add it to the dictionary of variables
 *             self.cfa_vars[var_name] = CFAVariable(             # <<<<<<<<<<<<<<
 *                         var_name=var_name,
 *                         nc_dtype=nc_dtype,
 */
    __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(__pyx_v_self->cfa_vars == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 458, __pyx_L1_error)
    }
    if (unlikely(PyDict_SetItem(__pyx_v_self->cfa_vars, __pyx_v_var_name, __pyx_t_7) < 0)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":456
 *                         )
 * 
 *         if len(dim_names) == 0:             # <<<<<<<<<<<<<<
 *             # create the variable and add it to the dictionary of variables
 *             self.cfa_vars[var_name] = CFAVariable(
 */
    goto __pyx_L13;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":466
 *         else:
 *             # get the shape and axis types from the dimensions
 *             shape = []             # <<<<<<<<<<<<<<
 *             axis_types = []
 *             # assign axis types
 */
  /*else*/ {
    __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_v_shape = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":467
 *             # get the shape and axis types from the dimensions
 *             shape = []
 *             axis_types = []             # <<<<<<<<<<<<<<
 *             # assign axis types
 *             for dim_name in dim_names:
 */
    __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_v_axis_types = ((PyObject*)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":469
 *             axis_types = []
 *             # assign axis types
 *             for dim_name in dim_names:             # <<<<<<<<<<<<<<
 *                 dim = self.cfa_dims[dim_name]
 *                 shape.append(dim.getLen())
 */
    if (unlikely(__pyx_v_dim_names == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 469, __pyx_L1_error)
    }
    __pyx_t_7 = __pyx_v_dim_names; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0;
    for (;;) {
      if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 469, __pyx_L1_error)
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_dim_name, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":470
 *             # assign axis types
 *             for dim_name in dim_names:
 *                 dim = self.cfa_dims[dim_name]             # <<<<<<<<<<<<<<
 *                 shape.append(dim.getLen())
 *                 axis_type = dim.getAxisType()
 */
      if (unlikely(__pyx_v_self->cfa_dims == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 470, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->cfa_dims, __pyx_v_dim_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":471
 *             for dim_name in dim_names:
 *                 dim = self.cfa_dims[dim_name]
 *                 shape.append(dim.getLen())             # <<<<<<<<<<<<<<
 *                 axis_type = dim.getAxisType()
 *                 axis_types.append(axis_type)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_getLen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_shape, __pyx_t_1); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 471, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":472
 *                 dim = self.cfa_dims[dim_name]
 *                 shape.append(dim.getLen())
 *                 axis_type = dim.getAxisType()             # <<<<<<<<<<<<<<
 *                 axis_types.append(axis_type)
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dim, __pyx_n_s_getAxisType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_axis_type, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":473
 *                 shape.append(dim.getLen())
 *                 axis_type = dim.getAxisType()
 *                 axis_types.append(axis_type)             # <<<<<<<<<<<<<<
 * 
 *             # create the splitter, even if the subarray shape is known
 */
      __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_axis_types, __pyx_v_axis_type); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 473, __pyx_L1_error)

      /* "S3netCDF4/CFA/_CFAClasses.pyx":469
 *             axis_types = []
 *             # assign axis types
 *             for dim_name in dim_names:             # <<<<<<<<<<<<<<
 *                 dim = self.cfa_dims[dim_name]
 *                 shape.append(dim.getLen())
 */
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":476
 * 
 *             # create the splitter, even if the subarray shape is known
 *             cfa_splitter = CFASplitter(             # <<<<<<<<<<<<<<
 *                                 shape=np.array(shape),
 *                                 max_subarray_size=max_subarray_size,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_CFASplitter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":477
 *             # create the splitter, even if the subarray shape is known
 *             cfa_splitter = CFASplitter(
 *                                 shape=np.array(shape),             # <<<<<<<<<<<<<<
 *                                 max_subarray_size=max_subarray_size,
 *                                 axis_types=axis_types
 */
    __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __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_ERR(0, 477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_shape) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_shape);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shape, __pyx_t_2) < 0) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":478
 *             cfa_splitter = CFASplitter(
 *                                 shape=np.array(shape),
 *                                 max_subarray_size=max_subarray_size,             # <<<<<<<<<<<<<<
 *                                 axis_types=axis_types
 *                             )
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_max_subarray_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_max_subarray_size, __pyx_t_2) < 0) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":479
 *                                 shape=np.array(shape),
 *                                 max_subarray_size=max_subarray_size,
 *                                 axis_types=axis_types             # <<<<<<<<<<<<<<
 *                             )
 *             if subarray_shape.size == 0:
 */
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis_types, __pyx_v_axis_types) < 0) __PYX_ERR(0, 477, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":476
 * 
 *             # create the splitter, even if the subarray shape is known
 *             cfa_splitter = CFASplitter(             # <<<<<<<<<<<<<<
 *                                 shape=np.array(shape),
 *                                 max_subarray_size=max_subarray_size,
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __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;
    __pyx_v_cfa_splitter = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":481
 *                                 axis_types=axis_types
 *                             )
 *             if subarray_shape.size == 0:             # <<<<<<<<<<<<<<
 *                 # run the splitter
 *                 subarray_shape = cfa_splitter.calculateSubarrayShape()
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_subarray_shape), __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 481, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_8) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":483
 *             if subarray_shape.size == 0:
 *                 # run the splitter
 *                 subarray_shape = cfa_splitter.calculateSubarrayShape()             # <<<<<<<<<<<<<<
 *             else:
 *                 cfa_splitter.setSubarrayShape(subarray_shape)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cfa_splitter, __pyx_n_s_calculateSubarrayShape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 483, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_subarray_shape, ((PyArrayObject *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":481
 *                                 axis_types=axis_types
 *                             )
 *             if subarray_shape.size == 0:             # <<<<<<<<<<<<<<
 *                 # run the splitter
 *                 subarray_shape = cfa_splitter.calculateSubarrayShape()
 */
      goto __pyx_L16;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":485
 *                 subarray_shape = cfa_splitter.calculateSubarrayShape()
 *             else:
 *                 cfa_splitter.setSubarrayShape(subarray_shape)             # <<<<<<<<<<<<<<
 * 
 *             # calculate the partition matrix shape, if no dimensions are zero
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cfa_splitter, __pyx_n_s_setSubarrayShape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, ((PyObject *)__pyx_v_subarray_shape)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_subarray_shape));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L16:;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":488
 * 
 *             # calculate the partition matrix shape, if no dimensions are zero
 *             pmshape = np.zeros(len(shape), np.int32)             # <<<<<<<<<<<<<<
 *             for i in range(0, len(shape)):
 *                 if shape[i] != 0 and subarray_shape[i] != 0:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = PyList_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 488, __pyx_L1_error)
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_2, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_2, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_11 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_6, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_6, __pyx_t_4);
      __pyx_t_2 = 0;
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_pmshape = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":489
 *             # calculate the partition matrix shape, if no dimensions are zero
 *             pmshape = np.zeros(len(shape), np.int32)
 *             for i in range(0, len(shape)):             # <<<<<<<<<<<<<<
 *                 if shape[i] != 0 and subarray_shape[i] != 0:
 *                     pmshape[i] = shape[i] / subarray_shape[i]
 */
    __pyx_t_10 = PyList_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 489, __pyx_L1_error)
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 489, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 489, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_12(__pyx_t_7);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 489, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":490
 *             pmshape = np.zeros(len(shape), np.int32)
 *             for i in range(0, len(shape)):
 *                 if shape[i] != 0 and subarray_shape[i] != 0:             # <<<<<<<<<<<<<<
 *                     pmshape[i] = shape[i] / subarray_shape[i]
 *                 else:
 */
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_shape, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 490, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 490, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_9) {
      } else {
        __pyx_t_8 = __pyx_t_9;
        goto __pyx_L20_bool_binop_done;
      }
      __pyx_t_11 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_subarray_shape), __pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 490, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_t_11, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 490, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = __pyx_t_9;
      __pyx_L20_bool_binop_done:;
      if (__pyx_t_8) {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":491
 *             for i in range(0, len(shape)):
 *                 if shape[i] != 0 and subarray_shape[i] != 0:
 *                     pmshape[i] = shape[i] / subarray_shape[i]             # <<<<<<<<<<<<<<
 *                 else:
 *                     pmshape[i] = 0
 */
        __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_shape, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_11 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_subarray_shape), __pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 491, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 491, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_pmshape, __pyx_v_i, __pyx_t_4) < 0)) __PYX_ERR(0, 491, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":490
 *             pmshape = np.zeros(len(shape), np.int32)
 *             for i in range(0, len(shape)):
 *                 if shape[i] != 0 and subarray_shape[i] != 0:             # <<<<<<<<<<<<<<
 *                     pmshape[i] = shape[i] / subarray_shape[i]
 *                 else:
 */
        goto __pyx_L19;
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":493
 *                     pmshape[i] = shape[i] / subarray_shape[i]
 *                 else:
 *                     pmshape[i] = 0             # <<<<<<<<<<<<<<
 * 
 *             # create the new variable
 */
      /*else*/ {
        if (unlikely(PyObject_SetItem(__pyx_v_pmshape, __pyx_v_i, __pyx_int_0) < 0)) __PYX_ERR(0, 493, __pyx_L1_error)
      }
      __pyx_L19:;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":489
 *             # calculate the partition matrix shape, if no dimensions are zero
 *             pmshape = np.zeros(len(shape), np.int32)
 *             for i in range(0, len(shape)):             # <<<<<<<<<<<<<<
 *                 if shape[i] != 0 and subarray_shape[i] != 0:
 *                     pmshape[i] = shape[i] / subarray_shape[i]
 */
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":497
 *             # create the new variable
 *             self.cfa_vars[var_name] = CFAVariable(
 *                 var_name=var_name,             # <<<<<<<<<<<<<<
 *                 nc_dtype=nc_dtype,
 *                 group=self,
 */
    __pyx_t_7 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_var_name, __pyx_v_var_name) < 0) __PYX_ERR(0, 497, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":498
 *             self.cfa_vars[var_name] = CFAVariable(
 *                 var_name=var_name,
 *                 nc_dtype=nc_dtype,             # <<<<<<<<<<<<<<
 *                 group=self,
 *                 metadata=metadata,
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_nc_dtype, ((PyObject *)__pyx_v_nc_dtype)) < 0) __PYX_ERR(0, 497, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":499
 *                 var_name=var_name,
 *                 nc_dtype=nc_dtype,
 *                 group=self,             # <<<<<<<<<<<<<<
 *                 metadata=metadata,
 *                 cf_role="cfa_variable",
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_group, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 497, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":500
 *                 nc_dtype=nc_dtype,
 *                 group=self,
 *                 metadata=metadata,             # <<<<<<<<<<<<<<
 *                 cf_role="cfa_variable",
 *                 cfa_dimensions=dim_names,
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_metadata, __pyx_v_metadata) < 0) __PYX_ERR(0, 497, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_cf_role, __pyx_n_u_cfa_variable) < 0) __PYX_ERR(0, 497, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":502
 *                 metadata=metadata,
 *                 cf_role="cfa_variable",
 *                 cfa_dimensions=dim_names,             # <<<<<<<<<<<<<<
 *                 pmdimensions=dim_names,
 *                 pmshape=pmshape,
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_cfa_dimensions, __pyx_v_dim_names) < 0) __PYX_ERR(0, 497, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":503
 *                 cf_role="cfa_variable",
 *                 cfa_dimensions=dim_names,
 *                 pmdimensions=dim_names,             # <<<<<<<<<<<<<<
 *                 pmshape=pmshape,
 *             )
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_pmdimensions, __pyx_v_dim_names) < 0) __PYX_ERR(0, 497, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":504
 *                 cfa_dimensions=dim_names,
 *                 pmdimensions=dim_names,
 *                 pmshape=pmshape,             # <<<<<<<<<<<<<<
 *             )
 * 
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_pmshape, __pyx_v_pmshape) < 0) __PYX_ERR(0, 497, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":496
 * 
 *             # create the new variable
 *             self.cfa_vars[var_name] = CFAVariable(             # <<<<<<<<<<<<<<
 *                 var_name=var_name,
 *                 nc_dtype=nc_dtype,
 */
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v_self->cfa_vars == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 496, __pyx_L1_error)
    }
    if (unlikely(PyDict_SetItem(__pyx_v_self->cfa_vars, __pyx_v_var_name, __pyx_t_4) < 0)) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L13:;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":507
 *             )
 * 
 *         return self.cfa_vars[var_name]             # <<<<<<<<<<<<<<
 * 
 *     cpdef CFAVariable getVariable(CFAGroup self, basestring var_name):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (unlikely(__pyx_v_self->cfa_vars == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 507, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->cfa_vars, __pyx_v_var_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable))))) __PYX_ERR(0, 507, __pyx_L1_error)
  __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":371
 *                 dim.axis_type = "N"
 * 
 *     cpdef CFAVariable createVariable(CFAGroup self,             # <<<<<<<<<<<<<<
 *                          basestring var_name,
 *                          np.dtype nc_dtype,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.createVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dim);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_shape);
  __Pyx_XDECREF(__pyx_v_axis_types);
  __Pyx_XDECREF(__pyx_v_dim_name);
  __Pyx_XDECREF(__pyx_v_axis_type);
  __Pyx_XDECREF(__pyx_v_cfa_splitter);
  __Pyx_XDECREF(__pyx_v_pmshape);
  __Pyx_XDECREF((PyObject *)__pyx_v_subarray_shape);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_11createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_10createVariable[] = "Create a CFA variable and add it to the group.\n\n        Args:\n            var_name (string): the name of the variable\n            nc_dtype (np.dtype): the type of the variable, as a numpy array\n              data type.\n            dim_names (list): a list of the dimension names that are present\n              in the cfa_group. If this is not a zero length list and if\n              subarray_shape is a zero length array then the array-splitter\n              will be called to determine the shape of the sub arrays.\n            subarray_shape (np.array): the shape of the subarrays.  If this is\n              not a zero length array and if shape is not a zero length array\n              then the subarrays will be created with this shape.\n            max_subarray_size (int): the maximum size of each of the subarrays,\n              size is the number of elements in the array.\n            metadata (dict): the dictionary of non-CFA metadata, e.g. netCDF\n              attributes.\n\n        Returns:\n            CFAVariable: the new CFA variable.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_11createVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_var_name = 0;
  PyArray_Descr *__pyx_v_nc_dtype = 0;
  PyObject *__pyx_v_dim_names = 0;
  PyArrayObject *__pyx_v_subarray_shape = 0;
  int __pyx_v_max_subarray_size;
  PyObject *__pyx_v_metadata = 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_var_name,&__pyx_n_s_nc_dtype,&__pyx_n_s_dim_names,&__pyx_n_s_subarray_shape,&__pyx_n_s_max_subarray_size,&__pyx_n_s_metadata,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[2] = __pyx_k__10;
    values[3] = (PyObject *)__pyx_k__11;
    values[5] = __pyx_k__12;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nc_dtype)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("createVariable", 0, 2, 6, 1); __PYX_ERR(0, 371, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dim_names);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subarray_shape);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_subarray_size);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_metadata);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createVariable") < 0)) __PYX_ERR(0, 371, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        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_var_name = ((PyObject*)values[0]);
    __pyx_v_nc_dtype = ((PyArray_Descr *)values[1]);
    __pyx_v_dim_names = ((PyObject*)values[2]);
    __pyx_v_subarray_shape = ((PyArrayObject *)values[3]);
    if (values[4]) {
      __pyx_v_max_subarray_size = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_max_subarray_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 376, __pyx_L3_error)
    } else {
      __pyx_v_max_subarray_size = ((int)0);
    }
    __pyx_v_metadata = ((PyObject*)values[5]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("createVariable", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 371, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.createVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var_name), (&PyBaseString_Type), 1, "var_name", 1))) __PYX_ERR(0, 372, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nc_dtype), __pyx_ptype_5numpy_dtype, 1, "nc_dtype", 0))) __PYX_ERR(0, 373, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dim_names), (&PyList_Type), 1, "dim_names", 1))) __PYX_ERR(0, 374, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_subarray_shape), __pyx_ptype_5numpy_ndarray, 1, "subarray_shape", 0))) __PYX_ERR(0, 375, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_metadata), (&PyDict_Type), 1, "metadata", 1))) __PYX_ERR(0, 377, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_10createVariable(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self), __pyx_v_var_name, __pyx_v_nc_dtype, __pyx_v_dim_names, __pyx_v_subarray_shape, __pyx_v_max_subarray_size, __pyx_v_metadata);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_10createVariable(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_var_name, PyArray_Descr *__pyx_v_nc_dtype, PyObject *__pyx_v_dim_names, PyArrayObject *__pyx_v_subarray_shape, int __pyx_v_max_subarray_size, PyObject *__pyx_v_metadata) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createVariable __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("createVariable", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.dim_names = __pyx_v_dim_names;
  __pyx_t_2.subarray_shape = __pyx_v_subarray_shape;
  __pyx_t_2.max_subarray_size = __pyx_v_max_subarray_size;
  __pyx_t_2.metadata = __pyx_v_metadata;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup->createVariable(__pyx_v_self, __pyx_v_var_name, __pyx_v_nc_dtype, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __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("S3netCDF4.CFA._CFAClasses.CFAGroup.createVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":509
 *         return self.cfa_vars[var_name]
 * 
 *     cpdef CFAVariable getVariable(CFAGroup self, basestring var_name):             # <<<<<<<<<<<<<<
 *         """Get a CFA variable by name."""
 *         try:
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_13getVariable(PyObject *__pyx_v_self, PyObject *__pyx_v_var_name); /*proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getVariable(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_var_name, int __pyx_skip_dispatch) {
  CYTHON_UNUSED PyObject *__pyx_v_e = NULL;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  char const *__pyx_t_14;
  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;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getVariable", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getVariable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_13getVariable)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_var_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_var_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable))))) __PYX_ERR(0, 509, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":511
 *     cpdef CFAVariable getVariable(CFAGroup self, basestring var_name):
 *         """Get a CFA variable by name."""
 *         try:             # <<<<<<<<<<<<<<
 *             return self.cfa_vars[var_name]
 *         except KeyError as e:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":512
 *         """Get a CFA variable by name."""
 *         try:
 *             return self.cfa_vars[var_name]             # <<<<<<<<<<<<<<
 *         except KeyError as e:
 *             raise CFAVariableError(
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      if (unlikely(__pyx_v_self->cfa_vars == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 512, __pyx_L3_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->cfa_vars, __pyx_v_var_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable))))) __PYX_ERR(0, 512, __pyx_L3_error)
      __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":511
 *     cpdef CFAVariable getVariable(CFAGroup self, basestring var_name):
 *         """Get a CFA variable by name."""
 *         try:             # <<<<<<<<<<<<<<
 *             return self.cfa_vars[var_name]
 *         except KeyError as e:
 */
    }
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":513
 *         try:
 *             return self.cfa_vars[var_name]
 *         except KeyError as e:             # <<<<<<<<<<<<<<
 *             raise CFAVariableError(
 *                 "Could not getVariable {}, variable does not exist.".format(
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.getVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 513, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_e = __pyx_t_2;
      /*try:*/ {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":514
 *             return self.cfa_vars[var_name]
 *         except KeyError as e:
 *             raise CFAVariableError(             # <<<<<<<<<<<<<<
 *                 "Could not getVariable {}, variable does not exist.".format(
 *                     var_name)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_CFAVariableError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 514, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_9);

        /* "S3netCDF4/CFA/_CFAClasses.pyx":515
 *         except KeyError as e:
 *             raise CFAVariableError(
 *                 "Could not getVariable {}, variable does not exist.".format(             # <<<<<<<<<<<<<<
 *                     var_name)
 *             )
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Could_not_getVariable_variable_d, __pyx_n_s_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 515, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);

        /* "S3netCDF4/CFA/_CFAClasses.pyx":516
 *             raise CFAVariableError(
 *                 "Could not getVariable {}, variable does not exist.".format(
 *                     var_name)             # <<<<<<<<<<<<<<
 *             )
 * 
 */
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_v_var_name) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_var_name);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 515, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 514, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 514, __pyx_L14_error)
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":513
 *         try:
 *             return self.cfa_vars[var_name]
 *         except KeyError as e:             # <<<<<<<<<<<<<<
 *             raise CFAVariableError(
 *                 "Could not getVariable {}, variable does not exist.".format(
 */
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 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;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __pyx_t_8 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e);
            __pyx_v_e = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":511
 *     cpdef CFAVariable getVariable(CFAGroup self, basestring var_name):
 *         """Get a CFA variable by name."""
 *         try:             # <<<<<<<<<<<<<<
 *             return self.cfa_vars[var_name]
 *         except KeyError as e:
 */
    __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_L7_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;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":509
 *         return self.cfa_vars[var_name]
 * 
 *     cpdef CFAVariable getVariable(CFAGroup self, basestring var_name):             # <<<<<<<<<<<<<<
 *         """Get a CFA variable by name."""
 *         try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.getVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_13getVariable(PyObject *__pyx_v_self, PyObject *__pyx_v_var_name); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_12getVariable[] = "Get a CFA variable by name.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_13getVariable(PyObject *__pyx_v_self, PyObject *__pyx_v_var_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getVariable (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var_name), (&PyBaseString_Type), 1, "var_name", 1))) __PYX_ERR(0, 509, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_12getVariable(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self), ((PyObject*)__pyx_v_var_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_12getVariable(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_var_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("getVariable", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getVariable(__pyx_v_self, __pyx_v_var_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __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("S3netCDF4.CFA._CFAClasses.CFAGroup.getVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":519
 *             )
 * 
 *     cpdef list getVariables(CFAGroup self):             # <<<<<<<<<<<<<<
 *         """Get the name of all the variables for this Group."""
 *         return [k for k in self.cfa_vars.keys()]
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_15getVariables(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getVariables(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_8genexpr4__pyx_v_k = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getVariables", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getVariables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_15getVariables)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 519, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":521
 *     cpdef list getVariables(CFAGroup self):
 *         """Get the name of all the variables for this Group."""
 *         return [k for k in self.cfa_vars.keys()]             # <<<<<<<<<<<<<<
 * 
 *     cpdef object renameVariable(CFAGroup self,
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = 0;
    if (unlikely(__pyx_v_self->cfa_vars == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys");
      __PYX_ERR(0, 521, __pyx_L5_error)
    }
    __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_self->cfa_vars, 1, __pyx_n_s_keys, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;
    while (1) {
      __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_6, &__pyx_t_5, &__pyx_t_3, NULL, NULL, __pyx_t_7);
      if (unlikely(__pyx_t_8 == 0)) break;
      if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 521, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_k, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_8genexpr4__pyx_v_k))) __PYX_ERR(0, 521, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_k); __pyx_8genexpr4__pyx_v_k = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_k); __pyx_8genexpr4__pyx_v_k = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":519
 *             )
 * 
 *     cpdef list getVariables(CFAGroup self):             # <<<<<<<<<<<<<<
 *         """Get the name of all the variables for this Group."""
 *         return [k for k in self.cfa_vars.keys()]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.getVariables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_15getVariables(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_14getVariables[] = "Get the name of all the variables for this Group.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_15getVariables(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getVariables (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_14getVariables(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_14getVariables(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__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("getVariables", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getVariables(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __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("S3netCDF4.CFA._CFAClasses.CFAGroup.getVariables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":523
 *         return [k for k in self.cfa_vars.keys()]
 * 
 *     cpdef object renameVariable(CFAGroup self,             # <<<<<<<<<<<<<<
 *                                 basestring old_name,
 *                                 basestring new_name
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_17renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_renameVariable(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_old_name, PyObject *__pyx_v_new_name, int __pyx_skip_dispatch) {
  CYTHON_UNUSED PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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;
  int __pyx_t_13;
  char const *__pyx_t_14;
  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;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("renameVariable", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_renameVariable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_17renameVariable)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_old_name, __pyx_v_new_name};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_old_name, __pyx_v_new_name};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 523, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_old_name);
          __Pyx_GIVEREF(__pyx_v_old_name);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_old_name);
          __Pyx_INCREF(__pyx_v_new_name);
          __Pyx_GIVEREF(__pyx_v_new_name);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_new_name);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":537
 *         """
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_vars[new_name] = self.cfa_vars.pop(old_name)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":539
 *         try:
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_vars[new_name] = self.cfa_vars.pop(old_name)             # <<<<<<<<<<<<<<
 *             self.cfa_vars[new_name].var_name = new_name
 *         except KeyError as e:
 */
      if (unlikely(__pyx_v_self->cfa_vars == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
        __PYX_ERR(0, 539, __pyx_L3_error)
      }
      __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_self->cfa_vars, __pyx_v_old_name, ((PyObject *)NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__pyx_v_self->cfa_vars == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 539, __pyx_L3_error)
      }
      if (unlikely(PyDict_SetItem(__pyx_v_self->cfa_vars, __pyx_v_new_name, __pyx_t_1) < 0)) __PYX_ERR(0, 539, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":540
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_vars[new_name] = self.cfa_vars.pop(old_name)
 *             self.cfa_vars[new_name].var_name = new_name             # <<<<<<<<<<<<<<
 *         except KeyError as e:
 *             raise CFAVariableError((
 */
      if (unlikely(__pyx_v_self->cfa_vars == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 540, __pyx_L3_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->cfa_vars, __pyx_v_new_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_var_name, __pyx_v_new_name) < 0) __PYX_ERR(0, 540, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":537
 *         """
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_vars[new_name] = self.cfa_vars.pop(old_name)
 */
    }
    __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_L8_try_end;
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":541
 *             self.cfa_vars[new_name] = self.cfa_vars.pop(old_name)
 *             self.cfa_vars[new_name].var_name = new_name
 *         except KeyError as e:             # <<<<<<<<<<<<<<
 *             raise CFAVariableError((
 *                 "Could not renameVariable {}, variable does not exist."
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.renameVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 541, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_e = __pyx_t_2;
      /*try:*/ {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":542
 *             self.cfa_vars[new_name].var_name = new_name
 *         except KeyError as e:
 *             raise CFAVariableError((             # <<<<<<<<<<<<<<
 *                 "Could not renameVariable {}, variable does not exist."
 *             ).format(old_name))
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CFAVariableError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_4);

        /* "S3netCDF4/CFA/_CFAClasses.pyx":544
 *             raise CFAVariableError((
 *                 "Could not renameVariable {}, variable does not exist."
 *             ).format(old_name))             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Could_not_renameVariable_variabl, __pyx_n_s_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 544, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_v_old_name) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_old_name);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 544, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 542, __pyx_L14_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_ERR(0, 542, __pyx_L14_error)
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":541
 *             self.cfa_vars[new_name] = self.cfa_vars.pop(old_name)
 *             self.cfa_vars[new_name].var_name = new_name
 *         except KeyError as e:             # <<<<<<<<<<<<<<
 *             raise CFAVariableError((
 *                 "Could not renameVariable {}, variable does not exist."
 */
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 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;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __pyx_t_5 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e);
            __pyx_v_e = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
          __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":537
 *         """
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_vars[new_name] = self.cfa_vars.pop(old_name)
 */
    __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_L8_try_end:;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":545
 *                 "Could not renameVariable {}, variable does not exist."
 *             ).format(old_name))
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef CFADimension createDimension(CFAGroup self,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":523
 *         return [k for k in self.cfa_vars.keys()]
 * 
 *     cpdef object renameVariable(CFAGroup self,             # <<<<<<<<<<<<<<
 *                                 basestring old_name,
 *                                 basestring new_name
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.renameVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_17renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_16renameVariable[] = "Rename a variable from old_name to new_name.\n\n        Args:\n            old_name(string): the current name of the variable.\n            new_name(string): the new name of the variable.\n\n        Returns:\n            bool: True if variable renamed successfully, False otherwise.\n        ";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_17renameVariable(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_old_name = 0;
  PyObject *__pyx_v_new_name = 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_old_name,&__pyx_n_s_new_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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_old_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_new_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("renameVariable", 1, 2, 2, 1); __PYX_ERR(0, 523, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameVariable") < 0)) __PYX_ERR(0, 523, __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_old_name = ((PyObject*)values[0]);
    __pyx_v_new_name = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("renameVariable", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 523, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.renameVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_name), (&PyBaseString_Type), 1, "old_name", 1))) __PYX_ERR(0, 524, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_name), (&PyBaseString_Type), 1, "new_name", 1))) __PYX_ERR(0, 525, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_16renameVariable(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self), __pyx_v_old_name, __pyx_v_new_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_16renameVariable(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_old_name, PyObject *__pyx_v_new_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("renameVariable", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_renameVariable(__pyx_v_self, __pyx_v_old_name, __pyx_v_new_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __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("S3netCDF4.CFA._CFAClasses.CFAGroup.renameVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":547
 *         return True
 * 
 *     cpdef CFADimension createDimension(CFAGroup self,             # <<<<<<<<<<<<<<
 *                           basestring dim_name="",
 *                           int dim_len=-1,
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_19createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createDimension(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createDimension *__pyx_optional_args) {
  PyObject *__pyx_v_dim_name = ((PyObject*)__pyx_kp_u__13);
  int __pyx_v_dim_len = ((int)-1);
  PyObject *__pyx_v_axis_type = ((PyObject*)__pyx_n_u_U);
  PyObject *__pyx_v_metadata = __pyx_k__14;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__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;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("createDimension", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_dim_name = __pyx_optional_args->dim_name;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_dim_len = __pyx_optional_args->dim_len;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_axis_type = __pyx_optional_args->axis_type;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_metadata = __pyx_optional_args->metadata;
          }
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_createDimension); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_19createDimension)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        __pyx_t_6 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_6 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_dim_name, __pyx_t_3, __pyx_v_axis_type, __pyx_v_metadata};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_v_dim_name, __pyx_t_3, __pyx_v_axis_type, __pyx_v_metadata};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_dim_name);
          __Pyx_GIVEREF(__pyx_v_dim_name);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_dim_name);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
          __Pyx_INCREF(__pyx_v_axis_type);
          __Pyx_GIVEREF(__pyx_v_axis_type);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_axis_type);
          __Pyx_INCREF(__pyx_v_metadata);
          __Pyx_GIVEREF(__pyx_v_metadata);
          PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_v_metadata);
          __pyx_t_3 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADimension))))) __PYX_ERR(0, 547, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":556
 * 
 *         # Check that the group hasn't already been added
 *         if dim_name in self.cfa_dims:             # <<<<<<<<<<<<<<
 *             raise CFADimensionError((
 *                 "Could not createDimension {}, dimension already exists"
 */
  if (unlikely(__pyx_v_self->cfa_dims == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 556, __pyx_L1_error)
  }
  __pyx_t_8 = (__Pyx_PyDict_ContainsTF(__pyx_v_dim_name, __pyx_v_self->cfa_dims, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 556, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (unlikely(__pyx_t_9)) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":557
 *         # Check that the group hasn't already been added
 *         if dim_name in self.cfa_dims:
 *             raise CFADimensionError((             # <<<<<<<<<<<<<<
 *                 "Could not createDimension {}, dimension already exists"
 *             ).format(dim_name))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CFADimensionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":559
 *             raise CFADimensionError((
 *                 "Could not createDimension {}, dimension already exists"
 *             ).format(dim_name))             # <<<<<<<<<<<<<<
 *         # create the group and add it to the dictionary of groups
 *         self.cfa_dims[dim_name] = CFADimension(
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Could_not_createDimension_dimens, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_v_dim_name) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_dim_name);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __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_ERR(0, 557, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":556
 * 
 *         # Check that the group hasn't already been added
 *         if dim_name in self.cfa_dims:             # <<<<<<<<<<<<<<
 *             raise CFADimensionError((
 *                 "Could not createDimension {}, dimension already exists"
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":562
 *         # create the group and add it to the dictionary of groups
 *         self.cfa_dims[dim_name] = CFADimension(
 *                     dim_name=dim_name,             # <<<<<<<<<<<<<<
 *                     dim_len=dim_len,
 *                     axis_type=axis_type,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dim_name, __pyx_v_dim_name) < 0) __PYX_ERR(0, 562, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":563
 *         self.cfa_dims[dim_name] = CFADimension(
 *                     dim_name=dim_name,
 *                     dim_len=dim_len,             # <<<<<<<<<<<<<<
 *                     axis_type=axis_type,
 *                     metadata=metadata
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_dim_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dim_len, __pyx_t_2) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":564
 *                     dim_name=dim_name,
 *                     dim_len=dim_len,
 *                     axis_type=axis_type,             # <<<<<<<<<<<<<<
 *                     metadata=metadata
 *                   )
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis_type, __pyx_v_axis_type) < 0) __PYX_ERR(0, 562, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":565
 *                     dim_len=dim_len,
 *                     axis_type=axis_type,
 *                     metadata=metadata             # <<<<<<<<<<<<<<
 *                   )
 * 
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_metadata, __pyx_v_metadata) < 0) __PYX_ERR(0, 562, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":561
 *             ).format(dim_name))
 *         # create the group and add it to the dictionary of groups
 *         self.cfa_dims[dim_name] = CFADimension(             # <<<<<<<<<<<<<<
 *                     dim_name=dim_name,
 *                     dim_len=dim_len,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADimension), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v_self->cfa_dims == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 561, __pyx_L1_error)
  }
  if (unlikely(PyDict_SetItem(__pyx_v_self->cfa_dims, __pyx_v_dim_name, __pyx_t_2) < 0)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":568
 *                   )
 * 
 *         return self.cfa_dims[dim_name]             # <<<<<<<<<<<<<<
 * 
 *     cpdef CFADimension getDimension(CFAGroup self, basestring dim_name):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (unlikely(__pyx_v_self->cfa_dims == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 568, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->cfa_dims, __pyx_v_dim_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADimension))))) __PYX_ERR(0, 568, __pyx_L1_error)
  __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":547
 *         return True
 * 
 *     cpdef CFADimension createDimension(CFAGroup self,             # <<<<<<<<<<<<<<
 *                           basestring dim_name="",
 *                           int dim_len=-1,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.createDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_19createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_18createDimension[] = "Create a CFA dimension and add it to the group";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_19createDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dim_name = 0;
  int __pyx_v_dim_len;
  PyObject *__pyx_v_axis_type = 0;
  PyObject *__pyx_v_metadata = 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_dim_name,&__pyx_n_s_dim_len,&__pyx_n_s_axis_type,&__pyx_n_s_metadata,0};
    PyObject* values[4] = {0,0,0,0};
    values[0] = ((PyObject*)__pyx_kp_u__13);
    values[2] = ((PyObject*)__pyx_n_u_U);
    values[3] = __pyx_k__14;
    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);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dim_name);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dim_len);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_axis_type);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_metadata);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "createDimension") < 0)) __PYX_ERR(0, 547, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dim_name = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_dim_len = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dim_len == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 549, __pyx_L3_error)
    } else {
      __pyx_v_dim_len = ((int)-1);
    }
    __pyx_v_axis_type = ((PyObject*)values[2]);
    __pyx_v_metadata = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("createDimension", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 547, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.createDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dim_name), (&PyBaseString_Type), 1, "dim_name", 1))) __PYX_ERR(0, 548, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_axis_type), (&PyBaseString_Type), 1, "axis_type", 1))) __PYX_ERR(0, 550, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_metadata), (&PyDict_Type), 1, "metadata", 1))) __PYX_ERR(0, 551, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_18createDimension(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self), __pyx_v_dim_name, __pyx_v_dim_len, __pyx_v_axis_type, __pyx_v_metadata);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_18createDimension(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_dim_name, int __pyx_v_dim_len, PyObject *__pyx_v_axis_type, PyObject *__pyx_v_metadata) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createDimension __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("createDimension", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.dim_name = __pyx_v_dim_name;
  __pyx_t_2.dim_len = __pyx_v_dim_len;
  __pyx_t_2.axis_type = __pyx_v_axis_type;
  __pyx_t_2.metadata = __pyx_v_metadata;
  __pyx_t_1 = ((PyObject *)__pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup->createDimension(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __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("S3netCDF4.CFA._CFAClasses.CFAGroup.createDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":570
 *         return self.cfa_dims[dim_name]
 * 
 *     cpdef CFADimension getDimension(CFAGroup self, basestring dim_name):             # <<<<<<<<<<<<<<
 *         """Get a CFA dimension by name."""
 *         try:
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_21getDimension(PyObject *__pyx_v_self, PyObject *__pyx_v_dim_name); /*proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getDimension(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_dim_name, int __pyx_skip_dispatch) {
  CYTHON_UNUSED PyObject *__pyx_v_e = NULL;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  char const *__pyx_t_14;
  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;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getDimension", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getDimension); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_21getDimension)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_dim_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_dim_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADimension))))) __PYX_ERR(0, 570, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":572
 *     cpdef CFADimension getDimension(CFAGroup self, basestring dim_name):
 *         """Get a CFA dimension by name."""
 *         try:             # <<<<<<<<<<<<<<
 *             return self.cfa_dims[dim_name]
 *         except KeyError as e:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":573
 *         """Get a CFA dimension by name."""
 *         try:
 *             return self.cfa_dims[dim_name]             # <<<<<<<<<<<<<<
 *         except KeyError as e:
 *             raise CFADimensionError((
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      if (unlikely(__pyx_v_self->cfa_dims == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 573, __pyx_L3_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->cfa_dims, __pyx_v_dim_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADimension))))) __PYX_ERR(0, 573, __pyx_L3_error)
      __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_t_1);
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":572
 *     cpdef CFADimension getDimension(CFAGroup self, basestring dim_name):
 *         """Get a CFA dimension by name."""
 *         try:             # <<<<<<<<<<<<<<
 *             return self.cfa_dims[dim_name]
 *         except KeyError as e:
 */
    }
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":574
 *         try:
 *             return self.cfa_dims[dim_name]
 *         except KeyError as e:             # <<<<<<<<<<<<<<
 *             raise CFADimensionError((
 *                 "Could not getDimension {}, dimension does not exist."
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.getDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 574, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_e = __pyx_t_2;
      /*try:*/ {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":575
 *             return self.cfa_dims[dim_name]
 *         except KeyError as e:
 *             raise CFADimensionError((             # <<<<<<<<<<<<<<
 *                 "Could not getDimension {}, dimension does not exist."
 *             ).format(dim_name))
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_CFADimensionError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 575, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_9);

        /* "S3netCDF4/CFA/_CFAClasses.pyx":577
 *             raise CFADimensionError((
 *                 "Could not getDimension {}, dimension does not exist."
 *             ).format(dim_name))             # <<<<<<<<<<<<<<
 * 
 *     cpdef list getDimensions(CFAGroup self):
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Could_not_getDimension_dimension, __pyx_n_s_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 577, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_v_dim_name) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_dim_name);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 577, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 575, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 575, __pyx_L14_error)
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":574
 *         try:
 *             return self.cfa_dims[dim_name]
 *         except KeyError as e:             # <<<<<<<<<<<<<<
 *             raise CFADimensionError((
 *                 "Could not getDimension {}, dimension does not exist."
 */
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 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;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __pyx_t_8 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e);
            __pyx_v_e = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":572
 *     cpdef CFADimension getDimension(CFAGroup self, basestring dim_name):
 *         """Get a CFA dimension by name."""
 *         try:             # <<<<<<<<<<<<<<
 *             return self.cfa_dims[dim_name]
 *         except KeyError as e:
 */
    __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_L7_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;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":570
 *         return self.cfa_dims[dim_name]
 * 
 *     cpdef CFADimension getDimension(CFAGroup self, basestring dim_name):             # <<<<<<<<<<<<<<
 *         """Get a CFA dimension by name."""
 *         try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.getDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_21getDimension(PyObject *__pyx_v_self, PyObject *__pyx_v_dim_name); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_20getDimension[] = "Get a CFA dimension by name.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_21getDimension(PyObject *__pyx_v_self, PyObject *__pyx_v_dim_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDimension (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dim_name), (&PyBaseString_Type), 1, "dim_name", 1))) __PYX_ERR(0, 570, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_20getDimension(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self), ((PyObject*)__pyx_v_dim_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_20getDimension(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_dim_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("getDimension", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getDimension(__pyx_v_self, __pyx_v_dim_name, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __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("S3netCDF4.CFA._CFAClasses.CFAGroup.getDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":579
 *             ).format(dim_name))
 * 
 *     cpdef list getDimensions(CFAGroup self):             # <<<<<<<<<<<<<<
 *         """Get the name of all the dimensions for this Group."""
 *         return [k for k in self.cfa_dims.keys()]
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_23getDimensions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getDimensions(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_8genexpr5__pyx_v_k = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getDimensions", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getDimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_23getDimensions)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 579, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":581
 *     cpdef list getDimensions(CFAGroup self):
 *         """Get the name of all the dimensions for this Group."""
 *         return [k for k in self.cfa_dims.keys()]             # <<<<<<<<<<<<<<
 * 
 *     cpdef object renameDimension(CFAGroup self,
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = 0;
    if (unlikely(__pyx_v_self->cfa_dims == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys");
      __PYX_ERR(0, 581, __pyx_L5_error)
    }
    __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_self->cfa_dims, 1, __pyx_n_s_keys, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;
    while (1) {
      __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_6, &__pyx_t_5, &__pyx_t_3, NULL, NULL, __pyx_t_7);
      if (unlikely(__pyx_t_8 == 0)) break;
      if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 581, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_k, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_8genexpr5__pyx_v_k))) __PYX_ERR(0, 581, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_k); __pyx_8genexpr5__pyx_v_k = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_k); __pyx_8genexpr5__pyx_v_k = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":579
 *             ).format(dim_name))
 * 
 *     cpdef list getDimensions(CFAGroup self):             # <<<<<<<<<<<<<<
 *         """Get the name of all the dimensions for this Group."""
 *         return [k for k in self.cfa_dims.keys()]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_23getDimensions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_22getDimensions[] = "Get the name of all the dimensions for this Group.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_23getDimensions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_22getDimensions(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_22getDimensions(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__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("getDimensions", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getDimensions(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __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("S3netCDF4.CFA._CFAClasses.CFAGroup.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":583
 *         return [k for k in self.cfa_dims.keys()]
 * 
 *     cpdef object renameDimension(CFAGroup self,             # <<<<<<<<<<<<<<
 *                                  basestring old_name,
 *                                  basestring new_name
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_25renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_renameDimension(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_old_name, PyObject *__pyx_v_new_name, int __pyx_skip_dispatch) {
  CYTHON_UNUSED PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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;
  int __pyx_t_13;
  char const *__pyx_t_14;
  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;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("renameDimension", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_renameDimension); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_25renameDimension)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_old_name, __pyx_v_new_name};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_old_name, __pyx_v_new_name};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 583, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_old_name);
          __Pyx_GIVEREF(__pyx_v_old_name);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_old_name);
          __Pyx_INCREF(__pyx_v_new_name);
          __Pyx_GIVEREF(__pyx_v_new_name);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_new_name);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":597
 *         """
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_dims[new_name] = self.cfa_dims.pop(old_name)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":599
 *         try:
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_dims[new_name] = self.cfa_dims.pop(old_name)             # <<<<<<<<<<<<<<
 *             self.cfa_dims[new_name].dim_name = new_name
 *         except KeyError as e:
 */
      if (unlikely(__pyx_v_self->cfa_dims == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
        __PYX_ERR(0, 599, __pyx_L3_error)
      }
      __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_self->cfa_dims, __pyx_v_old_name, ((PyObject *)NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__pyx_v_self->cfa_dims == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 599, __pyx_L3_error)
      }
      if (unlikely(PyDict_SetItem(__pyx_v_self->cfa_dims, __pyx_v_new_name, __pyx_t_1) < 0)) __PYX_ERR(0, 599, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":600
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_dims[new_name] = self.cfa_dims.pop(old_name)
 *             self.cfa_dims[new_name].dim_name = new_name             # <<<<<<<<<<<<<<
 *         except KeyError as e:
 *             raise CFADimensionError((
 */
      if (unlikely(__pyx_v_self->cfa_dims == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 600, __pyx_L3_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->cfa_dims, __pyx_v_new_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_dim_name, __pyx_v_new_name) < 0) __PYX_ERR(0, 600, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":597
 *         """
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_dims[new_name] = self.cfa_dims.pop(old_name)
 */
    }
    __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_L8_try_end;
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":601
 *             self.cfa_dims[new_name] = self.cfa_dims.pop(old_name)
 *             self.cfa_dims[new_name].dim_name = new_name
 *         except KeyError as e:             # <<<<<<<<<<<<<<
 *             raise CFADimensionError((
 *                 "Could not renameDimension {}, dimension does not exist."
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.renameDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 601, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_e = __pyx_t_2;
      /*try:*/ {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":602
 *             self.cfa_dims[new_name].dim_name = new_name
 *         except KeyError as e:
 *             raise CFADimensionError((             # <<<<<<<<<<<<<<
 *                 "Could not renameDimension {}, dimension does not exist."
 *             ).format(old_name))
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CFADimensionError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_4);

        /* "S3netCDF4/CFA/_CFAClasses.pyx":604
 *             raise CFADimensionError((
 *                 "Could not renameDimension {}, dimension does not exist."
 *             ).format(old_name))             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Could_not_renameDimension_dimens, __pyx_n_s_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 604, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        __pyx_t_10 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_v_old_name) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_old_name);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 604, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L14_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_ERR(0, 602, __pyx_L14_error)
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":601
 *             self.cfa_dims[new_name] = self.cfa_dims.pop(old_name)
 *             self.cfa_dims[new_name].dim_name = new_name
 *         except KeyError as e:             # <<<<<<<<<<<<<<
 *             raise CFADimensionError((
 *                 "Could not renameDimension {}, dimension does not exist."
 */
      /*finally:*/ {
        __pyx_L14_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 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;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __pyx_t_5 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e);
            __pyx_v_e = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          }
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
          __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":597
 *         """
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             # reasssign the key, then rename in CFAGroup datastructure
 *             self.cfa_dims[new_name] = self.cfa_dims.pop(old_name)
 */
    __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_L8_try_end:;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":605
 *                 "Could not renameDimension {}, dimension does not exist."
 *             ).format(old_name))
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef dict getMetadata(CFAGroup self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":583
 *         return [k for k in self.cfa_dims.keys()]
 * 
 *     cpdef object renameDimension(CFAGroup self,             # <<<<<<<<<<<<<<
 *                                  basestring old_name,
 *                                  basestring new_name
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.renameDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_25renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_24renameDimension[] = "Rename a dimension from old_name to new_name.\n\n        Args:\n            old_name(string): the current name of the dimension.\n            new_name(string): the new name of the dimension.\n\n        Returns:\n            bool: True if dimension renamed successfully, False otherwise.\n        ";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_25renameDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_old_name = 0;
  PyObject *__pyx_v_new_name = 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_old_name,&__pyx_n_s_new_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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_old_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_new_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, 1); __PYX_ERR(0, 583, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "renameDimension") < 0)) __PYX_ERR(0, 583, __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_old_name = ((PyObject*)values[0]);
    __pyx_v_new_name = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("renameDimension", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 583, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.renameDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_name), (&PyBaseString_Type), 1, "old_name", 1))) __PYX_ERR(0, 584, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_name), (&PyBaseString_Type), 1, "new_name", 1))) __PYX_ERR(0, 585, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_24renameDimension(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self), __pyx_v_old_name, __pyx_v_new_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_24renameDimension(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_old_name, PyObject *__pyx_v_new_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("renameDimension", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_renameDimension(__pyx_v_self, __pyx_v_old_name, __pyx_v_new_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __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("S3netCDF4.CFA._CFAClasses.CFAGroup.renameDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":607
 *         return True
 * 
 *     cpdef dict getMetadata(CFAGroup self):             # <<<<<<<<<<<<<<
 *         """Return the metadata for the Group."""
 *         return self.metadata
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_27getMetadata(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getMetadata", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMetadata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_27getMetadata)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 607, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":609
 *     cpdef dict getMetadata(CFAGroup self):
 *         """Return the metadata for the Group."""
 *         return self.metadata             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring getName(CFAGroup self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->metadata);
  __pyx_r = __pyx_v_self->metadata;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":607
 *         return True
 * 
 *     cpdef dict getMetadata(CFAGroup self):             # <<<<<<<<<<<<<<
 *         """Return the metadata for the Group."""
 *         return self.metadata
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFAGroup.getMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_27getMetadata(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_26getMetadata[] = "Return the metadata for the Group.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_27getMetadata(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMetadata (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_26getMetadata(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_26getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__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("getMetadata", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getMetadata(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __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("S3netCDF4.CFA._CFAClasses.CFAGroup.getMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":611
 *         return self.metadata
 * 
 *     cpdef basestring getName(CFAGroup self):             # <<<<<<<<<<<<<<
 *         """Get the name of the group."""
 *         return self.grp_name
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_29getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getName", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getName); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_29getName)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 611, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":613
 *     cpdef basestring getName(CFAGroup self):
 *         """Get the name of the group."""
 *         return self.grp_name             # <<<<<<<<<<<<<<
 * 
 *     cpdef setName(CFAGroup self, basestring new_name):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->grp_name);
  __pyx_r = __pyx_v_self->grp_name;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":611
 *         return self.metadata
 * 
 *     cpdef basestring getName(CFAGroup self):             # <<<<<<<<<<<<<<
 *         """Get the name of the group."""
 *         return self.grp_name
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFAGroup.getName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_29getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_28getName[] = "Get the name of the group.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_29getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getName (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_28getName(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_28getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__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("getName", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getName(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __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("S3netCDF4.CFA._CFAClasses.CFAGroup.getName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":615
 *         return self.grp_name
 * 
 *     cpdef setName(CFAGroup self, basestring new_name):             # <<<<<<<<<<<<<<
 *         """(Re)set the name of the group."""
 *         self.grp_name = new_name
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_31setName(PyObject *__pyx_v_self, PyObject *__pyx_v_new_name); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_setName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_new_name, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setName", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setName); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_31setName)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_new_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_new_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":617
 *     cpdef setName(CFAGroup self, basestring new_name):
 *         """(Re)set the name of the group."""
 *         self.grp_name = new_name             # <<<<<<<<<<<<<<
 * 
 *     cpdef CFADataset getDataset(CFAGroup self):
 */
  __Pyx_INCREF(__pyx_v_new_name);
  __Pyx_GIVEREF(__pyx_v_new_name);
  __Pyx_GOTREF(__pyx_v_self->grp_name);
  __Pyx_DECREF(__pyx_v_self->grp_name);
  __pyx_v_self->grp_name = __pyx_v_new_name;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":615
 *         return self.grp_name
 * 
 *     cpdef setName(CFAGroup self, basestring new_name):             # <<<<<<<<<<<<<<
 *         """(Re)set the name of the group."""
 *         self.grp_name = new_name
 */

  /* 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_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.setName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_31setName(PyObject *__pyx_v_self, PyObject *__pyx_v_new_name); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_30setName[] = "(Re)set the name of the group.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_31setName(PyObject *__pyx_v_self, PyObject *__pyx_v_new_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setName (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_name), (&PyBaseString_Type), 1, "new_name", 1))) __PYX_ERR(0, 615, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_30setName(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self), ((PyObject*)__pyx_v_new_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_30setName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v_new_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("setName", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_setName(__pyx_v_self, __pyx_v_new_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __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("S3netCDF4.CFA._CFAClasses.CFAGroup.setName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":619
 *         self.grp_name = new_name
 * 
 *     cpdef CFADataset getDataset(CFAGroup self):             # <<<<<<<<<<<<<<
 *         """Get the CFADataset that the group belongs to."""
 *         return self.dataset
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_33getDataset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getDataset(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getDataset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getDataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_33getDataset)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADataset))))) __PYX_ERR(0, 619, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":621
 *     cpdef CFADataset getDataset(CFAGroup self):
 *         """Get the CFADataset that the group belongs to."""
 *         return self.dataset             # <<<<<<<<<<<<<<
 * 
 * # construct the named tuple for the CFAPartition - this replaces a class in an
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->dataset));
  __pyx_r = __pyx_v_self->dataset;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":619
 *         self.grp_name = new_name
 * 
 *     cpdef CFADataset getDataset(CFAGroup self):             # <<<<<<<<<<<<<<
 *         """Get the CFADataset that the group belongs to."""
 *         return self.dataset
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFAGroup.getDataset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_33getDataset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_32getDataset[] = "Get the CFADataset that the group belongs to.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_33getDataset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDataset (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_32getDataset(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_32getDataset(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__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("getDataset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getDataset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __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("S3netCDF4.CFA._CFAClasses.CFAGroup.getDataset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_34__reduce_cython__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_34__reduce_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __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("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.cfa_dims, self.cfa_vars, self.dataset, self.grp_name, self.metadata)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->cfa_dims);
  __Pyx_GIVEREF(__pyx_v_self->cfa_dims);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->cfa_dims);
  __Pyx_INCREF(__pyx_v_self->cfa_vars);
  __Pyx_GIVEREF(__pyx_v_self->cfa_vars);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->cfa_vars);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->dataset));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->dataset));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->dataset));
  __Pyx_INCREF(__pyx_v_self->grp_name);
  __Pyx_GIVEREF(__pyx_v_self->grp_name);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->grp_name);
  __Pyx_INCREF(__pyx_v_self->metadata);
  __Pyx_GIVEREF(__pyx_v_self->metadata);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->metadata);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.cfa_dims, self.cfa_vars, self.dataset, self.grp_name, self.metadata)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.cfa_dims, self.cfa_vars, self.dataset, self.grp_name, self.metadata)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.cfa_dims is not None or self.cfa_vars is not None or self.dataset is not None or self.grp_name is not None or self.metadata is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.cfa_dims, self.cfa_vars, self.dataset, self.grp_name, self.metadata)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.cfa_dims is not None or self.cfa_vars is not None or self.dataset is not None or self.grp_name is not None or self.metadata is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CFAGroup, (type(self), 0x19ace02, None), state
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->cfa_dims != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->cfa_vars != ((PyObject*)Py_None));
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (((PyObject *)__pyx_v_self->dataset) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->grp_name != ((PyObject*)Py_None));
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->metadata != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_2 != 0);
    __pyx_t_3 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.cfa_dims is not None or self.cfa_vars is not None or self.dataset is not None or self.grp_name is not None or self.metadata is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CFAGroup, (type(self), 0x19ace02, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.cfa_dims is not None or self.cfa_vars is not None or self.dataset is not None or self.grp_name is not None or self.metadata is not None
 *     if use_setstate:
 *         return __pyx_unpickle_CFAGroup, (type(self), 0x19ace02, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CFAGroup, (type(self), 0x19ace02, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_CFAGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_26922498);
    __Pyx_GIVEREF(__pyx_int_26922498);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_26922498);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.cfa_dims is not None or self.cfa_vars is not None or self.dataset is not None or self.grp_name is not None or self.metadata is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CFAGroup, (type(self), 0x19ace02, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CFAGroup, (type(self), 0x19ace02, None), state
 *     else:
 *         return __pyx_unpickle_CFAGroup, (type(self), 0x19ace02, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CFAGroup__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_CFAGroup); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_26922498);
    __Pyx_GIVEREF(__pyx_int_26922498);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_26922498);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CFAGroup, (type(self), 0x19ace02, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CFAGroup__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_36__setstate_cython__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_36__setstate_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_CFAGroup, (type(self), 0x19ace02, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CFAGroup__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFAGroup__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CFAGroup, (type(self), 0x19ace02, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CFAGroup__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAGroup.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":686
 *     cfa_variable_metadata_keys = ["cf_role", "cfa_dimensions", "cfa_array"]
 * 
 *     def __init__(CFAVariable self,             # <<<<<<<<<<<<<<
 *                  basestring var_name,
 *                  np.dtype nc_dtype,
 */

/* Python wrapper */
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___init__[] = "Initialise a CFAVariable object";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___init__;
#endif
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_var_name = 0;
  PyArray_Descr *__pyx_v_nc_dtype = 0;
  PyObject *__pyx_v_group = 0;
  PyObject *__pyx_v_cf_role = 0;
  PyObject *__pyx_v_cfa_dimensions = 0;
  PyObject *__pyx_v_pmdimensions = 0;
  PyArrayObject *__pyx_v_pmshape = 0;
  PyObject *__pyx_v_base = 0;
  PyObject *__pyx_v_metadata = 0;
  PyObject *__pyx_v_nc_partition_group = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_var_name,&__pyx_n_s_nc_dtype,&__pyx_n_s_group,&__pyx_n_s_cf_role,&__pyx_n_s_cfa_dimensions,&__pyx_n_s_pmdimensions,&__pyx_n_s_pmshape,&__pyx_n_s_base,&__pyx_n_s_metadata,&__pyx_n_s_nc_partition_group,0};
    PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};

    /* "S3netCDF4/CFA/_CFAClasses.pyx":689
 *                  basestring var_name,
 *                  np.dtype nc_dtype,
 *                  group=None,             # <<<<<<<<<<<<<<
 *                  basestring cf_role="",
 *                  list cfa_dimensions=list(),
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject*)__pyx_kp_u__13);
    values[4] = __pyx_k__15;
    values[5] = __pyx_k__16;
    values[6] = (PyObject *)__pyx_k__17;
    values[7] = ((PyObject*)__pyx_kp_u__13);
    values[8] = __pyx_k__18;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":696
 *                  basestring base="",
 *                  dict metadata=dict(),
 *                  object nc_partition_group=None,             # <<<<<<<<<<<<<<
 *                 ):
 *         """Initialise a CFAVariable object"""
 */
    values[9] = ((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 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nc_dtype)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 10, 1); __PYX_ERR(0, 686, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cf_role);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfa_dimensions);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pmdimensions);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pmshape);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base);
          if (value) { values[7] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_metadata);
          if (value) { values[8] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nc_partition_group);
          if (value) { values[9] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 686, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        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_var_name = ((PyObject*)values[0]);
    __pyx_v_nc_dtype = ((PyArray_Descr *)values[1]);
    __pyx_v_group = values[2];
    __pyx_v_cf_role = ((PyObject*)values[3]);
    __pyx_v_cfa_dimensions = ((PyObject*)values[4]);
    __pyx_v_pmdimensions = ((PyObject*)values[5]);
    __pyx_v_pmshape = ((PyArrayObject *)values[6]);
    __pyx_v_base = ((PyObject*)values[7]);
    __pyx_v_metadata = ((PyObject*)values[8]);
    __pyx_v_nc_partition_group = values[9];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 686, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var_name), (&PyBaseString_Type), 1, "var_name", 1))) __PYX_ERR(0, 687, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nc_dtype), __pyx_ptype_5numpy_dtype, 1, "nc_dtype", 0))) __PYX_ERR(0, 688, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cf_role), (&PyBaseString_Type), 1, "cf_role", 1))) __PYX_ERR(0, 690, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfa_dimensions), (&PyList_Type), 1, "cfa_dimensions", 1))) __PYX_ERR(0, 691, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pmdimensions), (&PyList_Type), 1, "pmdimensions", 1))) __PYX_ERR(0, 692, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pmshape), __pyx_ptype_5numpy_ndarray, 1, "pmshape", 0))) __PYX_ERR(0, 693, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_base), (&PyBaseString_Type), 1, "base", 1))) __PYX_ERR(0, 694, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_metadata), (&PyDict_Type), 1, "metadata", 1))) __PYX_ERR(0, 695, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___init__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self), __pyx_v_var_name, __pyx_v_nc_dtype, __pyx_v_group, __pyx_v_cf_role, __pyx_v_cfa_dimensions, __pyx_v_pmdimensions, __pyx_v_pmshape, __pyx_v_base, __pyx_v_metadata, __pyx_v_nc_partition_group);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":686
 *     cfa_variable_metadata_keys = ["cf_role", "cfa_dimensions", "cfa_array"]
 * 
 *     def __init__(CFAVariable self,             # <<<<<<<<<<<<<<
 *                  basestring var_name,
 *                  np.dtype nc_dtype,
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___init__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_var_name, PyArray_Descr *__pyx_v_nc_dtype, PyObject *__pyx_v_group, PyObject *__pyx_v_cf_role, PyObject *__pyx_v_cfa_dimensions, PyObject *__pyx_v_pmdimensions, PyArrayObject *__pyx_v_pmshape, PyObject *__pyx_v_base, PyObject *__pyx_v_metadata, PyObject *__pyx_v_nc_partition_group) {
  PyObject *__pyx_v_k = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":701
 *         # Initialise like this to avoid storing a reference to the variable
 *         # passed in
 *         self.var_name = basestring(var_name)             # <<<<<<<<<<<<<<
 *         self.nc_dtype = np.dtype(nc_dtype)
 *         self.group = group
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBaseString_Type)), __pyx_v_var_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 701, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->var_name);
  __Pyx_DECREF(__pyx_v_self->var_name);
  __pyx_v_self->var_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":702
 *         # passed in
 *         self.var_name = basestring(var_name)
 *         self.nc_dtype = np.dtype(nc_dtype)             # <<<<<<<<<<<<<<
 *         self.group = group
 *         self.cf_role = basestring(cf_role)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5numpy_dtype), ((PyObject *)__pyx_v_nc_dtype)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->nc_dtype);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->nc_dtype));
  __pyx_v_self->nc_dtype = ((PyArray_Descr *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":703
 *         self.var_name = basestring(var_name)
 *         self.nc_dtype = np.dtype(nc_dtype)
 *         self.group = group             # <<<<<<<<<<<<<<
 *         self.cf_role = basestring(cf_role)
 *         self.cfa_dimensions = list(cfa_dimensions)
 */
  if (!(likely(((__pyx_v_group) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_group, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup))))) __PYX_ERR(0, 703, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_group;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->group);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->group));
  __pyx_v_self->group = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":704
 *         self.nc_dtype = np.dtype(nc_dtype)
 *         self.group = group
 *         self.cf_role = basestring(cf_role)             # <<<<<<<<<<<<<<
 *         self.cfa_dimensions = list(cfa_dimensions)
 *         self.pmdimensions = list(pmdimensions)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBaseString_Type)), __pyx_v_cf_role); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->cf_role);
  __Pyx_DECREF(__pyx_v_self->cf_role);
  __pyx_v_self->cf_role = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":705
 *         self.group = group
 *         self.cf_role = basestring(cf_role)
 *         self.cfa_dimensions = list(cfa_dimensions)             # <<<<<<<<<<<<<<
 *         self.pmdimensions = list(pmdimensions)
 *         self.pmshape = np.array(pmshape)
 */
  __pyx_t_1 = PySequence_List(__pyx_v_cfa_dimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->cfa_dimensions);
  __Pyx_DECREF(__pyx_v_self->cfa_dimensions);
  __pyx_v_self->cfa_dimensions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":706
 *         self.cf_role = basestring(cf_role)
 *         self.cfa_dimensions = list(cfa_dimensions)
 *         self.pmdimensions = list(pmdimensions)             # <<<<<<<<<<<<<<
 *         self.pmshape = np.array(pmshape)
 *         self.base = basestring(base)
 */
  __pyx_t_1 = PySequence_List(__pyx_v_pmdimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->pmdimensions);
  __Pyx_DECREF(__pyx_v_self->pmdimensions);
  __pyx_v_self->pmdimensions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":707
 *         self.cfa_dimensions = list(cfa_dimensions)
 *         self.pmdimensions = list(pmdimensions)
 *         self.pmshape = np.array(pmshape)             # <<<<<<<<<<<<<<
 *         self.base = basestring(base)
 *         # set the nc_partition_group to be None in default
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_pmshape)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_pmshape));
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __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_5numpy_ndarray))))) __PYX_ERR(0, 707, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->pmshape);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pmshape));
  __pyx_v_self->pmshape = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":708
 *         self.pmdimensions = list(pmdimensions)
 *         self.pmshape = np.array(pmshape)
 *         self.base = basestring(base)             # <<<<<<<<<<<<<<
 *         # set the nc_partition_group to be None in default
 *         self.nc_partition_group = nc_partition_group
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBaseString_Type)), __pyx_v_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->base);
  __Pyx_DECREF(__pyx_v_self->base);
  __pyx_v_self->base = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":710
 *         self.base = basestring(base)
 *         # set the nc_partition_group to be None in default
 *         self.nc_partition_group = nc_partition_group             # <<<<<<<<<<<<<<
 *         # we have to process the metadata to exclude the cfa directives
 *         self.metadata = dict()
 */
  __Pyx_INCREF(__pyx_v_nc_partition_group);
  __Pyx_GIVEREF(__pyx_v_nc_partition_group);
  __Pyx_GOTREF(__pyx_v_self->nc_partition_group);
  __Pyx_DECREF(__pyx_v_self->nc_partition_group);
  __pyx_v_self->nc_partition_group = __pyx_v_nc_partition_group;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":712
 *         self.nc_partition_group = nc_partition_group
 *         # we have to process the metadata to exclude the cfa directives
 *         self.metadata = dict()             # <<<<<<<<<<<<<<
 *         for k in metadata:
 *             if not k in CFAVariable.cfa_variable_metadata_keys:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->metadata);
  __Pyx_DECREF(__pyx_v_self->metadata);
  __pyx_v_self->metadata = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":713
 *         # we have to process the metadata to exclude the cfa directives
 *         self.metadata = dict()
 *         for k in metadata:             # <<<<<<<<<<<<<<
 *             if not k in CFAVariable.cfa_variable_metadata_keys:
 *                 self.metadata[k] = metadata[k]
 */
  __pyx_t_4 = 0;
  if (unlikely(__pyx_v_metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 713, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_metadata, 1, ((PyObject *)NULL), (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  while (1) {
    __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_5, &__pyx_t_4, &__pyx_t_3, NULL, NULL, __pyx_t_6);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":714
 *         self.metadata = dict()
 *         for k in metadata:
 *             if not k in CFAVariable.cfa_variable_metadata_keys:             # <<<<<<<<<<<<<<
 *                 self.metadata[k] = metadata[k]
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable), __pyx_n_s_cfa_variable_metadata_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_k, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (__pyx_t_9) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":715
 *         for k in metadata:
 *             if not k in CFAVariable.cfa_variable_metadata_keys:
 *                 self.metadata[k] = metadata[k]             # <<<<<<<<<<<<<<
 * 
 *         self._shape = np.array([])
 */
      if (unlikely(__pyx_v_metadata == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 715, __pyx_L1_error)
      }
      __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_metadata, __pyx_v_k); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(__pyx_v_self->metadata == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 715, __pyx_L1_error)
      }
      if (unlikely(PyDict_SetItem(__pyx_v_self->metadata, __pyx_v_k, __pyx_t_3) < 0)) __PYX_ERR(0, 715, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":714
 *         self.metadata = dict()
 *         for k in metadata:
 *             if not k in CFAVariable.cfa_variable_metadata_keys:             # <<<<<<<<<<<<<<
 *                 self.metadata[k] = metadata[k]
 * 
 */
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":717
 *                 self.metadata[k] = metadata[k]
 * 
 *         self._shape = np.array([])             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(CFAVariable self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 717, __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_ERR(0, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_10, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_shape);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_shape));
  __pyx_v_self->_shape = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":686
 *     cfa_variable_metadata_keys = ["cf_role", "cfa_dimensions", "cfa_array"]
 * 
 *     def __init__(CFAVariable self,             # <<<<<<<<<<<<<<
 *                  basestring var_name,
 *                  np.dtype nc_dtype,
 */

  /* 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_10);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":719
 *         self._shape = np.array([])
 * 
 *     def __repr__(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return a string representing the variable"""
 *         repstr = repr(type(self)) + " : name = {} : dimensions = {} : shape = {}\n".format(
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_3__repr__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_2__repr__[] = "Return a string representing the variable";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_2__repr__;
#endif
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_2__repr__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_2__repr__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self) {
  PyObject *__pyx_v_repstr = NULL;
  PyObject *__pyx_v_md = NULL;
  PyObject *__pyx_8genexpr6__pyx_v_dim = NULL;
  PyObject *__pyx_8genexpr7__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":721
 *     def __repr__(CFAVariable self):
 *         """Return a string representing the variable"""
 *         repstr = repr(type(self)) + " : name = {} : dimensions = {} : shape = {}\n".format(             # <<<<<<<<<<<<<<
 *             self.var_name,
 *             str([dim for dim in self.cfa_dimensions]),
 */
  __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_name_dimensions_shape, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":723
 *         repstr = repr(type(self)) + " : name = {} : dimensions = {} : shape = {}\n".format(
 *             self.var_name,
 *             str([dim for dim in self.cfa_dimensions]),             # <<<<<<<<<<<<<<
 *             str([s for s in self.shape()])
 *         )
 */
  { /* enter inner scope */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__pyx_v_self->cfa_dimensions == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 723, __pyx_L5_error)
    }
    __pyx_t_5 = __pyx_v_self->cfa_dimensions; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 723, __pyx_L5_error)
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 723, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_dim, __pyx_t_7);
      __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_8genexpr6__pyx_v_dim))) __PYX_ERR(0, 723, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_dim); __pyx_8genexpr6__pyx_v_dim = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_dim); __pyx_8genexpr6__pyx_v_dim = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":724
 *             self.var_name,
 *             str([dim for dim in self.cfa_dimensions]),
 *             str([s for s in self.shape()])             # <<<<<<<<<<<<<<
 *         )
 *         for md in self.metadata:
 */
  { /* enter inner scope */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 724, __pyx_L11_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->shape(__pyx_v_self, 0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 724, __pyx_L11_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
      __pyx_t_8 = __pyx_t_7; __Pyx_INCREF(__pyx_t_8); __pyx_t_6 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 724, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 724, __pyx_L11_error)
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 724, __pyx_L11_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 724, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 724, __pyx_L11_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 724, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_9(__pyx_t_8);
        if (unlikely(!__pyx_t_7)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 724, __pyx_L11_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_s, __pyx_t_7);
      __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_8genexpr7__pyx_v_s))) __PYX_ERR(0, 724, __pyx_L11_error)
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_s); __pyx_8genexpr7__pyx_v_s = 0;
    goto __pyx_L14_exit_scope;
    __pyx_L11_error:;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_s); __pyx_8genexpr7__pyx_v_s = 0;
    goto __pyx_L1_error;
    __pyx_L14_exit_scope:;
  } /* exit inner scope */
  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_10 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->var_name, __pyx_t_5, __pyx_t_8};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self->var_name, __pyx_t_5, __pyx_t_8};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self->var_name);
    __Pyx_GIVEREF(__pyx_v_self->var_name);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, __pyx_v_self->var_name);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_10, __pyx_t_8);
    __pyx_t_5 = 0;
    __pyx_t_8 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __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;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":721
 *     def __repr__(CFAVariable self):
 *         """Return a string representing the variable"""
 *         repstr = repr(type(self)) + " : name = {} : dimensions = {} : shape = {}\n".format(             # <<<<<<<<<<<<<<
 *             self.var_name,
 *             str([dim for dim in self.cfa_dimensions]),
 */
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_repstr = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":726
 *             str([s for s in self.shape()])
 *         )
 *         for md in self.metadata:             # <<<<<<<<<<<<<<
 *             repstr += "\t{} : {}\n".format(md, self.metadata[md])
 *         return repstr[:-1]
 */
  __pyx_t_6 = 0;
  if (unlikely(__pyx_v_self->metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 726, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->metadata, 1, ((PyObject *)NULL), (&__pyx_t_11), (&__pyx_t_10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __pyx_t_3 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_11, &__pyx_t_6, &__pyx_t_2, NULL, NULL, __pyx_t_10);
    if (unlikely(__pyx_t_12 == 0)) break;
    if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_md, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":727
 *         )
 *         for md in self.metadata:
 *             repstr += "\t{} : {}\n".format(md, self.metadata[md])             # <<<<<<<<<<<<<<
 *         return repstr[:-1]
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__3, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_v_self->metadata == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 727, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_self->metadata, __pyx_v_md); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_12 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_md, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_md, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_8) {
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
      }
      __Pyx_INCREF(__pyx_v_md);
      __Pyx_GIVEREF(__pyx_v_md);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_12, __pyx_v_md);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_12, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_repstr, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_repstr, __pyx_t_1);
    __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":728
 *         for md in self.metadata:
 *             repstr += "\t{} : {}\n".format(md, self.metadata[md])
 *         return repstr[:-1]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(CFAVariable self, in_key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_repstr, 0, -1L, NULL, NULL, &__pyx_slice__4, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":719
 *         self._shape = np.array([])
 * 
 *     def __repr__(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return a string representing the variable"""
 *         repstr = repr(type(self)) + " : name = {} : dimensions = {} : shape = {}\n".format(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_repstr);
  __Pyx_XDECREF(__pyx_v_md);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_dim);
  __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":730
 *         return repstr[:-1]
 * 
 *     def __getitem__(CFAVariable self, in_key):             # <<<<<<<<<<<<<<
 *         """Return all the subarrays required to take a slice out of the master
 *            array, the slice to take within the subarray and the position of that
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_in_key); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_4__getitem__[] = "Return all the subarrays required to take a slice out of the master\n           array, the slice to take within the subarray and the position of that\n           slice in the master array.\n\n           Args:\n               key: an index into the CFA master array\n\n           Returns:\n               list<tuple> A list of tuples containing the sub array info needed\n                  The tuple consists of (file, var, slice, position) where:\n                  file: string: the name of the file containing the subarray\n                  var: string: the name of the variable in the file\n                  slice: array: the index into the subarray file\n                  position: array: the position in the master array file\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_4__getitem__;
#endif
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_in_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_4__getitem__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self), ((PyObject *)__pyx_v_in_key));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_4__getitem__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_in_key) {
  PyObject *__pyx_v_source_slice = 0;
  PyObject *__pyx_v_target_slice = 0;
  PyObject *__pyx_v_return_list = 0;
  PyArrayObject *__pyx_v_slices = 0;
  PyObject *__pyx_v_part_index_list = 0;
  int __pyx_v_s;
  Py_ssize_t __pyx_v_key_l;
  PyObject *__pyx_v_key = NULL;
  PyArrayObject *__pyx_v_shape = NULL;
  PyTypeObject *__pyx_v_key_ts = NULL;
  PyObject *__pyx_v_key_list = NULL;
  PyObject *__pyx_v_ncp = NULL;
  PyObject *__pyx_v_it = NULL;
  PyObject *__pyx_v_ncvar = NULL;
  PyObject *__pyx_v_location = NULL;
  PyObject *__pyx_v_add_part = NULL;
  Py_ssize_t __pyx_v_d;
  PyObject *__pyx_v_ss = NULL;
  PyObject *__pyx_v_ms = NULL;
  PyObject *__pyx_v_es = NULL;
  PyObject *__pyx_v_return_type = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_partition = NULL;
  Py_ssize_t __pyx_v_ndims;
  PyObject *__pyx_v_target = NULL;
  PyObject *__pyx_v_source = 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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  PyTypeObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":754
 * 
 *         # try to get the length or convert to list
 *         try:             # <<<<<<<<<<<<<<
 *             key_l = len(in_key)
 *             key = in_key
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":755
 *         # try to get the length or convert to list
 *         try:
 *             key_l = len(in_key)             # <<<<<<<<<<<<<<
 *             key = in_key
 *         except TypeError:
 */
      __pyx_t_4 = PyObject_Length(__pyx_v_in_key); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 755, __pyx_L3_error)
      __pyx_v_key_l = __pyx_t_4;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":756
 *         try:
 *             key_l = len(in_key)
 *             key = in_key             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             key_l = 1
 */
      __Pyx_INCREF(__pyx_v_in_key);
      __pyx_v_key = __pyx_v_in_key;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":754
 * 
 *         # try to get the length or convert to list
 *         try:             # <<<<<<<<<<<<<<
 *             key_l = len(in_key)
 *             key = in_key
 */
    }
    __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_L8_try_end;
    __pyx_L3_error:;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":757
 *             key_l = len(in_key)
 *             key = in_key
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             key_l = 1
 *             key = [in_key]
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 757, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "S3netCDF4/CFA/_CFAClasses.pyx":758
 *             key = in_key
 *         except TypeError:
 *             key_l = 1             # <<<<<<<<<<<<<<
 *             key = [in_key]
 * 
 */
      __pyx_v_key_l = 1;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":759
 *         except TypeError:
 *             key_l = 1
 *             key = [in_key]             # <<<<<<<<<<<<<<
 * 
 *         # fill the slices from the 0 index upwards
 */
      __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 759, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_in_key);
      __Pyx_GIVEREF(__pyx_v_in_key);
      PyList_SET_ITEM(__pyx_t_9, 0, __pyx_v_in_key);
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":754
 * 
 *         # try to get the length or convert to list
 *         try:             # <<<<<<<<<<<<<<
 *             key_l = len(in_key)
 *             key = in_key
 */
    __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_L8_try_end:;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":762
 * 
 *         # fill the slices from the 0 index upwards
 *         shape = self.shape()             # <<<<<<<<<<<<<<
 *         slices = np.empty([len(shape), 3], np.int32)
 *         for s in range(0, key_l):
 */
  __pyx_t_8 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->shape(__pyx_v_self, 0)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_shape = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":763
 *         # fill the slices from the 0 index upwards
 *         shape = self.shape()
 *         slices = np.empty([len(shape), 3], np.int32)             # <<<<<<<<<<<<<<
 *         for s in range(0, key_l):
 *             key_ts = type(key[s])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_shape)); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 763, __pyx_L1_error)
  __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = PyList_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_7);
  PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  PyList_SET_ITEM(__pyx_t_9, 1, __pyx_int_3);
  __pyx_t_7 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_t_10};
    __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 763, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_t_10};
    __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 763, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else
  #endif
  {
    __pyx_t_11 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_5, __pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_5, __pyx_t_10);
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 763, __pyx_L1_error)
  __pyx_v_slices = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":764
 *         shape = self.shape()
 *         slices = np.empty([len(shape), 3], np.int32)
 *         for s in range(0, key_l):             # <<<<<<<<<<<<<<
 *             key_ts = type(key[s])
 *             if (key_ts in [int, np.int32, np.int64, np.int16, np.int8]):
 */
  __pyx_t_4 = __pyx_v_key_l;
  __pyx_t_12 = __pyx_t_4;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_12; __pyx_t_5+=1) {
    __pyx_v_s = __pyx_t_5;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":765
 *         slices = np.empty([len(shape), 3], np.int32)
 *         for s in range(0, key_l):
 *             key_ts = type(key[s])             # <<<<<<<<<<<<<<
 *             if (key_ts in [int, np.int32, np.int64, np.int16, np.int8]):
 *                 slices[s,:] = [key[s], key[s]+1, 1]
 */
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_key, __pyx_v_s, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_t_8)));
    __Pyx_XDECREF_SET(__pyx_v_key_ts, ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_t_8))));
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":766
 *         for s in range(0, key_l):
 *             key_ts = type(key[s])
 *             if (key_ts in [int, np.int32, np.int64, np.int16, np.int8]):             # <<<<<<<<<<<<<<
 *                 slices[s,:] = [key[s], key[s]+1, 1]
 *             elif key_ts is slice:
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_key_ts));
    __pyx_t_13 = __pyx_v_key_ts;
    __pyx_t_8 = PyObject_RichCompare(((PyObject *)__pyx_t_13), ((PyObject *)(&PyInt_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L1_error)
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (!__pyx_t_15) {
    } else {
      __pyx_t_14 = __pyx_t_15;
      goto __pyx_L14_bool_binop_done;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_RichCompare(((PyObject *)__pyx_t_13), __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (!__pyx_t_15) {
    } else {
      __pyx_t_14 = __pyx_t_15;
      goto __pyx_L14_bool_binop_done;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_RichCompare(((PyObject *)__pyx_t_13), __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (!__pyx_t_15) {
    } else {
      __pyx_t_14 = __pyx_t_15;
      goto __pyx_L14_bool_binop_done;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_RichCompare(((PyObject *)__pyx_t_13), __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (!__pyx_t_15) {
    } else {
      __pyx_t_14 = __pyx_t_15;
      goto __pyx_L14_bool_binop_done;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_RichCompare(((PyObject *)__pyx_t_13), __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_14 = __pyx_t_15;
    __pyx_L14_bool_binop_done:;
    __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
    __pyx_t_15 = (__pyx_t_14 != 0);
    if (__pyx_t_15) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":767
 *             key_ts = type(key[s])
 *             if (key_ts in [int, np.int32, np.int64, np.int16, np.int8]):
 *                 slices[s,:] = [key[s], key[s]+1, 1]             # <<<<<<<<<<<<<<
 *             elif key_ts is slice:
 *                 key_list = key[s].indices(shape[s])
 */
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_key, __pyx_v_s, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_key, __pyx_v_s, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_11 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_8);
      PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_11);
      PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_11);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyList_SET_ITEM(__pyx_t_6, 2, __pyx_int_1);
      __pyx_t_8 = 0;
      __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_s); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11);
      __Pyx_INCREF(__pyx_slice__19);
      __Pyx_GIVEREF(__pyx_slice__19);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_slice__19);
      __pyx_t_11 = 0;
      if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_slices), __pyx_t_8, __pyx_t_6) < 0)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":766
 *         for s in range(0, key_l):
 *             key_ts = type(key[s])
 *             if (key_ts in [int, np.int32, np.int64, np.int16, np.int8]):             # <<<<<<<<<<<<<<
 *                 slices[s,:] = [key[s], key[s]+1, 1]
 *             elif key_ts is slice:
 */
      goto __pyx_L13;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":768
 *             if (key_ts in [int, np.int32, np.int64, np.int16, np.int8]):
 *                 slices[s,:] = [key[s], key[s]+1, 1]
 *             elif key_ts is slice:             # <<<<<<<<<<<<<<
 *                 key_list = key[s].indices(shape[s])
 *                 slices[s,:] = [key_list[0], key_list[1], key_list[2]]
 */
    __pyx_t_15 = (__pyx_v_key_ts == (&PySlice_Type));
    __pyx_t_14 = (__pyx_t_15 != 0);
    if (likely(__pyx_t_14)) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":769
 *                 slices[s,:] = [key[s], key[s]+1, 1]
 *             elif key_ts is slice:
 *                 key_list = key[s].indices(shape[s])             # <<<<<<<<<<<<<<
 *                 slices[s,:] = [key_list[0], key_list[1], key_list[2]]
 *             else:
 */
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_key, __pyx_v_s, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_indices); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_shape), __pyx_v_s, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF_SET(__pyx_v_key_list, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":770
 *             elif key_ts is slice:
 *                 key_list = key[s].indices(shape[s])
 *                 slices[s,:] = [key_list[0], key_list[1], key_list[2]]             # <<<<<<<<<<<<<<
 *             else:
 *                 raise CFAVariableIndexError(
 */
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_key_list, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_key_list, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_key_list, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = PyList_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_6);
      PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_11);
      PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_8);
      PyList_SET_ITEM(__pyx_t_10, 2, __pyx_t_8);
      __pyx_t_6 = 0;
      __pyx_t_11 = 0;
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_s); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8);
      __Pyx_INCREF(__pyx_slice__19);
      __Pyx_GIVEREF(__pyx_slice__19);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_slice__19);
      __pyx_t_8 = 0;
      if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_slices), __pyx_t_11, __pyx_t_10) < 0)) __PYX_ERR(0, 770, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":768
 *             if (key_ts in [int, np.int32, np.int64, np.int16, np.int8]):
 *                 slices[s,:] = [key[s], key[s]+1, 1]
 *             elif key_ts is slice:             # <<<<<<<<<<<<<<
 *                 key_list = key[s].indices(shape[s])
 *                 slices[s,:] = [key_list[0], key_list[1], key_list[2]]
 */
      goto __pyx_L13;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":772
 *                 slices[s,:] = [key_list[0], key_list[1], key_list[2]]
 *             else:
 *                 raise CFAVariableIndexError(             # <<<<<<<<<<<<<<
 *                     "Cannot index CFA array with type: {} from {}".format(
 *                         key_ts, in_key
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_CFAVariableIndexError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 772, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);

      /* "S3netCDF4/CFA/_CFAClasses.pyx":773
 *             else:
 *                 raise CFAVariableIndexError(
 *                     "Cannot index CFA array with type: {} from {}".format(             # <<<<<<<<<<<<<<
 *                         key_ts, in_key
 *                     )
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Cannot_index_CFA_array_with_type, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);

      /* "S3netCDF4/CFA/_CFAClasses.pyx":774
 *                 raise CFAVariableIndexError(
 *                     "Cannot index CFA array with type: {} from {}".format(
 *                         key_ts, in_key             # <<<<<<<<<<<<<<
 *                     )
 *                 )
 */
      __pyx_t_9 = NULL;
      __pyx_t_16 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_16 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_9, ((PyObject *)__pyx_v_key_ts), __pyx_v_in_key};
        __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 773, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[3] = {__pyx_t_9, ((PyObject *)__pyx_v_key_ts), __pyx_v_in_key};
        __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_16, 2+__pyx_t_16); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 773, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_8);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(2+__pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 773, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (__pyx_t_9) {
          __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); __pyx_t_9 = NULL;
        }
        __Pyx_INCREF(((PyObject *)__pyx_v_key_ts));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_key_ts));
        PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_16, ((PyObject *)__pyx_v_key_ts));
        __Pyx_INCREF(__pyx_v_in_key);
        __Pyx_GIVEREF(__pyx_v_in_key);
        PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_16, __pyx_v_in_key);
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 773, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_10 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_8);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 772, __pyx_L1_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_ERR(0, 772, __pyx_L1_error)
    }
    __pyx_L13:;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":778
 *                 )
 *         # fill in any other part that is not specified
 *         for s in range(key_l, len(shape)):             # <<<<<<<<<<<<<<
 *             slices[s] = [0, shape[s], 1]
 *         # reset key_l as we have now filled the slices
 */
  __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_shape)); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 778, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_4;
  for (__pyx_t_5 = __pyx_v_key_l; __pyx_t_5 < __pyx_t_12; __pyx_t_5+=1) {
    __pyx_v_s = __pyx_t_5;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":779
 *         # fill in any other part that is not specified
 *         for s in range(key_l, len(shape)):
 *             slices[s] = [0, shape[s], 1]             # <<<<<<<<<<<<<<
 *         # reset key_l as we have now filled the slices
 *         key_l = len(slices)
 */
    __pyx_t_10 = __Pyx_GetItemInt(((PyObject *)__pyx_v_shape), __pyx_v_s, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyList_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyList_SET_ITEM(__pyx_t_11, 0, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_t_10);
    PyList_SET_ITEM(__pyx_t_11, 1, __pyx_t_10);
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    PyList_SET_ITEM(__pyx_t_11, 2, __pyx_int_1);
    __pyx_t_10 = 0;
    if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_slices), __pyx_v_s, __pyx_t_11, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 779, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":781
 *             slices[s] = [0, shape[s], 1]
 *         # reset key_l as we have now filled the slices
 *         key_l = len(slices)             # <<<<<<<<<<<<<<
 *         # check the ranges of the slices and check for None
 *         for s in range(0, key_l):
 */
  __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_slices)); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 781, __pyx_L1_error)
  __pyx_v_key_l = __pyx_t_4;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":783
 *         key_l = len(slices)
 *         # check the ranges of the slices and check for None
 *         for s in range(0, key_l):             # <<<<<<<<<<<<<<
 *             if (slices[s,0] is None):
 *                 slices[s,0] = 0
 */
  __pyx_t_4 = __pyx_v_key_l;
  __pyx_t_12 = __pyx_t_4;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_12; __pyx_t_5+=1) {
    __pyx_v_s = __pyx_t_5;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":784
 *         # check the ranges of the slices and check for None
 *         for s in range(0, key_l):
 *             if (slices[s,0] is None):             # <<<<<<<<<<<<<<
 *                 slices[s,0] = 0
 *             if (slices[s,1] is None):
 */
    __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_s); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_int_0);
    __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_14 = (__pyx_t_11 == Py_None);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_15 = (__pyx_t_14 != 0);
    if (__pyx_t_15) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":785
 *         for s in range(0, key_l):
 *             if (slices[s,0] is None):
 *                 slices[s,0] = 0             # <<<<<<<<<<<<<<
 *             if (slices[s,1] is None):
 *                 slices[s,1] = shape[s]
 */
      __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_s); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_int_0);
      __pyx_t_11 = 0;
      if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_slices), __pyx_t_10, __pyx_int_0) < 0)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":784
 *         # check the ranges of the slices and check for None
 *         for s in range(0, key_l):
 *             if (slices[s,0] is None):             # <<<<<<<<<<<<<<
 *                 slices[s,0] = 0
 *             if (slices[s,1] is None):
 */
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":786
 *             if (slices[s,0] is None):
 *                 slices[s,0] = 0
 *             if (slices[s,1] is None):             # <<<<<<<<<<<<<<
 *                 slices[s,1] = shape[s]
 *             if (slices[s,0] < 0 or slices[s,0] > shape[s] or
 */
    __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_s); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_int_1);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_15 = (__pyx_t_10 == Py_None);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_14 = (__pyx_t_15 != 0);
    if (__pyx_t_14) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":787
 *                 slices[s,0] = 0
 *             if (slices[s,1] is None):
 *                 slices[s,1] = shape[s]             # <<<<<<<<<<<<<<
 *             if (slices[s,0] < 0 or slices[s,0] > shape[s] or
 *                 slices[s,1] < 0 or slices[s,1] > shape[s]):
 */
      __pyx_t_10 = __Pyx_GetItemInt(((PyObject *)__pyx_v_shape), __pyx_v_s, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 787, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_s); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 787, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 787, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_1);
      __pyx_t_11 = 0;
      if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_slices), __pyx_t_8, __pyx_t_10) < 0)) __PYX_ERR(0, 787, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":786
 *             if (slices[s,0] is None):
 *                 slices[s,0] = 0
 *             if (slices[s,1] is None):             # <<<<<<<<<<<<<<
 *                 slices[s,1] = shape[s]
 *             if (slices[s,0] < 0 or slices[s,0] > shape[s] or
 */
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":788
 *             if (slices[s,1] is None):
 *                 slices[s,1] = shape[s]
 *             if (slices[s,0] < 0 or slices[s,0] > shape[s] or             # <<<<<<<<<<<<<<
 *                 slices[s,1] < 0 or slices[s,1] > shape[s]):
 *                 raise CFAVariableIndexError(
 */
    __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_s); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_0);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_10, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (!__pyx_t_15) {
    } else {
      __pyx_t_14 = __pyx_t_15;
      goto __pyx_L26_bool_binop_done;
    }
    __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_s); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_int_0);
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_GetItemInt(((PyObject *)__pyx_v_shape), __pyx_v_s, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyObject_RichCompare(__pyx_t_8, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (!__pyx_t_15) {
    } else {
      __pyx_t_14 = __pyx_t_15;
      goto __pyx_L26_bool_binop_done;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":789
 *                 slices[s,1] = shape[s]
 *             if (slices[s,0] < 0 or slices[s,0] > shape[s] or
 *                 slices[s,1] < 0 or slices[s,1] > shape[s]):             # <<<<<<<<<<<<<<
 *                 raise CFAVariableIndexError(
 *                     "Index into CFA array is out of range: {}".format(
 */
    __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_s); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_int_1);
    __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_RichCompare(__pyx_t_11, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (!__pyx_t_15) {
    } else {
      __pyx_t_14 = __pyx_t_15;
      goto __pyx_L26_bool_binop_done;
    }
    __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_s); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10);
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_int_1);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_GetItemInt(((PyObject *)__pyx_v_shape), __pyx_v_s, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_10, __pyx_t_11, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_14 = __pyx_t_15;
    __pyx_L26_bool_binop_done:;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":788
 *             if (slices[s,1] is None):
 *                 slices[s,1] = shape[s]
 *             if (slices[s,0] < 0 or slices[s,0] > shape[s] or             # <<<<<<<<<<<<<<
 *                 slices[s,1] < 0 or slices[s,1] > shape[s]):
 *                 raise CFAVariableIndexError(
 */
    if (unlikely(__pyx_t_14)) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":790
 *             if (slices[s,0] < 0 or slices[s,0] > shape[s] or
 *                 slices[s,1] < 0 or slices[s,1] > shape[s]):
 *                 raise CFAVariableIndexError(             # <<<<<<<<<<<<<<
 *                     "Index into CFA array is out of range: {}".format(
 *                         in_key)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_CFAVariableIndexError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 790, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);

      /* "S3netCDF4/CFA/_CFAClasses.pyx":791
 *                 slices[s,1] < 0 or slices[s,1] > shape[s]):
 *                 raise CFAVariableIndexError(
 *                     "Index into CFA array is out of range: {}".format(             # <<<<<<<<<<<<<<
 *                         in_key)
 *                     )
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Index_into_CFA_array_is_out_of_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);

      /* "S3netCDF4/CFA/_CFAClasses.pyx":792
 *                 raise CFAVariableIndexError(
 *                     "Index into CFA array is out of range: {}".format(
 *                         in_key)             # <<<<<<<<<<<<<<
 *                     )
 * 
 */
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_10 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_in_key) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_in_key);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 791, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_6, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 790, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(0, 790, __pyx_L1_error)

      /* "S3netCDF4/CFA/_CFAClasses.pyx":788
 *             if (slices[s,1] is None):
 *                 slices[s,1] = shape[s]
 *             if (slices[s,0] < 0 or slices[s,0] > shape[s] or             # <<<<<<<<<<<<<<
 *                 slices[s,1] < 0 or slices[s,1] > shape[s]):
 *                 raise CFAVariableIndexError(
 */
    }
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":796
 * 
 *         # replaced "clever" search with brute force search for now
 *         ncp = self.nc_partition_group             # <<<<<<<<<<<<<<
 *         # iterate over the indices and find each index that the slice is within
 *         it = np.nditer(ncp.variables["ncvar"],
 */
  __pyx_t_8 = __pyx_v_self->nc_partition_group;
  __Pyx_INCREF(__pyx_t_8);
  __pyx_v_ncp = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":798
 *         ncp = self.nc_partition_group
 *         # iterate over the indices and find each index that the slice is within
 *         it = np.nditer(ncp.variables["ncvar"],             # <<<<<<<<<<<<<<
 *                        flags=["multi_index", "refs_ok"])
 *         # store the indices
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_nditer); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_t_8, __pyx_n_u_ncvar); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
  __pyx_t_10 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":799
 *         # iterate over the indices and find each index that the slice is within
 *         it = np.nditer(ncp.variables["ncvar"],
 *                        flags=["multi_index", "refs_ok"])             # <<<<<<<<<<<<<<
 *         # store the indices
 *         part_index_list = []
 */
  __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_u_multi_index);
  __Pyx_GIVEREF(__pyx_n_u_multi_index);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_u_multi_index);
  __Pyx_INCREF(__pyx_n_u_refs_ok);
  __Pyx_GIVEREF(__pyx_n_u_refs_ok);
  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_u_refs_ok);
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_flags, __pyx_t_6) < 0) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":798
 *         ncp = self.nc_partition_group
 *         # iterate over the indices and find each index that the slice is within
 *         it = np.nditer(ncp.variables["ncvar"],             # <<<<<<<<<<<<<<
 *                        flags=["multi_index", "refs_ok"])
 *         # store the indices
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_v_it = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":801
 *                        flags=["multi_index", "refs_ok"])
 *         # store the indices
 *         part_index_list = []             # <<<<<<<<<<<<<<
 *         while not it.finished:
 *             ncvar  = ncp.variables["ncvar"][it.multi_index]
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_part_index_list = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":802
 *         # store the indices
 *         part_index_list = []
 *         while not it.finished:             # <<<<<<<<<<<<<<
 *             ncvar  = ncp.variables["ncvar"][it.multi_index]
 *             # if the partition is undefined then calculate it - this will occur
 */
  while (1) {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_it, __pyx_n_s_finished); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 802, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_15 = ((!__pyx_t_14) != 0);
    if (!__pyx_t_15) break;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":803
 *         part_index_list = []
 *         while not it.finished:
 *             ncvar  = ncp.variables["ncvar"][it.multi_index]             # <<<<<<<<<<<<<<
 *             # if the partition is undefined then calculate it - this will occur
 *             # when writing a partition, or if there are undefined partitions
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_ncvar); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_it, __pyx_n_s_multi_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_ncvar, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":809
 *             # partitions, not the actual definition - i.e. we don't know if we
 *             # are going to write into this partition yet
 *             if ncvar == "":             # <<<<<<<<<<<<<<
 *                 location = self.__calculateLocation(it.multi_index)
 *             else:
 */
    __pyx_t_15 = (__Pyx_PyUnicode_Equals(__pyx_v_ncvar, __pyx_kp_u__13, Py_EQ)); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 809, __pyx_L1_error)
    if (__pyx_t_15) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":810
 *             # are going to write into this partition yet
 *             if ncvar == "":
 *                 location = self.__calculateLocation(it.multi_index)             # <<<<<<<<<<<<<<
 *             else:
 *                 location = ncp.variables["location"][it.multi_index]
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_it, __pyx_n_s_multi_index); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 810, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->__pyx___calculateLocation(__pyx_v_self, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_v_location, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":809
 *             # partitions, not the actual definition - i.e. we don't know if we
 *             # are going to write into this partition yet
 *             if ncvar == "":             # <<<<<<<<<<<<<<
 *                 location = self.__calculateLocation(it.multi_index)
 *             else:
 */
      goto __pyx_L32;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":812
 *                 location = self.__calculateLocation(it.multi_index)
 *             else:
 *                 location = ncp.variables["location"][it.multi_index]             # <<<<<<<<<<<<<<
 *             # inclusion test
 *             add_part = 0
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_location); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_it, __pyx_n_s_multi_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_location, __pyx_t_10);
      __pyx_t_10 = 0;
    }
    __pyx_L32:;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":814
 *                 location = ncp.variables["location"][it.multi_index]
 *             # inclusion test
 *             add_part = 0             # <<<<<<<<<<<<<<
 *             for d in range(0, key_l):
 *                 # three cases:
 */
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_XDECREF_SET(__pyx_v_add_part, __pyx_int_0);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":815
 *             # inclusion test
 *             add_part = 0
 *             for d in range(0, key_l):             # <<<<<<<<<<<<<<
 *                 # three cases:
 *                 # 1. l0 <= s0 < l1         (this is the starting slice {ss})
 */
    __pyx_t_4 = __pyx_v_key_l;
    __pyx_t_12 = __pyx_t_4;
    for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_12; __pyx_t_17+=1) {
      __pyx_v_d = __pyx_t_17;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":820
 *                 # 2. l0 >= s0 and l1 <= s1 (these are the middle slices {ms})
 *                 # 3. l0 <= s1 and l1 >= s1 (this is the end slice {es})
 *                 ss = location[d,0] <= slices[d,0] and slices[d,0] < location[d,1]             # <<<<<<<<<<<<<<
 *                 ms = location[d,0] >= slices[d,0] and location[d,1] <= slices[d,1]
 *                 es = location[d,0] < slices[d,1] and slices[d,1] <= location[d,1]
 */
      __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_0);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_location, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_int_0);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyObject_RichCompare(__pyx_t_6, __pyx_t_8, Py_LE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 820, __pyx_L1_error)
      if (__pyx_t_15) {
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else {
        __Pyx_INCREF(__pyx_t_11);
        __pyx_t_10 = __pyx_t_11;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L35_bool_binop_done;
      }
      __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_0);
      __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_location, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_11, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_10 = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_L35_bool_binop_done:;
      __Pyx_XDECREF_SET(__pyx_v_ss, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":821
 *                 # 3. l0 <= s1 and l1 >= s1 (this is the end slice {es})
 *                 ss = location[d,0] <= slices[d,0] and slices[d,0] < location[d,1]
 *                 ms = location[d,0] >= slices[d,0] and location[d,1] <= slices[d,1]             # <<<<<<<<<<<<<<
 *                 es = location[d,0] < slices[d,1] and slices[d,1] <= location[d,1]
 * 
 */
      __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_0);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_location, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_int_0);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyObject_RichCompare(__pyx_t_6, __pyx_t_8, Py_GE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 821, __pyx_L1_error)
      if (__pyx_t_15) {
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else {
        __Pyx_INCREF(__pyx_t_11);
        __pyx_t_10 = __pyx_t_11;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L37_bool_binop_done;
      }
      __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_1);
      __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_location, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_11, __pyx_t_8, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 821, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_10 = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_L37_bool_binop_done:;
      __Pyx_XDECREF_SET(__pyx_v_ms, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":822
 *                 ss = location[d,0] <= slices[d,0] and slices[d,0] < location[d,1]
 *                 ms = location[d,0] >= slices[d,0] and location[d,1] <= slices[d,1]
 *                 es = location[d,0] < slices[d,1] and slices[d,1] <= location[d,1]             # <<<<<<<<<<<<<<
 * 
 *                 # logical or these for whether the slice is contained in this
 */
      __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_0);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_location, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_int_1);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyObject_RichCompare(__pyx_t_6, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 822, __pyx_L1_error)
      if (__pyx_t_15) {
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else {
        __Pyx_INCREF(__pyx_t_11);
        __pyx_t_10 = __pyx_t_11;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L39_bool_binop_done;
      }
      __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_1);
      __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_location, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_11, __pyx_t_8, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_10 = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_L39_bool_binop_done:;
      __Pyx_XDECREF_SET(__pyx_v_es, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":826
 *                 # logical or these for whether the slice is contained in this
 *                 # dimension
 *                 if (ss or ms or es):             # <<<<<<<<<<<<<<
 *                     add_part += 1
 *                 # add the partition if it matches in all dimensions
 */
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_ss); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 826, __pyx_L1_error)
      if (!__pyx_t_14) {
      } else {
        __pyx_t_15 = __pyx_t_14;
        goto __pyx_L42_bool_binop_done;
      }
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_ms); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 826, __pyx_L1_error)
      if (!__pyx_t_14) {
      } else {
        __pyx_t_15 = __pyx_t_14;
        goto __pyx_L42_bool_binop_done;
      }
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_es); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 826, __pyx_L1_error)
      __pyx_t_15 = __pyx_t_14;
      __pyx_L42_bool_binop_done:;
      if (__pyx_t_15) {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":827
 *                 # dimension
 *                 if (ss or ms or es):
 *                     add_part += 1             # <<<<<<<<<<<<<<
 *                 # add the partition if it matches in all dimensions
 *                 if add_part == key_l:
 */
        __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_v_add_part, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 827, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF_SET(__pyx_v_add_part, __pyx_t_10);
        __pyx_t_10 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":826
 *                 # logical or these for whether the slice is contained in this
 *                 # dimension
 *                 if (ss or ms or es):             # <<<<<<<<<<<<<<
 *                     add_part += 1
 *                 # add the partition if it matches in all dimensions
 */
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":829
 *                     add_part += 1
 *                 # add the partition if it matches in all dimensions
 *                 if add_part == key_l:             # <<<<<<<<<<<<<<
 *                     part_index_list.append(it.multi_index)
 *             it.iternext()
 */
      __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_key_l); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_6 = PyObject_RichCompare(__pyx_v_add_part, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 829, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 829, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_15) {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":830
 *                 # add the partition if it matches in all dimensions
 *                 if add_part == key_l:
 *                     part_index_list.append(it.multi_index)             # <<<<<<<<<<<<<<
 *             it.iternext()
 *         # now get the partition filenames, with the variable and the source
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_it, __pyx_n_s_multi_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 830, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_part_index_list, __pyx_t_6); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 830, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":829
 *                     add_part += 1
 *                 # add the partition if it matches in all dimensions
 *                 if add_part == key_l:             # <<<<<<<<<<<<<<
 *                     part_index_list.append(it.multi_index)
 *             it.iternext()
 */
      }
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":831
 *                 if add_part == key_l:
 *                     part_index_list.append(it.multi_index)
 *             it.iternext()             # <<<<<<<<<<<<<<
 *         # now get the partition filenames, with the variable and the source
 *         # and target slices necessary to copy a slice from a subarray to a
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_it, __pyx_n_s_iternext); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
      }
    }
    __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":835
 *         # and target slices necessary to copy a slice from a subarray to a
 *         # master array
 *         return_list = []             # <<<<<<<<<<<<<<
 *         return_type = namedtuple(
 *                         'return_type',
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_return_list = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":836
 *         # master array
 *         return_list = []
 *         return_type = namedtuple(             # <<<<<<<<<<<<<<
 *                         'return_type',
 *                         'partition source target'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_return_type = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":840
 *                         'partition source target'
 *                       )
 *         for i in part_index_list:             # <<<<<<<<<<<<<<
 *             partition = self.getPartition(i)
 * 
 */
  __pyx_t_10 = __pyx_v_part_index_list; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_10)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 840, __pyx_L1_error)
    #else
    __pyx_t_6 = PySequence_ITEM(__pyx_t_10, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":841
 *                       )
 *         for i in part_index_list:
 *             partition = self.getPartition(i)             # <<<<<<<<<<<<<<
 * 
 *             # create the default source slice, this is the shape of the subarray
 */
    __pyx_t_6 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->getPartition(__pyx_v_self, __pyx_v_i, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_partition, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":844
 * 
 *             # create the default source slice, this is the shape of the subarray
 *             ndims = len(partition.shape)             # <<<<<<<<<<<<<<
 *             source_slice = []
 *             target_slice = []
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_partition, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_12 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_ndims = __pyx_t_12;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":845
 *             # create the default source slice, this is the shape of the subarray
 *             ndims = len(partition.shape)
 *             source_slice = []             # <<<<<<<<<<<<<<
 *             target_slice = []
 *             # loop over all the slice dimensions - these should be equal between
 */
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_source_slice, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":846
 *             ndims = len(partition.shape)
 *             source_slice = []
 *             target_slice = []             # <<<<<<<<<<<<<<
 *             # loop over all the slice dimensions - these should be equal between
 *             # the source_slice and target_slice
 */
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_target_slice, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":849
 *             # loop over all the slice dimensions - these should be equal between
 *             # the source_slice and target_slice
 *             for d in range(0, ndims):             # <<<<<<<<<<<<<<
 *                 # create the target slice, this is the location of the partition
 *                 # in the master array - we will modify both of these
 */
    __pyx_t_12 = __pyx_v_ndims;
    __pyx_t_17 = __pyx_t_12;
    for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_17; __pyx_t_19+=1) {
      __pyx_v_d = __pyx_t_19;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":852
 *                 # create the target slice, this is the location of the partition
 *                 # in the master array - we will modify both of these
 *                 target = [partition.location[d,0],             # <<<<<<<<<<<<<<
 *                           partition.location[d,1],
 *                           1]
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_partition, __pyx_n_s_location); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_int_0);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":853
 *                 # in the master array - we will modify both of these
 *                 target = [partition.location[d,0],
 *                           partition.location[d,1],             # <<<<<<<<<<<<<<
 *                           1]
 *                 source = [0,
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_partition, __pyx_n_s_location); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_1);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":852
 *                 # create the target slice, this is the location of the partition
 *                 # in the master array - we will modify both of these
 *                 target = [partition.location[d,0],             # <<<<<<<<<<<<<<
 *                           partition.location[d,1],
 *                           1]
 */
      __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8);
      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_6);
      PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyList_SET_ITEM(__pyx_t_7, 2, __pyx_int_1);
      __pyx_t_8 = 0;
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_target, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":856
 *                           1]
 *                 source = [0,
 *                           partition.shape[d],             # <<<<<<<<<<<<<<
 *                           1]
 *                 # rejig the target and source slices based on the input slices
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_partition, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 856, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, __pyx_v_d, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 856, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":855
 *                           partition.location[d,1],
 *                           1]
 *                 source = [0,             # <<<<<<<<<<<<<<
 *                           partition.shape[d],
 *                           1]
 */
      __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_0);
      __Pyx_GIVEREF(__pyx_t_6);
      PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyList_SET_ITEM(__pyx_t_7, 2, __pyx_int_1);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_source, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":859
 *                           1]
 *                 # rejig the target and source slices based on the input slices
 *                 if slices[d,1] < target[1]:             # <<<<<<<<<<<<<<
 *                     source[1] -= target[1] - slices[d,1]
 *                     target[1] = slices[d,1]
 */
      __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_target, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_15) {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":860
 *                 # rejig the target and source slices based on the input slices
 *                 if slices[d,1] < target[1]:
 *                     source[1] -= target[1] - slices[d,1]             # <<<<<<<<<<<<<<
 *                     target[1] = slices[d,1]
 *                 # adjust the target start and end for the sub slice
 */
        __pyx_t_20 = 1;
        __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_source, __pyx_t_20, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_target, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
        __Pyx_INCREF(__pyx_int_1);
        __Pyx_GIVEREF(__pyx_int_1);
        PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_int_1);
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = PyNumber_Subtract(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyNumber_InPlaceSubtract(__pyx_t_8, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(__Pyx_SetItemInt(__pyx_v_source, __pyx_t_20, __pyx_t_7, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":861
 *                 if slices[d,1] < target[1]:
 *                     source[1] -= target[1] - slices[d,1]
 *                     target[1] = slices[d,1]             # <<<<<<<<<<<<<<
 *                 # adjust the target start and end for the sub slice
 *                 target[0] -= slices[d,0]
 */
        __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 861, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 861, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
        __Pyx_INCREF(__pyx_int_1);
        __Pyx_GIVEREF(__pyx_int_1);
        PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_int_1);
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 861, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(__Pyx_SetItemInt(__pyx_v_target, 1, __pyx_t_7, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 861, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":859
 *                           1]
 *                 # rejig the target and source slices based on the input slices
 *                 if slices[d,1] < target[1]:             # <<<<<<<<<<<<<<
 *                     source[1] -= target[1] - slices[d,1]
 *                     target[1] = slices[d,1]
 */
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":863
 *                     target[1] = slices[d,1]
 *                 # adjust the target start and end for the sub slice
 *                 target[0] -= slices[d,0]             # <<<<<<<<<<<<<<
 *                 target[1] -= slices[d,0]
 *                 # check if the slice started in the location
 */
      __pyx_t_20 = 0;
      __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_target, __pyx_t_20, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_0);
      __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyNumber_InPlaceSubtract(__pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(__Pyx_SetItemInt(__pyx_v_target, __pyx_t_20, __pyx_t_8, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) __PYX_ERR(0, 863, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":864
 *                 # adjust the target start and end for the sub slice
 *                 target[0] -= slices[d,0]
 *                 target[1] -= slices[d,0]             # <<<<<<<<<<<<<<
 *                 # check if the slice started in the location
 *                 if target[0] < 0:
 */
      __pyx_t_20 = 1;
      __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_target, __pyx_t_20, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 864, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_d); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 864, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 864, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_11);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_0);
      __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_slices), __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 864, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyNumber_InPlaceSubtract(__pyx_t_8, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 864, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(__Pyx_SetItemInt(__pyx_v_target, __pyx_t_20, __pyx_t_7, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) __PYX_ERR(0, 864, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":866
 *                 target[1] -= slices[d,0]
 *                 # check if the slice started in the location
 *                 if target[0] < 0:             # <<<<<<<<<<<<<<
 *                     # source slice start is absolute value of target slice
 *                     source[0] = -1 * target[0]
 */
      __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_target, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_11 = PyObject_RichCompare(__pyx_t_7, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_15) {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":868
 *                 if target[0] < 0:
 *                     # source slice start is absolute value of target slice
 *                     source[0] = -1 * target[0]             # <<<<<<<<<<<<<<
 *                     # target start is 0
 *                     target[0] = 0
 */
        __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_target, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 868, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_7 = PyNumber_Multiply(__pyx_int_neg_1, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 868, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(__Pyx_SetItemInt(__pyx_v_source, 0, __pyx_t_7, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 868, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":870
 *                     source[0] = -1 * target[0]
 *                     # target start is 0
 *                     target[0] = 0             # <<<<<<<<<<<<<<
 *                 source_slice.append(slice(source[0], source[1], source[2]))
 *                 target_slice.append(slice(target[0], target[1], target[2]))
 */
        if (unlikely(__Pyx_SetItemInt(__pyx_v_target, 0, __pyx_int_0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 870, __pyx_L1_error)

        /* "S3netCDF4/CFA/_CFAClasses.pyx":866
 *                 target[1] -= slices[d,0]
 *                 # check if the slice started in the location
 *                 if target[0] < 0:             # <<<<<<<<<<<<<<
 *                     # source slice start is absolute value of target slice
 *                     source[0] = -1 * target[0]
 */
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":871
 *                     # target start is 0
 *                     target[0] = 0
 *                 source_slice.append(slice(source[0], source[1], source[2]))             # <<<<<<<<<<<<<<
 *                 target_slice.append(slice(target[0], target[1], target[2]))
 * 
 */
      __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_source, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_source, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_source, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = PySlice_New(__pyx_t_7, __pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_source_slice, __pyx_t_6); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":872
 *                     target[0] = 0
 *                 source_slice.append(slice(source[0], source[1], source[2]))
 *                 target_slice.append(slice(target[0], target[1], target[2]))             # <<<<<<<<<<<<<<
 * 
 *             # append in order: partition, source_slice, target_slice
 */
      __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_target, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_target, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_target, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_7 = PySlice_New(__pyx_t_6, __pyx_t_8, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_target_slice, __pyx_t_7); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":875
 * 
 *             # append in order: partition, source_slice, target_slice
 *             return_list.append(return_type(partition = partition,             # <<<<<<<<<<<<<<
 *                                            source = tuple(source_slice),
 *                                            target = tuple(target_slice))
 */
    __pyx_t_7 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_partition, __pyx_v_partition) < 0) __PYX_ERR(0, 875, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":876
 *             # append in order: partition, source_slice, target_slice
 *             return_list.append(return_type(partition = partition,
 *                                            source = tuple(source_slice),             # <<<<<<<<<<<<<<
 *                                            target = tuple(target_slice))
 *                               )
 */
    __pyx_t_11 = PyList_AsTuple(__pyx_v_source_slice); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_source, __pyx_t_11) < 0) __PYX_ERR(0, 875, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":877
 *             return_list.append(return_type(partition = partition,
 *                                            source = tuple(source_slice),
 *                                            target = tuple(target_slice))             # <<<<<<<<<<<<<<
 *                               )
 *         return return_list
 */
    __pyx_t_11 = PyList_AsTuple(__pyx_v_target_slice); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_target, __pyx_t_11) < 0) __PYX_ERR(0, 875, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":875
 * 
 *             # append in order: partition, source_slice, target_slice
 *             return_list.append(return_type(partition = partition,             # <<<<<<<<<<<<<<
 *                                            source = tuple(source_slice),
 *                                            target = tuple(target_slice))
 */
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_v_return_type, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_return_list, __pyx_t_11); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 875, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":840
 *                         'partition source target'
 *                       )
 *         for i in part_index_list:             # <<<<<<<<<<<<<<
 *             partition = self.getPartition(i)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":879
 *                                            target = tuple(target_slice))
 *                               )
 *         return return_list             # <<<<<<<<<<<<<<
 * 
 *     cpdef CFAGroup getGroup(CFAVariable self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_return_list);
  __pyx_r = __pyx_v_return_list;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":730
 *         return repstr[:-1]
 * 
 *     def __getitem__(CFAVariable self, in_key):             # <<<<<<<<<<<<<<
 *         """Return all the subarrays required to take a slice out of the master
 *            array, the slice to take within the subarray and the position of that
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(((PyObject *)__pyx_t_13));
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_source_slice);
  __Pyx_XDECREF(__pyx_v_target_slice);
  __Pyx_XDECREF(__pyx_v_return_list);
  __Pyx_XDECREF((PyObject *)__pyx_v_slices);
  __Pyx_XDECREF(__pyx_v_part_index_list);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF((PyObject *)__pyx_v_shape);
  __Pyx_XDECREF(__pyx_v_key_ts);
  __Pyx_XDECREF(__pyx_v_key_list);
  __Pyx_XDECREF(__pyx_v_ncp);
  __Pyx_XDECREF(__pyx_v_it);
  __Pyx_XDECREF(__pyx_v_ncvar);
  __Pyx_XDECREF(__pyx_v_location);
  __Pyx_XDECREF(__pyx_v_add_part);
  __Pyx_XDECREF(__pyx_v_ss);
  __Pyx_XDECREF(__pyx_v_ms);
  __Pyx_XDECREF(__pyx_v_es);
  __Pyx_XDECREF(__pyx_v_return_type);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_partition);
  __Pyx_XDECREF(__pyx_v_target);
  __Pyx_XDECREF(__pyx_v_source);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":881
 *         return return_list
 * 
 *     cpdef CFAGroup getGroup(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the parent CFAGroup of the CFAVariable."""
 *         return self.group
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_7getGroup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getGroup", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getGroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_7getGroup)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 881, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup))))) __PYX_ERR(0, 881, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":883
 *     cpdef CFAGroup getGroup(CFAVariable self):
 *         """Return the parent CFAGroup of the CFAVariable."""
 *         return self.group             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring getName(CFAVariable self):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->group));
  __pyx_r = __pyx_v_self->group;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":881
 *         return return_list
 * 
 *     cpdef CFAGroup getGroup(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the parent CFAGroup of the CFAVariable."""
 *         return self.group
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFAVariable.getGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_7getGroup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_6getGroup[] = "Return the parent CFAGroup of the CFAVariable.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_7getGroup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getGroup (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_6getGroup(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_6getGroup(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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("getGroup", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getGroup(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.getGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":885
 *         return self.group
 * 
 *     cpdef basestring getName(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the name of the variable."""
 *         return self.var_name
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_9getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getName", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getName); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_9getName)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 885, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":887
 *     cpdef basestring getName(CFAVariable self):
 *         """Return the name of the variable."""
 *         return self.var_name             # <<<<<<<<<<<<<<
 * 
 *     cpdef np.dtype getType(CFAVariable self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->var_name);
  __pyx_r = __pyx_v_self->var_name;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":885
 *         return self.group
 * 
 *     cpdef basestring getName(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the name of the variable."""
 *         return self.var_name
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFAVariable.getName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_9getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8getName[] = "Return the name of the variable.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_9getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getName (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8getName(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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("getName", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getName(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.getName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":889
 *         return self.var_name
 * 
 *     cpdef np.dtype getType(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the type of the variable."""
 *         return self.nc_dtype
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_11getType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyArray_Descr *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch) {
  PyArray_Descr *__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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getType", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_11getType)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 889, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(0, 889, __pyx_L1_error)
        __pyx_r = ((PyArray_Descr *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":891
 *     cpdef np.dtype getType(CFAVariable self):
 *         """Return the type of the variable."""
 *         return self.nc_dtype             # <<<<<<<<<<<<<<
 * 
 *     cpdef dict getMetadata(CFAVariable self):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->nc_dtype));
  __pyx_r = __pyx_v_self->nc_dtype;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":889
 *         return self.var_name
 * 
 *     cpdef np.dtype getType(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the type of the variable."""
 *         return self.nc_dtype
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFAVariable.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_11getType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_10getType[] = "Return the type of the variable.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_11getType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getType (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_10getType(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_10getType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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("getType", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getType(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":893
 *         return self.nc_dtype
 * 
 *     cpdef dict getMetadata(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the variable's metadata."""
 *         return self.metadata
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_13getMetadata(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getMetadata", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMetadata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_13getMetadata)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 893, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 893, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":895
 *     cpdef dict getMetadata(CFAVariable self):
 *         """Return the variable's metadata."""
 *         return self.metadata             # <<<<<<<<<<<<<<
 * 
 *     cpdef list getDimensions(CFAVariable self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->metadata);
  __pyx_r = __pyx_v_self->metadata;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":893
 *         return self.nc_dtype
 * 
 *     cpdef dict getMetadata(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the variable's metadata."""
 *         return self.metadata
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFAVariable.getMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_13getMetadata(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_12getMetadata[] = "Return the variable's metadata.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_13getMetadata(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMetadata (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_12getMetadata(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_12getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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("getMetadata", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getMetadata(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.getMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":897
 *         return self.metadata
 * 
 *     cpdef list getDimensions(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the variable's dimensions."""
 *         return self.pmdimensions
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_15getDimensions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getDimensions(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getDimensions", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getDimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_15getDimensions)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 897, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":899
 *     cpdef list getDimensions(CFAVariable self):
 *         """Return the variable's dimensions."""
 *         return self.pmdimensions             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring getRole(CFAVariable self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->pmdimensions);
  __pyx_r = __pyx_v_self->pmdimensions;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":897
 *         return self.metadata
 * 
 *     cpdef list getDimensions(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the variable's dimensions."""
 *         return self.pmdimensions
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFAVariable.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_15getDimensions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_14getDimensions[] = "Return the variable's dimensions.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_15getDimensions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_14getDimensions(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_14getDimensions(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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("getDimensions", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getDimensions(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":901
 *         return self.pmdimensions
 * 
 *     cpdef basestring getRole(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the variables cfa role."""
 *         return self.cf_role
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_17getRole(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getRole(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getRole", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getRole); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_17getRole)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 901, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":903
 *     cpdef basestring getRole(CFAVariable self):
 *         """Return the variables cfa role."""
 *         return self.cf_role             # <<<<<<<<<<<<<<
 * 
 *     cpdef np.ndarray shape(CFAVariable self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->cf_role);
  __pyx_r = __pyx_v_self->cf_role;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":901
 *         return self.pmdimensions
 * 
 *     cpdef basestring getRole(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the variables cfa role."""
 *         return self.cf_role
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFAVariable.getRole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_17getRole(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_16getRole[] = "Return the variables cfa role.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_17getRole(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRole (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_16getRole(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_16getRole(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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("getRole", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getRole(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.getRole", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":905
 *         return self.cf_role
 * 
 *     cpdef np.ndarray shape(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Derive (from the dimensions) and return the shape of the variable."""
 *         # only do this if no cached version
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_19shape(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyArrayObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_shape(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_8genexpr8__pyx_v_d = NULL;
  PyArrayObject *__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;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("shape", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_19shape)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 905, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":908
 *         """Derive (from the dimensions) and return the shape of the variable."""
 *         # only do this if no cached version
 *         if self._shape.size == 0:             # <<<<<<<<<<<<<<
 *             self._shape = np.zeros(len(self.pmdimensions), np.int32)
 *             self._shape[:] = [self.getGroup().getDimension(d).getLen()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_shape), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 908, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":909
 *         # only do this if no cached version
 *         if self._shape.size == 0:
 *             self._shape = np.zeros(len(self.pmdimensions), np.int32)             # <<<<<<<<<<<<<<
 *             self._shape[:] = [self.getGroup().getDimension(d).getLen()
 *                               for d in self.getDimensions()]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __pyx_v_self->pmdimensions;
    __Pyx_INCREF(__pyx_t_1);
    if (unlikely(__pyx_t_1 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 909, __pyx_L1_error)
    }
    __pyx_t_6 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_1, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_1, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_7);
      __pyx_t_1 = 0;
      __pyx_t_7 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->_shape);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_shape));
    __pyx_v_self->_shape = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":910
 *         if self._shape.size == 0:
 *             self._shape = np.zeros(len(self.pmdimensions), np.int32)
 *             self._shape[:] = [self.getGroup().getDimension(d).getLen()             # <<<<<<<<<<<<<<
 *                               for d in self.getDimensions()]
 *         return self._shape
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "S3netCDF4/CFA/_CFAClasses.pyx":911
 *             self._shape = np.zeros(len(self.pmdimensions), np.int32)
 *             self._shape[:] = [self.getGroup().getDimension(d).getLen()
 *                               for d in self.getDimensions()]             # <<<<<<<<<<<<<<
 *         return self._shape
 * 
 */
      __pyx_t_3 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->getDimensions(__pyx_v_self, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 911, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(__pyx_t_3 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(0, 911, __pyx_L6_error)
      }
      __pyx_t_9 = __pyx_t_3; __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_9)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 911, __pyx_L6_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 911, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_d, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":910
 *         if self._shape.size == 0:
 *             self._shape = np.zeros(len(self.pmdimensions), np.int32)
 *             self._shape[:] = [self.getGroup().getDimension(d).getLen()             # <<<<<<<<<<<<<<
 *                               for d in self.getDimensions()]
 *         return self._shape
 */
        __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->getGroup(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 910, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_8genexpr8__pyx_v_d))||((__pyx_8genexpr8__pyx_v_d) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_8genexpr8__pyx_v_d)->tp_name), 0))) __PYX_ERR(0, 910, __pyx_L6_error)
        __pyx_t_7 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_3)->__pyx_vtab)->getDimension(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_3), ((PyObject*)__pyx_8genexpr8__pyx_v_d), 0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 910, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_t_7)->__pyx_vtab)->getLen(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_t_7), 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 910, __pyx_L6_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_ERR(0, 910, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":911
 *             self._shape = np.zeros(len(self.pmdimensions), np.int32)
 *             self._shape[:] = [self.getGroup().getDimension(d).getLen()
 *                               for d in self.getDimensions()]             # <<<<<<<<<<<<<<
 *         return self._shape
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_d); __pyx_8genexpr8__pyx_v_d = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_d); __pyx_8genexpr8__pyx_v_d = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */

    /* "S3netCDF4/CFA/_CFAClasses.pyx":910
 *         if self._shape.size == 0:
 *             self._shape = np.zeros(len(self.pmdimensions), np.int32)
 *             self._shape[:] = [self.getGroup().getDimension(d).getLen()             # <<<<<<<<<<<<<<
 *                               for d in self.getDimensions()]
 *         return self._shape
 */
    if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->_shape), __pyx_t_2, 0, 0, NULL, NULL, &__pyx_slice__19, 0, 0, 1) < 0) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":908
 *         """Derive (from the dimensions) and return the shape of the variable."""
 *         # only do this if no cached version
 *         if self._shape.size == 0:             # <<<<<<<<<<<<<<
 *             self._shape = np.zeros(len(self.pmdimensions), np.int32)
 *             self._shape[:] = [self.getGroup().getDimension(d).getLen()
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":912
 *             self._shape[:] = [self.getGroup().getDimension(d).getLen()
 *                               for d in self.getDimensions()]
 *         return self._shape             # <<<<<<<<<<<<<<
 * 
 *     cpdef object getBaseFilename(CFAVariable self):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_shape));
  __pyx_r = __pyx_v_self->_shape;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":905
 *         return self.cf_role
 * 
 *     cpdef np.ndarray shape(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Derive (from the dimensions) and return the shape of the variable."""
 *         # only do this if no cached version
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.shape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_d);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_19shape(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_18shape[] = "Derive (from the dimensions) and return the shape of the variable.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_19shape(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("shape (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_18shape(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_18shape(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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("shape", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_shape(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.shape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":914
 *         return self._shape
 * 
 *     cpdef object getBaseFilename(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Create the file name path that is common between all subarray files"""
 *         # create the base filename
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_21getBaseFilename(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getBaseFilename(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_file_path = NULL;
  PyObject *__pyx_v_sf = NULL;
  PyObject *__pyx_v_file_name = NULL;
  PyObject *__pyx_v_base_filename = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getBaseFilename", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getBaseFilename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_21getBaseFilename)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 914, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":917
 *         """Create the file name path that is common between all subarray files"""
 *         # create the base filename
 *         file_path = self.getGroup().getDataset().getName()             # <<<<<<<<<<<<<<
 *         # trim the ".nc" or ".nca" off the end
 *         if ".nca" in file_path: # note order is important as nca contains nc
 */
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->getGroup(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_1)->__pyx_vtab)->getDataset(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_t_2)->__pyx_vtab)->getName(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_t_2), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_file_path = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":919
 *         file_path = self.getGroup().getDataset().getName()
 *         # trim the ".nc" or ".nca" off the end
 *         if ".nca" in file_path: # note order is important as nca contains nc             # <<<<<<<<<<<<<<
 *             sf = ".nca"
 *         elif ".nc" in file_path:
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_nca, __pyx_v_file_path, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 919, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":920
 *         # trim the ".nc" or ".nca" off the end
 *         if ".nca" in file_path: # note order is important as nca contains nc
 *             sf = ".nca"             # <<<<<<<<<<<<<<
 *         elif ".nc" in file_path:
 *             sf = ".nc"
 */
    __Pyx_INCREF(__pyx_kp_u_nca);
    __pyx_v_sf = __pyx_kp_u_nca;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":919
 *         file_path = self.getGroup().getDataset().getName()
 *         # trim the ".nc" or ".nca" off the end
 *         if ".nca" in file_path: # note order is important as nca contains nc             # <<<<<<<<<<<<<<
 *             sf = ".nca"
 *         elif ".nc" in file_path:
 */
    goto __pyx_L3;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":921
 *         if ".nca" in file_path: # note order is important as nca contains nc
 *             sf = ".nca"
 *         elif ".nc" in file_path:             # <<<<<<<<<<<<<<
 *             sf = ".nc"
 *         else:
 */
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u_nc, __pyx_v_file_path, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 921, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":922
 *             sf = ".nca"
 *         elif ".nc" in file_path:
 *             sf = ".nc"             # <<<<<<<<<<<<<<
 *         else:
 *             sf = ""
 */
    __Pyx_INCREF(__pyx_kp_u_nc);
    __pyx_v_sf = __pyx_kp_u_nc;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":921
 *         if ".nca" in file_path: # note order is important as nca contains nc
 *             sf = ".nca"
 *         elif ".nc" in file_path:             # <<<<<<<<<<<<<<
 *             sf = ".nc"
 *         else:
 */
    goto __pyx_L3;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":924
 *             sf = ".nc"
 *         else:
 *             sf = ""             # <<<<<<<<<<<<<<
 *         file_path = file_path.replace(sf, "")
 *         # get just the filename, stripped of ".nc" or ".nca"
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_kp_u__13);
    __pyx_v_sf = __pyx_kp_u__13;
  }
  __pyx_L3:;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":925
 *         else:
 *             sf = ""
 *         file_path = file_path.replace(sf, "")             # <<<<<<<<<<<<<<
 *         # get just the filename, stripped of ".nc" or ".nca"
 *         file_name = os.path.basename(file_path).replace(sf, "")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_file_path, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_sf, __pyx_kp_u__13};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_sf, __pyx_kp_u__13};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_sf);
    __Pyx_GIVEREF(__pyx_v_sf);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_v_sf);
    __Pyx_INCREF(__pyx_kp_u__13);
    __Pyx_GIVEREF(__pyx_kp_u__13);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_kp_u__13);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_file_path, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":927
 *         file_path = file_path.replace(sf, "")
 *         # get just the filename, stripped of ".nc" or ".nca"
 *         file_name = os.path.basename(file_path).replace(sf, "")             # <<<<<<<<<<<<<<
 *         # construct the base path of the subarray filenames
 *         base_filename = file_path + "/" + file_name
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_basename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_file_path) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_file_path);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_sf, __pyx_kp_u__13};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 927, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_sf, __pyx_kp_u__13};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 927, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_sf);
    __Pyx_GIVEREF(__pyx_v_sf);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_v_sf);
    __Pyx_INCREF(__pyx_kp_u__13);
    __Pyx_GIVEREF(__pyx_kp_u__13);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_kp_u__13);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 927, __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_file_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":929
 *         file_name = os.path.basename(file_path).replace(sf, "")
 *         # construct the base path of the subarray filenames
 *         base_filename = file_path + "/" + file_name             # <<<<<<<<<<<<<<
 *         # add the group if it is not root
 *         if self.getGroup().getName() != 'root':
 */
  __pyx_t_1 = PyNumber_Add(__pyx_v_file_path, __pyx_kp_u__21); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_v_file_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_base_filename = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":931
 *         base_filename = file_path + "/" + file_name
 *         # add the group if it is not root
 *         if self.getGroup().getName() != 'root':             # <<<<<<<<<<<<<<
 *             base_filename += "." + self.getGroup().getName()
 *         # add the varname
 */
  __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->getGroup(__pyx_v_self, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_4)->__pyx_vtab)->getName(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_4), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_root, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":932
 *         # add the group if it is not root
 *         if self.getGroup().getName() != 'root':
 *             base_filename += "." + self.getGroup().getName()             # <<<<<<<<<<<<<<
 *         # add the varname
 *         base_filename += "." + self.var_name + "."
 */
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->getGroup(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_1)->__pyx_vtab)->getName(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_1), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_kp_u__22, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_base_filename, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_base_filename, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":931
 *         base_filename = file_path + "/" + file_name
 *         # add the group if it is not root
 *         if self.getGroup().getName() != 'root':             # <<<<<<<<<<<<<<
 *             base_filename += "." + self.getGroup().getName()
 *         # add the varname
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":934
 *             base_filename += "." + self.getGroup().getName()
 *         # add the varname
 *         base_filename += "." + self.var_name + "."             # <<<<<<<<<<<<<<
 * 
 *         return base_filename
 */
  __pyx_t_4 = PyNumber_Add(__pyx_kp_u__22, __pyx_v_self->var_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_kp_u__22); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_base_filename, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_base_filename, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":936
 *         base_filename += "." + self.var_name + "."
 * 
 *         return base_filename             # <<<<<<<<<<<<<<
 * 
 *     cpdef np.ndarray getPartitionMatrixShape(CFAVariable self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_base_filename);
  __pyx_r = __pyx_v_base_filename;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":914
 *         return self._shape
 * 
 *     cpdef object getBaseFilename(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Create the file name path that is common between all subarray files"""
 *         # create the base filename
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFAVariable.getBaseFilename", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_file_path);
  __Pyx_XDECREF(__pyx_v_sf);
  __Pyx_XDECREF(__pyx_v_file_name);
  __Pyx_XDECREF(__pyx_v_base_filename);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_21getBaseFilename(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_20getBaseFilename[] = "Create the file name path that is common between all subarray files";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_21getBaseFilename(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBaseFilename (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_20getBaseFilename(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_20getBaseFilename(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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("getBaseFilename", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getBaseFilename(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.getBaseFilename", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":938
 *         return base_filename
 * 
 *     cpdef np.ndarray getPartitionMatrixShape(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Get the partition matrix shape."""
 *         return self.pmshape
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_23getPartitionMatrixShape(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyArrayObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionMatrixShape(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch) {
  PyArrayObject *__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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getPartitionMatrixShape", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPartitionMatrixShape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_23getPartitionMatrixShape)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 938, __pyx_L1_error)
        __pyx_r = ((PyArrayObject *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":940
 *     cpdef np.ndarray getPartitionMatrixShape(CFAVariable self):
 *         """Get the partition matrix shape."""
 *         return self.pmshape             # <<<<<<<<<<<<<<
 * 
 *     cpdef getPartitionMatrixDimensions(CFAVariable self):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->pmshape));
  __pyx_r = __pyx_v_self->pmshape;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":938
 *         return base_filename
 * 
 *     cpdef np.ndarray getPartitionMatrixShape(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Get the partition matrix shape."""
 *         return self.pmshape
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFAVariable.getPartitionMatrixShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_23getPartitionMatrixShape(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_22getPartitionMatrixShape[] = "Get the partition matrix shape.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_23getPartitionMatrixShape(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPartitionMatrixShape (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_22getPartitionMatrixShape(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_22getPartitionMatrixShape(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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("getPartitionMatrixShape", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionMatrixShape(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.getPartitionMatrixShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":942
 *         return self.pmshape
 * 
 *     cpdef getPartitionMatrixDimensions(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Get the names of the dimensions in the partition matrix"""
 *         return self.pmdimensions
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_25getPartitionMatrixDimensions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionMatrixDimensions(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getPartitionMatrixDimensions", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPartitionMatrixDimensions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_25getPartitionMatrixDimensions)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":944
 *     cpdef getPartitionMatrixDimensions(CFAVariable self):
 *         """Get the names of the dimensions in the partition matrix"""
 *         return self.pmdimensions             # <<<<<<<<<<<<<<
 * 
 *     cpdef getPartitionValues(CFAVariable self, key="location"):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->pmdimensions);
  __pyx_r = __pyx_v_self->pmdimensions;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":942
 *         return self.pmshape
 * 
 *     cpdef getPartitionMatrixDimensions(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Get the names of the dimensions in the partition matrix"""
 *         return self.pmdimensions
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFAVariable.getPartitionMatrixDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_25getPartitionMatrixDimensions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_24getPartitionMatrixDimensions[] = "Get the names of the dimensions in the partition matrix";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_25getPartitionMatrixDimensions(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPartitionMatrixDimensions (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_24getPartitionMatrixDimensions(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_24getPartitionMatrixDimensions(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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("getPartitionMatrixDimensions", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionMatrixDimensions(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.getPartitionMatrixDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":946
 *         return self.pmdimensions
 * 
 *     cpdef getPartitionValues(CFAVariable self, key="location"):             # <<<<<<<<<<<<<<
 *         """Get the partition values for a particular element of the partition
 *         key = "location" | "index" | "ncvar" | "file" | "format" | "shape"
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_27getPartitionValues(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionValues(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionValues *__pyx_optional_args) {
  PyObject *__pyx_v_key = ((PyObject *)__pyx_n_u_location);
  PyObject *__pyx_v_ncp = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getPartitionValues", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_key = __pyx_optional_args->key;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPartitionValues); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_27getPartitionValues)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":950
 *         key = "location" | "index" | "ncvar" | "file" | "format" | "shape"
 *         """
 *         ncp = self.nc_partition_group             # <<<<<<<<<<<<<<
 *         return ncp.variables[key][:]
 * 
 */
  __pyx_t_1 = __pyx_v_self->nc_partition_group;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ncp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":951
 *         """
 *         ncp = self.nc_partition_group
 *         return ncp.variables[key][:]             # <<<<<<<<<<<<<<
 * 
 *     cdef object __calculateLocation(CFAVariable self, index):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, 0, NULL, NULL, &__pyx_slice__19, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __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;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":946
 *         return self.pmdimensions
 * 
 *     cpdef getPartitionValues(CFAVariable self, key="location"):             # <<<<<<<<<<<<<<
 *         """Get the partition values for a particular element of the partition
 *         key = "location" | "index" | "ncvar" | "file" | "format" | "shape"
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.getPartitionValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ncp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_27getPartitionValues(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_26getPartitionValues[] = "Get the partition values for a particular element of the partition\n        key = \"location\" | \"index\" | \"ncvar\" | \"file\" | \"format\" | \"shape\"\n        ";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_27getPartitionValues(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPartitionValues (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_n_u_location);
    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);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getPartitionValues") < 0)) __PYX_ERR(0, 946, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_key = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getPartitionValues", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 946, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.getPartitionValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_26getPartitionValues(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self), __pyx_v_key);

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_26getPartitionValues(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionValues __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getPartitionValues", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.key = __pyx_v_key;
  __pyx_t_1 = __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable->getPartitionValues(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.getPartitionValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":953
 *         return ncp.variables[key][:]
 * 
 *     cdef object __calculateLocation(CFAVariable self, index):             # <<<<<<<<<<<<<<
 *         """Calculate a location from an index, for when a location has not
 *         been defined yet."""
 */

static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___calculateLocation(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_subarray_shape = NULL;
  PyObject *__pyx_v_location = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__calculateLocation", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":957
 *         been defined yet."""
 *         # NOTE: this only works for equal partition sizes
 *         subarray_shape = self.shape() / self.pmshape             # <<<<<<<<<<<<<<
 *         location = np.empty((len(self.pmshape), 2), 'i')
 *         # calculate the start and end locations
 */
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->shape(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_1, ((PyObject *)__pyx_v_self->pmshape)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_subarray_shape = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":958
 *         # NOTE: this only works for equal partition sizes
 *         subarray_shape = self.shape() / self.pmshape
 *         location = np.empty((len(self.pmshape), 2), 'i')             # <<<<<<<<<<<<<<
 *         # calculate the start and end locations
 *         location[:,0] = (index[:] *
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((PyObject *)__pyx_v_self->pmshape);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_2);
  __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_5, __pyx_n_u_i};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_5, __pyx_n_u_i};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5);
    __Pyx_INCREF(__pyx_n_u_i);
    __Pyx_GIVEREF(__pyx_n_u_i);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_n_u_i);
    __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __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_v_location = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":960
 *         location = np.empty((len(self.pmshape), 2), 'i')
 *         # calculate the start and end locations
 *         location[:,0] = (index[:] *             # <<<<<<<<<<<<<<
 *                         subarray_shape).astype('i')
 *         location[:,1] = (index[:] *
 */
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_index, 0, 0, NULL, NULL, &__pyx_slice__19, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":961
 *         # calculate the start and end locations
 *         location[:,0] = (index[:] *
 *                         subarray_shape).astype('i')             # <<<<<<<<<<<<<<
 *         location[:,1] = (index[:] *
 *                         subarray_shape +
 */
  __pyx_t_7 = PyNumber_Multiply(__pyx_t_3, __pyx_v_subarray_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_astype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_n_u_i) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_i);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":960
 *         location = np.empty((len(self.pmshape), 2), 'i')
 *         # calculate the start and end locations
 *         location[:,0] = (index[:] *             # <<<<<<<<<<<<<<
 *                         subarray_shape).astype('i')
 *         location[:,1] = (index[:] *
 */
  if (unlikely(PyObject_SetItem(__pyx_v_location, __pyx_tuple__23, __pyx_t_2) < 0)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":962
 *         location[:,0] = (index[:] *
 *                         subarray_shape).astype('i')
 *         location[:,1] = (index[:] *             # <<<<<<<<<<<<<<
 *                         subarray_shape +
 *                         subarray_shape).astype('i')
 */
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_index, 0, 0, NULL, NULL, &__pyx_slice__19, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":963
 *                         subarray_shape).astype('i')
 *         location[:,1] = (index[:] *
 *                         subarray_shape +             # <<<<<<<<<<<<<<
 *                         subarray_shape).astype('i')
 *         return location
 */
  __pyx_t_7 = PyNumber_Multiply(__pyx_t_3, __pyx_v_subarray_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":964
 *         location[:,1] = (index[:] *
 *                         subarray_shape +
 *                         subarray_shape).astype('i')             # <<<<<<<<<<<<<<
 *         return location
 * 
 */
  __pyx_t_3 = PyNumber_Add(__pyx_t_7, __pyx_v_subarray_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_astype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_n_u_i) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_n_u_i);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":962
 *         location[:,0] = (index[:] *
 *                         subarray_shape).astype('i')
 *         location[:,1] = (index[:] *             # <<<<<<<<<<<<<<
 *                         subarray_shape +
 *                         subarray_shape).astype('i')
 */
  if (unlikely(PyObject_SetItem(__pyx_v_location, __pyx_tuple__24, __pyx_t_2) < 0)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":965
 *                         subarray_shape +
 *                         subarray_shape).astype('i')
 *         return location             # <<<<<<<<<<<<<<
 * 
 *     cdef object __definePartition(CFAVariable self, index):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_location);
  __pyx_r = __pyx_v_location;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":953
 *         return ncp.variables[key][:]
 * 
 *     cdef object __calculateLocation(CFAVariable self, index):             # <<<<<<<<<<<<<<
 *         """Calculate a location from an index, for when a location has not
 *         been defined yet."""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.__calculateLocation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_subarray_shape);
  __Pyx_XDECREF(__pyx_v_location);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":967
 *         return location
 * 
 *     cdef object __definePartition(CFAVariable self, index):             # <<<<<<<<<<<<<<
 *         """Define the partition as it doesn't exist yet."""
 *         # calculate the location as it doesn't exist yet
 */

static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___definePartition(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_location = NULL;
  PyObject *__pyx_v_actual_subarray_shape = NULL;
  PyObject *__pyx_v_partition_filename = NULL;
  PyObject *__pyx_v_filename = NULL;
  PyObject *__pyx_v_part = NULL;
  PyObject *__pyx_8genexpr9__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__definePartition", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":970
 *         """Define the partition as it doesn't exist yet."""
 *         # calculate the location as it doesn't exist yet
 *         location = self.__calculateLocation(index)             # <<<<<<<<<<<<<<
 *         # get the integer subarray shape for this actual partition
 *         actual_subarray_shape = (location[:,1] - location[:,0])
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->__pyx___calculateLocation(__pyx_v_self, __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_location = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":972
 *         location = self.__calculateLocation(index)
 *         # get the integer subarray shape for this actual partition
 *         actual_subarray_shape = (location[:,1] - location[:,0])             # <<<<<<<<<<<<<<
 * 
 *         # create the name of the subarray file with the numbering system
 */
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_location, __pyx_tuple__24); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_location, __pyx_tuple__23); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_actual_subarray_shape = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":977
 *         # have to check if self.base_filename is None for an undefinied
 *         # partition
 *         partition_filename = self.nc_partition_group.variables["file"][index]             # <<<<<<<<<<<<<<
 *         if partition_filename == "":
 *             filename = (self.getBaseFilename() +
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->nc_partition_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_partition_filename = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":978
 *         # partition
 *         partition_filename = self.nc_partition_group.variables["file"][index]
 *         if partition_filename == "":             # <<<<<<<<<<<<<<
 *             filename = (self.getBaseFilename() +
 *                             ".".join([str(i) for i in index]) +
 */
  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_partition_filename, __pyx_kp_u__13, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 978, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":979
 *         partition_filename = self.nc_partition_group.variables["file"][index]
 *         if partition_filename == "":
 *             filename = (self.getBaseFilename() +             # <<<<<<<<<<<<<<
 *                             ".".join([str(i) for i in index]) +
 *                             ".nc"
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->getBaseFilename(__pyx_v_self, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":980
 *         if partition_filename == "":
 *             filename = (self.getBaseFilename() +
 *                             ".".join([str(i) for i in index]) +             # <<<<<<<<<<<<<<
 *                             ".nc"
 *                            )
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 980, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
        __pyx_t_1 = __pyx_v_index; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
        __pyx_t_6 = NULL;
      } else {
        __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 980, __pyx_L6_error)
      }
      for (;;) {
        if (likely(!__pyx_t_6)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 980, __pyx_L6_error)
            #else
            __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 980, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          } else {
            if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 980, __pyx_L6_error)
            #else
            __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 980, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          }
        } else {
          __pyx_t_7 = __pyx_t_6(__pyx_t_1);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 980, __pyx_L6_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_i, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_8genexpr9__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 980, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 980, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_i); __pyx_8genexpr9__pyx_v_i = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_i); __pyx_8genexpr9__pyx_v_i = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__22, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":979
 *         partition_filename = self.nc_partition_group.variables["file"][index]
 *         if partition_filename == "":
 *             filename = (self.getBaseFilename() +             # <<<<<<<<<<<<<<
 *                             ".".join([str(i) for i in index]) +
 *                             ".nc"
 */
    __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":980
 *         if partition_filename == "":
 *             filename = (self.getBaseFilename() +
 *                             ".".join([str(i) for i in index]) +             # <<<<<<<<<<<<<<
 *                             ".nc"
 *                            )
 */
    __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_kp_u_nc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_filename = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":978
 *         # partition
 *         partition_filename = self.nc_partition_group.variables["file"][index]
 *         if partition_filename == "":             # <<<<<<<<<<<<<<
 *             filename = (self.getBaseFilename() +
 *                             ".".join([str(i) for i in index]) +
 */
    goto __pyx_L3;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":984
 *                            )
 *         else:
 *             filename = partition_filename             # <<<<<<<<<<<<<<
 * 
 *         part = CFAPartition(
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_partition_filename);
    __pyx_v_filename = __pyx_v_partition_filename;
  }
  __pyx_L3:;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":986
 *             filename = partition_filename
 * 
 *         part = CFAPartition(             # <<<<<<<<<<<<<<
 *             index = index,
 *             location = location,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CFAPartition); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":987
 * 
 *         part = CFAPartition(
 *             index = index,             # <<<<<<<<<<<<<<
 *             location = location,
 *             ncvar = self.var_name,
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_index, __pyx_v_index) < 0) __PYX_ERR(0, 987, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":988
 *         part = CFAPartition(
 *             index = index,
 *             location = location,             # <<<<<<<<<<<<<<
 *             ncvar = self.var_name,
 *             file = filename,
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_location, __pyx_v_location) < 0) __PYX_ERR(0, 987, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":989
 *             index = index,
 *             location = location,
 *             ncvar = self.var_name,             # <<<<<<<<<<<<<<
 *             file = filename,
 *             format = self.getGroup().getDataset().getFormat(),
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ncvar, __pyx_v_self->var_name) < 0) __PYX_ERR(0, 987, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":990
 *             location = location,
 *             ncvar = self.var_name,
 *             file = filename,             # <<<<<<<<<<<<<<
 *             format = self.getGroup().getDataset().getFormat(),
 *             shape = actual_subarray_shape
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_file, __pyx_v_filename) < 0) __PYX_ERR(0, 987, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":991
 *             ncvar = self.var_name,
 *             file = filename,
 *             format = self.getGroup().getDataset().getFormat(),             # <<<<<<<<<<<<<<
 *             shape = actual_subarray_shape
 *         )
 */
  __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->getGroup(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_3)->__pyx_vtab)->getDataset(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_3), 0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_t_7)->__pyx_vtab)->getFormat(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_t_7), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":992
 *             file = filename,
 *             format = self.getGroup().getDataset().getFormat(),
 *             shape = actual_subarray_shape             # <<<<<<<<<<<<<<
 *         )
 *         self.writePartition(part)
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_v_actual_subarray_shape) < 0) __PYX_ERR(0, 987, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":986
 *             filename = partition_filename
 * 
 *         part = CFAPartition(             # <<<<<<<<<<<<<<
 *             index = index,
 *             location = location,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_part = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":994
 *             shape = actual_subarray_shape
 *         )
 *         self.writePartition(part)             # <<<<<<<<<<<<<<
 *         return part
 * 
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->writePartition(__pyx_v_self, __pyx_v_part, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":995
 *         )
 *         self.writePartition(part)
 *         return part             # <<<<<<<<<<<<<<
 * 
 *     cpdef object getPartition(CFAVariable self, index):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_part);
  __pyx_r = __pyx_v_part;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":967
 *         return location
 * 
 *     cdef object __definePartition(CFAVariable self, index):             # <<<<<<<<<<<<<<
 *         """Define the partition as it doesn't exist yet."""
 *         # calculate the location as it doesn't exist yet
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.__definePartition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_location);
  __Pyx_XDECREF(__pyx_v_actual_subarray_shape);
  __Pyx_XDECREF(__pyx_v_partition_filename);
  __Pyx_XDECREF(__pyx_v_filename);
  __Pyx_XDECREF(__pyx_v_part);
  __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":997
 *         return part
 * 
 *     cpdef object getPartition(CFAVariable self, index):             # <<<<<<<<<<<<<<
 *         """Get the partition at the index.  This is now autogenerated to reduce
 *         memory overhead and remove the need for parsing."""
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_29getPartition(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartition(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_index, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_ncp = NULL;
  PyObject *__pyx_v_location = NULL;
  PyObject *__pyx_v_part = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_ie = 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 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  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;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getPartition", 0);
  __Pyx_INCREF(__pyx_v_index);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPartition); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_29getPartition)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_index) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_index);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1001
 *         memory overhead and remove the need for parsing."""
 *         # get the list index from the partition look up table
 *         try:             # <<<<<<<<<<<<<<
 *             # autogen partition info - no need to call the writePartition method
 *             # until the file is going to be written as the partition is stored
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1006
 *             # in memory
 *             # check first whether partition has been generated
 *             index = tuple(index) # use a copy             # <<<<<<<<<<<<<<
 *             ncp = self.nc_partition_group
 *             location = ncp.variables["location"][index]
 */
      __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1007
 *             # check first whether partition has been generated
 *             index = tuple(index) # use a copy
 *             ncp = self.nc_partition_group             # <<<<<<<<<<<<<<
 *             location = ncp.variables["location"][index]
 *             # no location defined
 */
      __pyx_t_1 = __pyx_v_self->nc_partition_group;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_ncp = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1008
 *             index = tuple(index) # use a copy
 *             ncp = self.nc_partition_group
 *             location = ncp.variables["location"][index]             # <<<<<<<<<<<<<<
 *             # no location defined
 *             if np.ma.is_masked(location):
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_location = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1010
 *             location = ncp.variables["location"][index]
 *             # no location defined
 *             if np.ma.is_masked(location):             # <<<<<<<<<<<<<<
 *                 part = self.__definePartition(index)
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1010, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ma); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1010, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_is_masked); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1010, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_location) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_location);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1010, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_8) {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1011
 *             # no location defined
 *             if np.ma.is_masked(location):
 *                 part = self.__definePartition(index)             # <<<<<<<<<<<<<<
 *             else:
 *                 part = CFAPartition(
 */
        __pyx_t_1 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->__pyx___definePartition(__pyx_v_self, __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_part = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1010
 *             location = ncp.variables["location"][index]
 *             # no location defined
 *             if np.ma.is_masked(location):             # <<<<<<<<<<<<<<
 *                 part = self.__definePartition(index)
 *             else:
 */
        goto __pyx_L9;
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1013
 *                 part = self.__definePartition(index)
 *             else:
 *                 part = CFAPartition(             # <<<<<<<<<<<<<<
 *                     index = ncp.variables["index"][index],
 *                     location = ncp.variables["location"][index],
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CFAPartition); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1014
 *             else:
 *                 part = CFAPartition(
 *                     index = ncp.variables["index"][index],             # <<<<<<<<<<<<<<
 *                     location = ncp.variables["location"][index],
 *                     ncvar = ncp.variables["ncvar"][index],
 */
        __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1014, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_index, __pyx_t_3) < 0) __PYX_ERR(0, 1014, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1015
 *                 part = CFAPartition(
 *                     index = ncp.variables["index"][index],
 *                     location = ncp.variables["location"][index],             # <<<<<<<<<<<<<<
 *                     ncvar = ncp.variables["ncvar"][index],
 *                     file = ncp.variables["file"][index],
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1015, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_location); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1015, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1015, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_location, __pyx_t_3) < 0) __PYX_ERR(0, 1014, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1016
 *                     index = ncp.variables["index"][index],
 *                     location = ncp.variables["location"][index],
 *                     ncvar = ncp.variables["ncvar"][index],             # <<<<<<<<<<<<<<
 *                     file = ncp.variables["file"][index],
 *                     format = ncp.variables["format"][index],
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1016, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_ncvar); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1016, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1016, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ncvar, __pyx_t_3) < 0) __PYX_ERR(0, 1014, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1017
 *                     location = ncp.variables["location"][index],
 *                     ncvar = ncp.variables["ncvar"][index],
 *                     file = ncp.variables["file"][index],             # <<<<<<<<<<<<<<
 *                     format = ncp.variables["format"][index],
 *                     shape = ncp.variables["shape"][index]
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_file, __pyx_t_3) < 0) __PYX_ERR(0, 1014, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1018
 *                     ncvar = ncp.variables["ncvar"][index],
 *                     file = ncp.variables["file"][index],
 *                     format = ncp.variables["format"][index],             # <<<<<<<<<<<<<<
 *                     shape = ncp.variables["shape"][index]
 *                 )
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1018, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1018, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1018, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(0, 1014, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1019
 *                     file = ncp.variables["file"][index],
 *                     format = ncp.variables["format"][index],
 *                     shape = ncp.variables["shape"][index]             # <<<<<<<<<<<<<<
 *                 )
 * 
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1019, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_shape, __pyx_t_3) < 0) __PYX_ERR(0, 1014, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1013
 *                 part = self.__definePartition(index)
 *             else:
 *                 part = CFAPartition(             # <<<<<<<<<<<<<<
 *                     index = ncp.variables["index"][index],
 *                     location = ncp.variables["location"][index],
 */
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_v_part = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_L9:;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1001
 *         memory overhead and remove the need for parsing."""
 *         # get the list index from the partition look up table
 *         try:             # <<<<<<<<<<<<<<
 *             # autogen partition info - no need to call the writePartition method
 *             # until the file is going to be written as the partition is stored
 */
    }
    __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_L8_try_end;
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1022
 *                 )
 * 
 *         except IndexError as ie:             # <<<<<<<<<<<<<<
 *             raise CFAPartitionIndexError(
 *                 "No partition with index: {} exists for the variable: {}".format(
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
    if (__pyx_t_9) {
      __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.getPartition", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1022, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_ie = __pyx_t_2;
      /*try:*/ {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1023
 * 
 *         except IndexError as ie:
 *             raise CFAPartitionIndexError(             # <<<<<<<<<<<<<<
 *                 "No partition with index: {} exists for the variable: {}".format(
 *                     index, self.var_name
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_CFAPartitionIndexError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1023, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_10);

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1024
 *         except IndexError as ie:
 *             raise CFAPartitionIndexError(
 *                 "No partition with index: {} exists for the variable: {}".format(             # <<<<<<<<<<<<<<
 *                     index, self.var_name
 *                 )
 */
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_No_partition_with_index_exists_f, __pyx_n_s_format); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1024, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_12);

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1025
 *             raise CFAPartitionIndexError(
 *                 "No partition with index: {} exists for the variable: {}".format(
 *                     index, self.var_name             # <<<<<<<<<<<<<<
 *                 )
 *             )
 */
        __pyx_t_13 = NULL;
        __pyx_t_9 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
            __pyx_t_9 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_12)) {
          PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_v_index, __pyx_v_self->var_name};
          __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1024, __pyx_L15_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_11);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
          PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_v_index, __pyx_v_self->var_name};
          __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1024, __pyx_L15_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_11);
        } else
        #endif
        {
          __pyx_t_14 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1024, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_14);
          if (__pyx_t_13) {
            __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
          }
          __Pyx_INCREF(__pyx_v_index);
          __Pyx_GIVEREF(__pyx_v_index);
          PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_9, __pyx_v_index);
          __Pyx_INCREF(__pyx_v_self->var_name);
          __Pyx_GIVEREF(__pyx_v_self->var_name);
          PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_9, __pyx_v_self->var_name);
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1024, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        __pyx_t_4 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_12, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 1023, __pyx_L15_error)
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1022
 *                 )
 * 
 *         except IndexError as ie:             # <<<<<<<<<<<<<<
 *             raise CFAPartitionIndexError(
 *                 "No partition with index: {} exists for the variable: {}".format(
 */
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 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;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __pyx_t_9 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_ie);
            __pyx_v_ie = NULL;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __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_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
          __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
          __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1001
 *         memory overhead and remove the need for parsing."""
 *         # get the list index from the partition look up table
 *         try:             # <<<<<<<<<<<<<<
 *             # autogen partition info - no need to call the writePartition method
 *             # until the file is going to be written as the partition is stored
 */
    __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_L8_try_end:;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1028
 *                 )
 *             )
 *         return part             # <<<<<<<<<<<<<<
 * 
 *     cpdef writePartition(CFAVariable self, object partition):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_part);
  __pyx_r = __pyx_v_part;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":997
 *         return part
 * 
 *     cpdef object getPartition(CFAVariable self, index):             # <<<<<<<<<<<<<<
 *         """Get the partition at the index.  This is now autogenerated to reduce
 *         memory overhead and remove the need for parsing."""
 */

  /* 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_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.getPartition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ncp);
  __Pyx_XDECREF(__pyx_v_location);
  __Pyx_XDECREF(__pyx_v_part);
  __Pyx_XDECREF(__pyx_v_ie);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_29getPartition(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_28getPartition[] = "Get the partition at the index.  This is now autogenerated to reduce\n        memory overhead and remove the need for parsing.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_29getPartition(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPartition (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_28getPartition(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self), ((PyObject *)__pyx_v_index));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_28getPartition(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_index) {
  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("getPartition", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartition(__pyx_v_self, __pyx_v_index, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.getPartition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1030
 *         return part
 * 
 *     cpdef writePartition(CFAVariable self, object partition):             # <<<<<<<<<<<<<<
 *         """write the partition to the nc_partition group."""
 *         # shortcut to the partition group
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_31writePartition(PyObject *__pyx_v_self, PyObject *__pyx_v_partition); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writePartition(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_partition, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_ncp = NULL;
  PyObject *__pyx_v_index = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("writePartition", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_writePartition); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_31writePartition)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_partition) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_partition);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1030, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1033
 *         """write the partition to the nc_partition group."""
 *         # shortcut to the partition group
 *         ncp = self.nc_partition_group             # <<<<<<<<<<<<<<
 *         # write the partition info into the netCDF group representation of
 *         # a partition
 */
  __pyx_t_1 = __pyx_v_self->nc_partition_group;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ncp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1036
 *         # write the partition info into the netCDF group representation of
 *         # a partition
 *         index = tuple(partition.index)             # <<<<<<<<<<<<<<
 *         ncp.variables["index"][index] = partition.index
 *         ncp.variables["location"][index] =  partition.location
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_partition, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_index = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1037
 *         # a partition
 *         index = tuple(partition.index)
 *         ncp.variables["index"][index] = partition.index             # <<<<<<<<<<<<<<
 *         ncp.variables["location"][index] =  partition.location
 *         ncp.variables["ncvar"][index] =  partition.ncvar
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_partition, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_v_index, __pyx_t_2) < 0)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1038
 *         index = tuple(partition.index)
 *         ncp.variables["index"][index] = partition.index
 *         ncp.variables["location"][index] =  partition.location             # <<<<<<<<<<<<<<
 *         ncp.variables["ncvar"][index] =  partition.ncvar
 *         ncp.variables["file"][index] = partition.file
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_partition, __pyx_n_s_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_location); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_index, __pyx_t_2) < 0)) __PYX_ERR(0, 1038, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1039
 *         ncp.variables["index"][index] = partition.index
 *         ncp.variables["location"][index] =  partition.location
 *         ncp.variables["ncvar"][index] =  partition.ncvar             # <<<<<<<<<<<<<<
 *         ncp.variables["file"][index] = partition.file
 *         ncp.variables["format"][index] = partition.format
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_partition, __pyx_n_s_ncvar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_ncvar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_v_index, __pyx_t_2) < 0)) __PYX_ERR(0, 1039, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1040
 *         ncp.variables["location"][index] =  partition.location
 *         ncp.variables["ncvar"][index] =  partition.ncvar
 *         ncp.variables["file"][index] = partition.file             # <<<<<<<<<<<<<<
 *         ncp.variables["format"][index] = partition.format
 *         ncp.variables["shape"][index] = partition.shape
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_partition, __pyx_n_s_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_index, __pyx_t_2) < 0)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1041
 *         ncp.variables["ncvar"][index] =  partition.ncvar
 *         ncp.variables["file"][index] = partition.file
 *         ncp.variables["format"][index] = partition.format             # <<<<<<<<<<<<<<
 *         ncp.variables["shape"][index] = partition.shape
 *         # update the partition matrix shape - without the ndimensions part of
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_partition, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_v_index, __pyx_t_2) < 0)) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1042
 *         ncp.variables["file"][index] = partition.file
 *         ncp.variables["format"][index] = partition.format
 *         ncp.variables["shape"][index] = partition.shape             # <<<<<<<<<<<<<<
 *         # update the partition matrix shape - without the ndimensions part of
 *         # the variable shape
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_partition, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_index, __pyx_t_2) < 0)) __PYX_ERR(0, 1042, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1045
 *         # update the partition matrix shape - without the ndimensions part of
 *         # the variable shape
 *         self.pmshape = np.array(ncp.variables["index"].shape[:-1])             # <<<<<<<<<<<<<<
 *         # update the pmshape variable
 *         ncp.variables["pmshape"][:] = self.pmshape
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __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_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __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, 0, -1L, NULL, NULL, &__pyx_slice__4, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->pmshape);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->pmshape));
  __pyx_v_self->pmshape = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1047
 *         self.pmshape = np.array(ncp.variables["index"].shape[:-1])
 *         # update the pmshape variable
 *         ncp.variables["pmshape"][:] = self.pmshape             # <<<<<<<<<<<<<<
 * 
 *     cpdef writeInitialPartitionInfo(CFAVariable self, basestring cfa_version,
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->pmshape);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_pmshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetSlice(__pyx_t_4, __pyx_t_2, 0, 0, NULL, NULL, &__pyx_slice__19, 0, 0, 1) < 0) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1030
 *         return part
 * 
 *     cpdef writePartition(CFAVariable self, object partition):             # <<<<<<<<<<<<<<
 *         """write the partition to the nc_partition group."""
 *         # shortcut to the partition group
 */

  /* 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_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.writePartition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ncp);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_31writePartition(PyObject *__pyx_v_self, PyObject *__pyx_v_partition); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_30writePartition[] = "write the partition to the nc_partition group.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_31writePartition(PyObject *__pyx_v_self, PyObject *__pyx_v_partition) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("writePartition (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_30writePartition(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self), ((PyObject *)__pyx_v_partition));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_30writePartition(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_partition) {
  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("writePartition", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writePartition(__pyx_v_self, __pyx_v_partition, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.writePartition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1049
 *         ncp.variables["pmshape"][:] = self.pmshape
 * 
 *     cpdef writeInitialPartitionInfo(CFAVariable self, basestring cfa_version,             # <<<<<<<<<<<<<<
 *                                     object nc_parent=None):
 *         """Set the partitions - this is a reference to a group contained in the
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_33writeInitialPartitionInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writeInitialPartitionInfo(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_cfa_version, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writeInitialPartitionInfo *__pyx_optional_args) {

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1050
 * 
 *     cpdef writeInitialPartitionInfo(CFAVariable self, basestring cfa_version,
 *                                     object nc_parent=None):             # <<<<<<<<<<<<<<
 *         """Set the partitions - this is a reference to a group contained in the
 *         netCDF master file (for CFA-0.5) or a dataset contained within memory
 */
  PyObject *__pyx_v_nc_parent = ((PyObject *)Py_None);
  PyObject *__pyx_v_ncp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___createNCPartition __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("writeInitialPartitionInfo", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nc_parent = __pyx_optional_args->nc_parent;
    }
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1049
 *         ncp.variables["pmshape"][:] = self.pmshape
 * 
 *     cpdef writeInitialPartitionInfo(CFAVariable self, basestring cfa_version,             # <<<<<<<<<<<<<<
 *                                     object nc_parent=None):
 *         """Set the partitions - this is a reference to a group contained in the
 */
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_writeInitialPartitionInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_33writeInitialPartitionInfo)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_cfa_version, __pyx_v_nc_parent};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_cfa_version, __pyx_v_nc_parent};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1049, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_cfa_version);
          __Pyx_GIVEREF(__pyx_v_cfa_version);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_cfa_version);
          __Pyx_INCREF(__pyx_v_nc_parent);
          __Pyx_GIVEREF(__pyx_v_nc_parent);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_nc_parent);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1055
 *         (for CFA-0.4)"""
 *         # create the partition definition either in the file or in memory
 *         self.__createNCPartition(cfa_version, nc_parent)             # <<<<<<<<<<<<<<
 * 
 *         # shortcut to the partition group
 */
  __pyx_t_7.__pyx_n = 2;
  __pyx_t_7.cfa_version = __pyx_v_cfa_version;
  __pyx_t_7.nc_parent = __pyx_v_nc_parent;
  __pyx_t_1 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->__pyx___createNCPartition(__pyx_v_self, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1058
 * 
 *         # shortcut to the partition group
 *         ncp = self.nc_partition_group             # <<<<<<<<<<<<<<
 * 
 *         # set the pmshape
 */
  __pyx_t_1 = __pyx_v_self->nc_partition_group;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ncp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1061
 * 
 *         # set the pmshape
 *         ncp.variables["pmshape"][:] = self.pmshape             # <<<<<<<<<<<<<<
 *         # set the pmdimensions
 *         ncp.variables["pmdimensions"][0] = ", ".join(self.pmdimensions)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->pmshape);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_pmshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetSlice(__pyx_t_3, __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__19, 0, 0, 1) < 0) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1063
 *         ncp.variables["pmshape"][:] = self.pmshape
 *         # set the pmdimensions
 *         ncp.variables["pmdimensions"][0] = ", ".join(self.pmdimensions)             # <<<<<<<<<<<<<<
 * 
 *         # partitions are dynamically created now, so no need to call
 */
  __pyx_t_1 = __pyx_v_self->pmdimensions;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__25, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_pmdimensions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__Pyx_SetItemInt(__pyx_t_2, 0, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1049
 *         ncp.variables["pmshape"][:] = self.pmshape
 * 
 *     cpdef writeInitialPartitionInfo(CFAVariable self, basestring cfa_version,             # <<<<<<<<<<<<<<
 *                                     object nc_parent=None):
 *         """Set the partitions - this is a reference to a group contained in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.writeInitialPartitionInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ncp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_33writeInitialPartitionInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_32writeInitialPartitionInfo[] = "Set the partitions - this is a reference to a group contained in the\n        netCDF master file (for CFA-0.5) or a dataset contained within memory\n        (for CFA-0.4)";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_33writeInitialPartitionInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cfa_version = 0;
  PyObject *__pyx_v_nc_parent = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("writeInitialPartitionInfo (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cfa_version,&__pyx_n_s_nc_parent,0};
    PyObject* values[2] = {0,0};

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1050
 * 
 *     cpdef writeInitialPartitionInfo(CFAVariable self, basestring cfa_version,
 *                                     object nc_parent=None):             # <<<<<<<<<<<<<<
 *         """Set the partitions - this is a reference to a group contained in the
 *         netCDF master file (for CFA-0.5) or a dataset contained within memory
 */
    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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfa_version)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nc_parent);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeInitialPartitionInfo") < 0)) __PYX_ERR(0, 1049, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cfa_version = ((PyObject*)values[0]);
    __pyx_v_nc_parent = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("writeInitialPartitionInfo", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1049, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.writeInitialPartitionInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfa_version), (&PyBaseString_Type), 1, "cfa_version", 1))) __PYX_ERR(0, 1049, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_32writeInitialPartitionInfo(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self), __pyx_v_cfa_version, __pyx_v_nc_parent);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1049
 *         ncp.variables["pmshape"][:] = self.pmshape
 * 
 *     cpdef writeInitialPartitionInfo(CFAVariable self, basestring cfa_version,             # <<<<<<<<<<<<<<
 *                                     object nc_parent=None):
 *         """Set the partitions - this is a reference to a group contained in the
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_32writeInitialPartitionInfo(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_cfa_version, PyObject *__pyx_v_nc_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writeInitialPartitionInfo __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("writeInitialPartitionInfo", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nc_parent = __pyx_v_nc_parent;
  __pyx_t_1 = __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable->writeInitialPartitionInfo(__pyx_v_self, __pyx_v_cfa_version, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.writeInitialPartitionInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1068
 *         # writePartition repeatedly
 * 
 *     cdef __createNCPartition(CFAVariable self, basestring cfa_version="0.5",             # <<<<<<<<<<<<<<
 *                               object nc_parent=None):
 *         """Create the datastructure in a netCDF file for the netCDF partition
 */

static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___createNCPartition(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___createNCPartition *__pyx_optional_args) {
  PyObject *__pyx_v_cfa_version = ((PyObject*)__pyx_kp_u_0_5);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1069
 * 
 *     cdef __createNCPartition(CFAVariable self, basestring cfa_version="0.5",
 *                               object nc_parent=None):             # <<<<<<<<<<<<<<
 *         """Create the datastructure in a netCDF file for the netCDF partition
 *         used internally and in CFA-0.5 files."""
 */
  PyObject *__pyx_v_nc_parent = ((PyObject *)Py_None);
  PyObject *__pyx_v_cfa_metagroup_name = NULL;
  PyObject *__pyx_v_ncp = NULL;
  PyObject *__pyx_v_pm_dimensions = NULL;
  PyArrayObject *__pyx_v_pm_shape = NULL;
  Py_ssize_t __pyx_v_d;
  Py_ssize_t __pyx_v_n_pm_dims;
  CYTHON_UNUSED PyObject *__pyx_v_pm_shape_var = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_pm_dimensions_var = NULL;
  PyObject *__pyx_v_index_dim_names = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_index_var = NULL;
  PyObject *__pyx_v_location_dim_names = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_location_var = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_ncvar_var = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_file_var = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_format_var = NULL;
  PyObject *__pyx_v_shape_dim_names = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_shape_var = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__createNCPartition", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cfa_version = __pyx_optional_args->cfa_version;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_nc_parent = __pyx_optional_args->nc_parent;
      }
    }
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1073
 *         used internally and in CFA-0.5 files."""
 *         # get the dimension definitions from the CFAVar
 *         if cfa_version == "0.4" or nc_parent==None:             # <<<<<<<<<<<<<<
 *             # create Dataset in memory
 *             self.nc_partition_group = netCDF4.Dataset(
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_cfa_version, __pyx_kp_u_0_4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_nc_parent, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1075
 *         if cfa_version == "0.4" or nc_parent==None:
 *             # create Dataset in memory
 *             self.nc_partition_group = netCDF4.Dataset(             # <<<<<<<<<<<<<<
 *                 "inmemory.nc", mode="w", diskless=True, persist=False,
 *                 memory=0
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_netCDF4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1075, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Dataset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1075, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1076
 *             # create Dataset in memory
 *             self.nc_partition_group = netCDF4.Dataset(
 *                 "inmemory.nc", mode="w", diskless=True, persist=False,             # <<<<<<<<<<<<<<
 *                 memory=0
 *             )
 */
    __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1076, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_mode, __pyx_n_u_w) < 0) __PYX_ERR(0, 1076, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_diskless, Py_True) < 0) __PYX_ERR(0, 1076, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_persist, Py_False) < 0) __PYX_ERR(0, 1076, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_memory, __pyx_int_0) < 0) __PYX_ERR(0, 1076, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1075
 *         if cfa_version == "0.4" or nc_parent==None:
 *             # create Dataset in memory
 *             self.nc_partition_group = netCDF4.Dataset(             # <<<<<<<<<<<<<<
 *                 "inmemory.nc", mode="w", diskless=True, persist=False,
 *                 memory=0
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__26, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1075, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_self->nc_partition_group);
    __Pyx_DECREF(__pyx_v_self->nc_partition_group);
    __pyx_v_self->nc_partition_group = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1073
 *         used internally and in CFA-0.5 files."""
 *         # get the dimension definitions from the CFAVar
 *         if cfa_version == "0.4" or nc_parent==None:             # <<<<<<<<<<<<<<
 *             # create Dataset in memory
 *             self.nc_partition_group = netCDF4.Dataset(
 */
    goto __pyx_L3;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1079
 *                 memory=0
 *             )
 *         elif cfa_version == "0.5":             # <<<<<<<<<<<<<<
 *             # create group in file
 *             cfa_metagroup_name = "cfa_" + self.var_name
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_cfa_version, __pyx_kp_u_0_5, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_3)) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1081
 *         elif cfa_version == "0.5":
 *             # create group in file
 *             cfa_metagroup_name = "cfa_" + self.var_name             # <<<<<<<<<<<<<<
 *             self.nc_partition_group = nc_parent.createGroup(cfa_metagroup_name)
 *         else:
 */
    __pyx_t_6 = PyNumber_Add(__pyx_n_u_cfa, __pyx_v_self->var_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1081, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_cfa_metagroup_name = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1082
 *             # create group in file
 *             cfa_metagroup_name = "cfa_" + self.var_name
 *             self.nc_partition_group = nc_parent.createGroup(cfa_metagroup_name)             # <<<<<<<<<<<<<<
 *         else:
 *             raise CFAError("Unsupported CFA version {}.".format(cfa_version))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nc_parent, __pyx_n_s_createGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_cfa_metagroup_name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_cfa_metagroup_name);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_self->nc_partition_group);
    __Pyx_DECREF(__pyx_v_self->nc_partition_group);
    __pyx_v_self->nc_partition_group = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1079
 *                 memory=0
 *             )
 *         elif cfa_version == "0.5":             # <<<<<<<<<<<<<<
 *             # create group in file
 *             cfa_metagroup_name = "cfa_" + self.var_name
 */
    goto __pyx_L3;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1084
 *             self.nc_partition_group = nc_parent.createGroup(cfa_metagroup_name)
 *         else:
 *             raise CFAError("Unsupported CFA version {}.".format(cfa_version))             # <<<<<<<<<<<<<<
 * 
 *         # shortcut to partition group
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CFAError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Unsupported_CFA_version, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_cfa_version) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_cfa_version);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1084, __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_ERR(0, 1084, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1087
 * 
 *         # shortcut to partition group
 *         ncp = self.nc_partition_group             # <<<<<<<<<<<<<<
 *         pm_dimensions = self.getPartitionMatrixDimensions()
 *         pm_shape = self.getPartitionMatrixShape()
 */
  __pyx_t_6 = __pyx_v_self->nc_partition_group;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_v_ncp = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1088
 *         # shortcut to partition group
 *         ncp = self.nc_partition_group
 *         pm_dimensions = self.getPartitionMatrixDimensions()             # <<<<<<<<<<<<<<
 *         pm_shape = self.getPartitionMatrixShape()
 *         # need to create the dimensions
 */
  __pyx_t_6 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->getPartitionMatrixDimensions(__pyx_v_self, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_pm_dimensions = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1089
 *         ncp = self.nc_partition_group
 *         pm_dimensions = self.getPartitionMatrixDimensions()
 *         pm_shape = self.getPartitionMatrixShape()             # <<<<<<<<<<<<<<
 *         # need to create the dimensions
 *         for d in range(0, len(pm_dimensions)):
 */
  __pyx_t_6 = ((PyObject *)((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->getPartitionMatrixShape(__pyx_v_self, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_pm_shape = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1091
 *         pm_shape = self.getPartitionMatrixShape()
 *         # need to create the dimensions
 *         for d in range(0, len(pm_dimensions)):             # <<<<<<<<<<<<<<
 *             ncp.createDimension(pm_dimensions[d], pm_shape[d])
 *         n_pm_dims = len(pm_shape)
 */
  __pyx_t_9 = PyObject_Length(__pyx_v_pm_dimensions); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1091, __pyx_L1_error)
  __pyx_t_10 = __pyx_t_9;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
    __pyx_v_d = __pyx_t_11;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1092
 *         # need to create the dimensions
 *         for d in range(0, len(pm_dimensions)):
 *             ncp.createDimension(pm_dimensions[d], pm_shape[d])             # <<<<<<<<<<<<<<
 *         n_pm_dims = len(pm_shape)
 *         # create additional dimensions for location, shape etc.
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_createDimension); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_pm_dimensions, __pyx_v_d, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_pm_shape), __pyx_v_d, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_12 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_12 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_7};
      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1092, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_7};
      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1092, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1092, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (__pyx_t_8) {
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_8); __pyx_t_8 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_t_7);
      __pyx_t_5 = 0;
      __pyx_t_7 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1092, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1093
 *         for d in range(0, len(pm_dimensions)):
 *             ncp.createDimension(pm_dimensions[d], pm_shape[d])
 *         n_pm_dims = len(pm_shape)             # <<<<<<<<<<<<<<
 *         # create additional dimensions for location, shape etc.
 *         # in the partition matrix
 */
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_pm_shape)); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1093, __pyx_L1_error)
  __pyx_v_n_pm_dims = __pyx_t_9;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1096
 *         # create additional dimensions for location, shape etc.
 *         # in the partition matrix
 *         ncp.createDimension("ndimensions", n_pm_dims)             # <<<<<<<<<<<<<<
 *         ncp.createDimension("bounds", 2)
 *         # create the cfa variables the partitions
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_createDimension); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = PyInt_FromSsize_t(__pyx_v_n_pm_dims); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_7 = NULL;
  __pyx_t_12 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_12 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_u_ndimensions, __pyx_t_13};
    __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1096, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_n_u_ndimensions, __pyx_t_13};
    __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1096, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_ndimensions);
    __Pyx_GIVEREF(__pyx_n_u_ndimensions);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_12, __pyx_n_u_ndimensions);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_12, __pyx_t_13);
    __pyx_t_13 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1097
 *         # in the partition matrix
 *         ncp.createDimension("ndimensions", n_pm_dims)
 *         ncp.createDimension("bounds", 2)             # <<<<<<<<<<<<<<
 *         # create the cfa variables the partitions
 *         ### pm_shape
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_createDimension); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1100
 *         # create the cfa variables the partitions
 *         ### pm_shape
 *         pm_shape_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "pmshape", np.int32, dimensions = ("ndimensions",)
 *         )
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_createVariable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1101
 *         ### pm_shape
 *         pm_shape_var = ncp.createVariable(
 *             "pmshape", np.int32, dimensions = ("ndimensions",)             # <<<<<<<<<<<<<<
 *         )
 *         # pm_dimensions - just write as string
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1100
 *         # create the cfa variables the partitions
 *         ### pm_shape
 *         pm_shape_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "pmshape", np.int32, dimensions = ("ndimensions",)
 *         )
 */
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_u_pmshape);
  __Pyx_GIVEREF(__pyx_n_u_pmshape);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_u_pmshape);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1101
 *         ### pm_shape
 *         pm_shape_var = ncp.createVariable(
 *             "pmshape", np.int32, dimensions = ("ndimensions",)             # <<<<<<<<<<<<<<
 *         )
 *         # pm_dimensions - just write as string
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dimensions, __pyx_tuple__28) < 0) __PYX_ERR(0, 1101, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1100
 *         # create the cfa variables the partitions
 *         ### pm_shape
 *         pm_shape_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "pmshape", np.int32, dimensions = ("ndimensions",)
 *         )
 */
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_pm_shape_var = __pyx_t_13;
  __pyx_t_13 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1104
 *         )
 *         # pm_dimensions - just write as string
 *         pm_dimensions_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "pmdimensions", str
 *         )
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_createVariable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1105
 *         # pm_dimensions - just write as string
 *         pm_dimensions_var = ncp.createVariable(
 *             "pmdimensions", str             # <<<<<<<<<<<<<<
 *         )
 *         ### index
 */
  __pyx_t_6 = NULL;
  __pyx_t_12 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_12 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_u_pmdimensions, ((PyObject *)(&PyUnicode_Type))};
    __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1104, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_13);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_n_u_pmdimensions, ((PyObject *)(&PyUnicode_Type))};
    __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1104, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_13);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_n_u_pmdimensions);
    __Pyx_GIVEREF(__pyx_n_u_pmdimensions);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_12, __pyx_n_u_pmdimensions);
    __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_12, ((PyObject *)(&PyUnicode_Type)));
    __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_pm_dimensions_var = __pyx_t_13;
  __pyx_t_13 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1108
 *         )
 *         ### index
 *         index_dim_names = list(pm_dimensions)             # <<<<<<<<<<<<<<
 *         index_dim_names.append("ndimensions")
 *         index_var = ncp.createVariable(
 */
  __pyx_t_13 = PySequence_List(__pyx_v_pm_dimensions); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_v_index_dim_names = ((PyObject*)__pyx_t_13);
  __pyx_t_13 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1109
 *         ### index
 *         index_dim_names = list(pm_dimensions)
 *         index_dim_names.append("ndimensions")             # <<<<<<<<<<<<<<
 *         index_var = ncp.createVariable(
 *             "index", np.int32, dimensions=index_dim_names
 */
  __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_index_dim_names, __pyx_n_u_ndimensions); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1109, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1110
 *         index_dim_names = list(pm_dimensions)
 *         index_dim_names.append("ndimensions")
 *         index_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "index", np.int32, dimensions=index_dim_names
 *         )
 */
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_createVariable); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1111
 *         index_dim_names.append("ndimensions")
 *         index_var = ncp.createVariable(
 *             "index", np.int32, dimensions=index_dim_names             # <<<<<<<<<<<<<<
 *         )
 *         ### location
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1110
 *         index_dim_names = list(pm_dimensions)
 *         index_dim_names.append("ndimensions")
 *         index_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "index", np.int32, dimensions=index_dim_names
 *         )
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_u_index);
  __Pyx_GIVEREF(__pyx_n_u_index);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_u_index);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1111
 *         index_dim_names.append("ndimensions")
 *         index_var = ncp.createVariable(
 *             "index", np.int32, dimensions=index_dim_names             # <<<<<<<<<<<<<<
 *         )
 *         ### location
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dimensions, __pyx_v_index_dim_names) < 0) __PYX_ERR(0, 1111, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1110
 *         index_dim_names = list(pm_dimensions)
 *         index_dim_names.append("ndimensions")
 *         index_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "index", np.int32, dimensions=index_dim_names
 *         )
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_index_var = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1114
 *         )
 *         ### location
 *         location_dim_names = list(pm_dimensions)             # <<<<<<<<<<<<<<
 *         location_dim_names.extend(["ndimensions", "bounds"])
 *         location_var = ncp.createVariable(
 */
  __pyx_t_6 = PySequence_List(__pyx_v_pm_dimensions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_location_dim_names = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1115
 *         ### location
 *         location_dim_names = list(pm_dimensions)
 *         location_dim_names.extend(["ndimensions", "bounds"])             # <<<<<<<<<<<<<<
 *         location_var = ncp.createVariable(
 *             "location", np.int32, dimensions=location_dim_names
 */
  __pyx_t_14 = __Pyx_ListComp_Append(__pyx_v_location_dim_names, __pyx_n_u_ndimensions); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1115, __pyx_L1_error)
  __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_location_dim_names, __pyx_n_u_bounds); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1115, __pyx_L1_error)
  (void)((__pyx_t_14 | __pyx_t_15));

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1116
 *         location_dim_names = list(pm_dimensions)
 *         location_dim_names.extend(["ndimensions", "bounds"])
 *         location_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "location", np.int32, dimensions=location_dim_names
 *         )
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_createVariable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1117
 *         location_dim_names.extend(["ndimensions", "bounds"])
 *         location_var = ncp.createVariable(
 *             "location", np.int32, dimensions=location_dim_names             # <<<<<<<<<<<<<<
 *         )
 *         ### ncvar (name of)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1116
 *         location_dim_names = list(pm_dimensions)
 *         location_dim_names.extend(["ndimensions", "bounds"])
 *         location_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "location", np.int32, dimensions=location_dim_names
 *         )
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_u_location);
  __Pyx_GIVEREF(__pyx_n_u_location);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_location);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1117
 *         location_dim_names.extend(["ndimensions", "bounds"])
 *         location_var = ncp.createVariable(
 *             "location", np.int32, dimensions=location_dim_names             # <<<<<<<<<<<<<<
 *         )
 *         ### ncvar (name of)
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dimensions, __pyx_v_location_dim_names) < 0) __PYX_ERR(0, 1117, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1116
 *         location_dim_names = list(pm_dimensions)
 *         location_dim_names.extend(["ndimensions", "bounds"])
 *         location_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "location", np.int32, dimensions=location_dim_names
 *         )
 */
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_location_var = __pyx_t_13;
  __pyx_t_13 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1120
 *         )
 *         ### ncvar (name of)
 *         ncvar_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "ncvar", str, dimensions=pm_dimensions
 *         )
 */
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_createVariable); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1121
 *         ### ncvar (name of)
 *         ncvar_var = ncp.createVariable(
 *             "ncvar", str, dimensions=pm_dimensions             # <<<<<<<<<<<<<<
 *         )
 *         ### filename
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_u_ncvar);
  __Pyx_GIVEREF(__pyx_n_u_ncvar);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_u_ncvar);
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)));
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dimensions, __pyx_v_pm_dimensions) < 0) __PYX_ERR(0, 1121, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1120
 *         )
 *         ### ncvar (name of)
 *         ncvar_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "ncvar", str, dimensions=pm_dimensions
 *         )
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_ncvar_var = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1124
 *         )
 *         ### filename
 *         file_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "file", str, dimensions=pm_dimensions
 *         )
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_createVariable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1125
 *         ### filename
 *         file_var = ncp.createVariable(
 *             "file", str, dimensions=pm_dimensions             # <<<<<<<<<<<<<<
 *         )
 *         ### format
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_u_file);
  __Pyx_GIVEREF(__pyx_n_u_file);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_file);
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)(&PyUnicode_Type)));
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dimensions, __pyx_v_pm_dimensions) < 0) __PYX_ERR(0, 1125, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1124
 *         )
 *         ### filename
 *         file_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "file", str, dimensions=pm_dimensions
 *         )
 */
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_file_var = __pyx_t_13;
  __pyx_t_13 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1128
 *         )
 *         ### format
 *         format_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "format", str, dimensions=pm_dimensions
 *         )
 */
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_createVariable); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1129
 *         ### format
 *         format_var = ncp.createVariable(
 *             "format", str, dimensions=pm_dimensions             # <<<<<<<<<<<<<<
 *         )
 *         ### shape
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_u_format);
  __Pyx_GIVEREF(__pyx_n_u_format);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_u_format);
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)(&PyUnicode_Type)));
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dimensions, __pyx_v_pm_dimensions) < 0) __PYX_ERR(0, 1129, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1128
 *         )
 *         ### format
 *         format_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "format", str, dimensions=pm_dimensions
 *         )
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_format_var = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1132
 *         )
 *         ### shape
 *         shape_dim_names = index_dim_names             # <<<<<<<<<<<<<<
 *         shape_var = ncp.createVariable(
 *             "shape", np.int32, dimensions=shape_dim_names
 */
  __Pyx_INCREF(__pyx_v_index_dim_names);
  __pyx_v_shape_dim_names = __pyx_v_index_dim_names;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1133
 *         ### shape
 *         shape_dim_names = index_dim_names
 *         shape_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "shape", np.int32, dimensions=shape_dim_names
 *         )
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_createVariable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1134
 *         shape_dim_names = index_dim_names
 *         shape_var = ncp.createVariable(
 *             "shape", np.int32, dimensions=shape_dim_names             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1133
 *         ### shape
 *         shape_dim_names = index_dim_names
 *         shape_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "shape", np.int32, dimensions=shape_dim_names
 *         )
 */
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_u_shape);
  __Pyx_GIVEREF(__pyx_n_u_shape);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_shape);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1134
 *         shape_dim_names = index_dim_names
 *         shape_var = ncp.createVariable(
 *             "shape", np.int32, dimensions=shape_dim_names             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dimensions, __pyx_v_shape_dim_names) < 0) __PYX_ERR(0, 1134, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1133
 *         ### shape
 *         shape_dim_names = index_dim_names
 *         shape_var = ncp.createVariable(             # <<<<<<<<<<<<<<
 *             "shape", np.int32, dimensions=shape_dim_names
 *         )
 */
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_shape_var = __pyx_t_13;
  __pyx_t_13 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1068
 *         # writePartition repeatedly
 * 
 *     cdef __createNCPartition(CFAVariable self, basestring cfa_version="0.5",             # <<<<<<<<<<<<<<
 *                               object nc_parent=None):
 *         """Create the datastructure in a netCDF file for the netCDF partition
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.__createNCPartition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cfa_metagroup_name);
  __Pyx_XDECREF(__pyx_v_ncp);
  __Pyx_XDECREF(__pyx_v_pm_dimensions);
  __Pyx_XDECREF((PyObject *)__pyx_v_pm_shape);
  __Pyx_XDECREF(__pyx_v_pm_shape_var);
  __Pyx_XDECREF(__pyx_v_pm_dimensions_var);
  __Pyx_XDECREF(__pyx_v_index_dim_names);
  __Pyx_XDECREF(__pyx_v_index_var);
  __Pyx_XDECREF(__pyx_v_location_dim_names);
  __Pyx_XDECREF(__pyx_v_location_var);
  __Pyx_XDECREF(__pyx_v_ncvar_var);
  __Pyx_XDECREF(__pyx_v_file_var);
  __Pyx_XDECREF(__pyx_v_format_var);
  __Pyx_XDECREF(__pyx_v_shape_dim_names);
  __Pyx_XDECREF(__pyx_v_shape_var);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1137
 *         )
 * 
 *     cpdef parse(CFAVariable self, dict cfa_metadata):             # <<<<<<<<<<<<<<
 *         """
 *         Parse the metadata and create the required member data and subarrays.
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_35parse(PyObject *__pyx_v_self, PyObject *__pyx_v_cfa_metadata); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_parse(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_cfa_metadata, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_md_key = NULL;
  PyObject *__pyx_v_cfa_json = NULL;
  PyObject *__pyx_v_ncp = NULL;
  PyObject *__pyx_v_p = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_it = NULL;
  PyObject *__pyx_v_tmp_loc = 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;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___createNCPartition __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_35parse)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_cfa_metadata) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_cfa_metadata);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1153
 *         # check first if this is a cf_file - don't throw an exception if it's
 *         # not
 *         if not "cf_role" in cfa_metadata:             # <<<<<<<<<<<<<<
 *             self.cf_role = ""
 *             return False
 */
  if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 1153, __pyx_L1_error)
  }
  __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_cf_role, __pyx_v_cfa_metadata, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1154
 *         # not
 *         if not "cf_role" in cfa_metadata:
 *             self.cf_role = ""             # <<<<<<<<<<<<<<
 *             return False
 *         else:
 */
    __Pyx_INCREF(__pyx_kp_u__13);
    __Pyx_GIVEREF(__pyx_kp_u__13);
    __Pyx_GOTREF(__pyx_v_self->cf_role);
    __Pyx_DECREF(__pyx_v_self->cf_role);
    __pyx_v_self->cf_role = ((PyObject*)__pyx_kp_u__13);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1155
 *         if not "cf_role" in cfa_metadata:
 *             self.cf_role = ""
 *             return False             # <<<<<<<<<<<<<<
 *         else:
 *             self.cf_role = cfa_metadata["cf_role"]
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1153
 *         # check first if this is a cf_file - don't throw an exception if it's
 *         # not
 *         if not "cf_role" in cfa_metadata:             # <<<<<<<<<<<<<<
 *             self.cf_role = ""
 *             return False
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1157
 *             return False
 *         else:
 *             self.cf_role = cfa_metadata["cf_role"]             # <<<<<<<<<<<<<<
 * 
 *         # check that "cf_role", "cfa_dimensions" and "cfa_array" defined in
 */
  /*else*/ {
    if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1157, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_cfa_metadata, __pyx_n_u_cf_role); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1157, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->cf_role);
    __Pyx_DECREF(__pyx_v_self->cf_role);
    __pyx_v_self->cf_role = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1161
 *         # check that "cf_role", "cfa_dimensions" and "cfa_array" defined in
 *         # metadata
 *         if not ("cfa_dimensions" in cfa_metadata):             # <<<<<<<<<<<<<<
 *             raise CFADimensionError(
 *                       "cfa_dimensions or cf_dimensions not defined in {} "
 */
  if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 1161, __pyx_L1_error)
  }
  __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_cfa_dimensions, __pyx_v_cfa_metadata, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1161, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (unlikely(__pyx_t_5)) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1162
 *         # metadata
 *         if not ("cfa_dimensions" in cfa_metadata):
 *             raise CFADimensionError(             # <<<<<<<<<<<<<<
 *                       "cfa_dimensions or cf_dimensions not defined in {} "
 *                       "metadata".format(self.var_name)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CFADimensionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1164
 *             raise CFADimensionError(
 *                       "cfa_dimensions or cf_dimensions not defined in {} "
 *                       "metadata".format(self.var_name)             # <<<<<<<<<<<<<<
 *             )
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_cfa_dimensions_or_cf_dimensions, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_self->var_name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->var_name);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __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_ERR(0, 1162, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1161
 *         # check that "cf_role", "cfa_dimensions" and "cfa_array" defined in
 *         # metadata
 *         if not ("cfa_dimensions" in cfa_metadata):             # <<<<<<<<<<<<<<
 *             raise CFADimensionError(
 *                       "cfa_dimensions or cf_dimensions not defined in {} "
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1167
 *             )
 * 
 *         if not "cfa_array" in cfa_metadata:             # <<<<<<<<<<<<<<
 *             raise CFAVariableError(
 *                       "cfa_array not defined in {} metadata".format(
 */
  if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 1167, __pyx_L1_error)
  }
  __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_cfa_array, __pyx_v_cfa_metadata, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (unlikely(__pyx_t_6)) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1168
 * 
 *         if not "cfa_array" in cfa_metadata:
 *             raise CFAVariableError(             # <<<<<<<<<<<<<<
 *                       "cfa_array not defined in {} metadata".format(
 *                           self.var_name)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CFAVariableError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1169
 *         if not "cfa_array" in cfa_metadata:
 *             raise CFAVariableError(
 *                       "cfa_array not defined in {} metadata".format(             # <<<<<<<<<<<<<<
 *                           self.var_name)
 *             )
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_cfa_array_not_defined_in_metadat, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1170
 *             raise CFAVariableError(
 *                       "cfa_array not defined in {} metadata".format(
 *                           self.var_name)             # <<<<<<<<<<<<<<
 *             )
 * 
 */
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_self->var_name) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->var_name);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __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_ERR(0, 1168, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1167
 *             )
 * 
 *         if not "cfa_array" in cfa_metadata:             # <<<<<<<<<<<<<<
 *             raise CFAVariableError(
 *                       "cfa_array not defined in {} metadata".format(
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1173
 *             )
 * 
 *         for md_key in cfa_metadata:             # <<<<<<<<<<<<<<
 *             # interpret the "cfa_metadata" key metadata
 *             if md_key == "cfa_array":
 */
  __pyx_t_8 = 0;
  if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 1173, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_cfa_metadata, 1, ((PyObject *)NULL), (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_9, &__pyx_t_8, &__pyx_t_2, NULL, NULL, __pyx_t_10);
    if (unlikely(__pyx_t_11 == 0)) break;
    if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 1173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_md_key, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1175
 *         for md_key in cfa_metadata:
 *             # interpret the "cfa_metadata" key metadata
 *             if md_key == "cfa_array":             # <<<<<<<<<<<<<<
 *                 # this is the main bulk of the cfa defintion -> we are going to
 *                 # create CFA_Arrays from the partition information contained in this
 */
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_md_key, __pyx_n_u_cfa_array, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1175, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1179
 *                 # create CFA_Arrays from the partition information contained in this
 *                 # chunk of metadata
 *                 cfa_json = json.loads(cfa_metadata[md_key])             # <<<<<<<<<<<<<<
 *                 # check that the partitions are defined in the JSON
 *                 if not "Partitions" in cfa_json:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loads); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1179, __pyx_L1_error)
      }
      __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_cfa_metadata, __pyx_v_md_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_cfa_json, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1181
 *                 cfa_json = json.loads(cfa_metadata[md_key])
 *                 # check that the partitions are defined in the JSON
 *                 if not "Partitions" in cfa_json:             # <<<<<<<<<<<<<<
 *                     raise CFAPartitionError(
 *                               "Partitions not defined in {} metadata".format(
 */
      __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_Partitions, __pyx_v_cfa_json, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1181, __pyx_L1_error)
      __pyx_t_5 = (__pyx_t_6 != 0);
      if (unlikely(__pyx_t_5)) {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1182
 *                 # check that the partitions are defined in the JSON
 *                 if not "Partitions" in cfa_json:
 *                     raise CFAPartitionError(             # <<<<<<<<<<<<<<
 *                               "Partitions not defined in {} metadata".format(
 *                                   self.var_name)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CFAPartitionError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1183
 *                 if not "Partitions" in cfa_json:
 *                     raise CFAPartitionError(
 *                               "Partitions not defined in {} metadata".format(             # <<<<<<<<<<<<<<
 *                                   self.var_name)
 *                     )
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Partitions_not_defined_in_metada, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1183, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1184
 *                     raise CFAPartitionError(
 *                               "Partitions not defined in {} metadata".format(
 *                                   self.var_name)             # <<<<<<<<<<<<<<
 *                     )
 *                 # load all the data for this class - if it exists
 */
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_v_self->var_name) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->var_name);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __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_ERR(0, 1182, __pyx_L1_error)

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1181
 *                 cfa_json = json.loads(cfa_metadata[md_key])
 *                 # check that the partitions are defined in the JSON
 *                 if not "Partitions" in cfa_json:             # <<<<<<<<<<<<<<
 *                     raise CFAPartitionError(
 *                               "Partitions not defined in {} metadata".format(
 */
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1187
 *                     )
 *                 # load all the data for this class - if it exists
 *                 if "base" in cfa_json:             # <<<<<<<<<<<<<<
 *                     self.base = cfa_json["base"]
 *                 if "pmshape" in cfa_json:
 */
      __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_base, __pyx_v_cfa_json, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1187, __pyx_L1_error)
      __pyx_t_6 = (__pyx_t_5 != 0);
      if (__pyx_t_6) {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1188
 *                 # load all the data for this class - if it exists
 *                 if "base" in cfa_json:
 *                     self.base = cfa_json["base"]             # <<<<<<<<<<<<<<
 *                 if "pmshape" in cfa_json:
 *                     self.pmshape = np.array(cfa_json["pmshape"], dtype='i')
 */
        __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cfa_json, __pyx_n_u_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1188, __pyx_L1_error)
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_self->base);
        __Pyx_DECREF(__pyx_v_self->base);
        __pyx_v_self->base = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1187
 *                     )
 *                 # load all the data for this class - if it exists
 *                 if "base" in cfa_json:             # <<<<<<<<<<<<<<
 *                     self.base = cfa_json["base"]
 *                 if "pmshape" in cfa_json:
 */
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1189
 *                 if "base" in cfa_json:
 *                     self.base = cfa_json["base"]
 *                 if "pmshape" in cfa_json:             # <<<<<<<<<<<<<<
 *                     self.pmshape = np.array(cfa_json["pmshape"], dtype='i')
 *                 if "pmdimensions" in cfa_json:
 */
      __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_pmshape, __pyx_v_cfa_json, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1189, __pyx_L1_error)
      __pyx_t_5 = (__pyx_t_6 != 0);
      if (__pyx_t_5) {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1190
 *                     self.base = cfa_json["base"]
 *                 if "pmshape" in cfa_json:
 *                     self.pmshape = np.array(cfa_json["pmshape"], dtype='i')             # <<<<<<<<<<<<<<
 *                 if "pmdimensions" in cfa_json:
 *                     self.pmdimensions = cfa_json["pmdimensions"]
 */
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cfa_json, __pyx_n_u_pmshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_u_i) < 0) __PYX_ERR(0, 1190, __pyx_L1_error)
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1190, __pyx_L1_error)
        __Pyx_GIVEREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_v_self->pmshape);
        __Pyx_DECREF(((PyObject *)__pyx_v_self->pmshape));
        __pyx_v_self->pmshape = ((PyArrayObject *)__pyx_t_7);
        __pyx_t_7 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1189
 *                 if "base" in cfa_json:
 *                     self.base = cfa_json["base"]
 *                 if "pmshape" in cfa_json:             # <<<<<<<<<<<<<<
 *                     self.pmshape = np.array(cfa_json["pmshape"], dtype='i')
 *                 if "pmdimensions" in cfa_json:
 */
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1191
 *                 if "pmshape" in cfa_json:
 *                     self.pmshape = np.array(cfa_json["pmshape"], dtype='i')
 *                 if "pmdimensions" in cfa_json:             # <<<<<<<<<<<<<<
 *                     self.pmdimensions = cfa_json["pmdimensions"]
 * 
 */
      __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_pmdimensions, __pyx_v_cfa_json, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1191, __pyx_L1_error)
      __pyx_t_6 = (__pyx_t_5 != 0);
      if (__pyx_t_6) {

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1192
 *                     self.pmshape = np.array(cfa_json["pmshape"], dtype='i')
 *                 if "pmdimensions" in cfa_json:
 *                     self.pmdimensions = cfa_json["pmdimensions"]             # <<<<<<<<<<<<<<
 * 
 *                 # create a netCDF dataset in memory to store the variables
 */
        __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cfa_json, __pyx_n_u_pmdimensions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1192, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (!(likely(PyList_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 1192, __pyx_L1_error)
        __Pyx_GIVEREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_v_self->pmdimensions);
        __Pyx_DECREF(__pyx_v_self->pmdimensions);
        __pyx_v_self->pmdimensions = ((PyObject*)__pyx_t_7);
        __pyx_t_7 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1191
 *                 if "pmshape" in cfa_json:
 *                     self.pmshape = np.array(cfa_json["pmshape"], dtype='i')
 *                 if "pmdimensions" in cfa_json:             # <<<<<<<<<<<<<<
 *                     self.pmdimensions = cfa_json["pmdimensions"]
 * 
 */
      }

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1198
 *                 # same code can be used for accessing partitions in CFA-0.4
 *                 # format and CFA-0.5 format
 *                 self.__createNCPartition(cfa_version="0.4")             # <<<<<<<<<<<<<<
 *                 # get a shortcut to the partition group
 *                 ncp = self.nc_partition_group
 */
      __pyx_t_13.__pyx_n = 1;
      __pyx_t_13.cfa_version = ((PyObject*)__pyx_kp_u_0_4);
      __pyx_t_7 = ((struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self->__pyx_vtab)->__pyx___createNCPartition(__pyx_v_self, &__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1198, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1200
 *                 self.__createNCPartition(cfa_version="0.4")
 *                 # get a shortcut to the partition group
 *                 ncp = self.nc_partition_group             # <<<<<<<<<<<<<<
 *                 for p in cfa_json["Partitions"]:
 *                     # we require the index and location.  Allow KeyError
 */
      __pyx_t_7 = __pyx_v_self->nc_partition_group;
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_v_ncp, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1201
 *                 # get a shortcut to the partition group
 *                 ncp = self.nc_partition_group
 *                 for p in cfa_json["Partitions"]:             # <<<<<<<<<<<<<<
 *                     # we require the index and location.  Allow KeyError
 *                     # exceptions to be thrown if they are not found
 */
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cfa_json, __pyx_n_u_Partitions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
        __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_14 = 0;
        __pyx_t_15 = NULL;
      } else {
        __pyx_t_14 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1201, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1201, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      for (;;) {
        if (likely(!__pyx_t_15)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_14); __Pyx_INCREF(__pyx_t_7); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 1201, __pyx_L1_error)
            #else
            __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1201, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          } else {
            if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_14); __Pyx_INCREF(__pyx_t_7); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 1201, __pyx_L1_error)
            #else
            __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1201, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          }
        } else {
          __pyx_t_7 = __pyx_t_15(__pyx_t_2);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1201, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1204
 *                     # we require the index and location.  Allow KeyError
 *                     # exceptions to be thrown if they are not found
 *                     index = np.array(p["index"], 'i')             # <<<<<<<<<<<<<<
 *                     it = tuple(index)
 *                     ncp.variables["index"][it] = index
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __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_ERR(0, 1204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_p, __pyx_n_u_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_12 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_3, __pyx_n_u_i};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1204, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_3, __pyx_n_u_i};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1204, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else
        #endif
        {
          __pyx_t_16 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1204, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_12); __pyx_t_12 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_11, __pyx_t_3);
          __Pyx_INCREF(__pyx_n_u_i);
          __Pyx_GIVEREF(__pyx_n_u_i);
          PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_11, __pyx_n_u_i);
          __pyx_t_3 = 0;
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_16, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1204, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1205
 *                     # exceptions to be thrown if they are not found
 *                     index = np.array(p["index"], 'i')
 *                     it = tuple(index)             # <<<<<<<<<<<<<<
 *                     ncp.variables["index"][it] = index
 *                     # +1 here as CFA 0.4 has location indices as inclusive,
 */
        __pyx_t_7 = __Pyx_PySequence_Tuple(__pyx_v_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF_SET(__pyx_v_it, ((PyObject*)__pyx_t_7));
        __pyx_t_7 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1206
 *                     index = np.array(p["index"], 'i')
 *                     it = tuple(index)
 *                     ncp.variables["index"][it] = index             # <<<<<<<<<<<<<<
 *                     # +1 here as CFA 0.4 has location indices as inclusive,
 *                     # whereas Python and CFA 0.5 have them as exclusive
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1206, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_u_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1206, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_it, __pyx_v_index) < 0)) __PYX_ERR(0, 1206, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1209
 *                     # +1 here as CFA 0.4 has location indices as inclusive,
 *                     # whereas Python and CFA 0.5 have them as exclusive
 *                     tmp_loc = np.array(p["location"])             # <<<<<<<<<<<<<<
 *                     tmp_loc[:,1] += 1
 *                     ncp.variables["location"][it] = tmp_loc
 */
        __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1209, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1209, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_p, __pyx_n_u_location); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1209, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_3 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_16);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_16, function);
          }
        }
        __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_7);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1209, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tmp_loc, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1210
 *                     # whereas Python and CFA 0.5 have them as exclusive
 *                     tmp_loc = np.array(p["location"])
 *                     tmp_loc[:,1] += 1             # <<<<<<<<<<<<<<
 *                     ncp.variables["location"][it] = tmp_loc
 *                     ncp.variables["ncvar"][it] = p["subarray"]["ncvar"]
 */
        __Pyx_INCREF(__pyx_tuple__24);
        __pyx_t_17 = __pyx_tuple__24;
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_tmp_loc, __pyx_t_17); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_16 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_tmp_loc, __pyx_t_17, __pyx_t_16) < 0)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1211
 *                     tmp_loc = np.array(p["location"])
 *                     tmp_loc[:,1] += 1
 *                     ncp.variables["location"][it] = tmp_loc             # <<<<<<<<<<<<<<
 *                     ncp.variables["ncvar"][it] = p["subarray"]["ncvar"]
 *                     ncp.variables["file"][it] = p["subarray"]["file"]
 */
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1211, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_16, __pyx_n_u_location); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1211, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_it, __pyx_v_tmp_loc) < 0)) __PYX_ERR(0, 1211, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1212
 *                     tmp_loc[:,1] += 1
 *                     ncp.variables["location"][it] = tmp_loc
 *                     ncp.variables["ncvar"][it] = p["subarray"]["ncvar"]             # <<<<<<<<<<<<<<
 *                     ncp.variables["file"][it] = p["subarray"]["file"]
 *                     ncp.variables["format"][it] = p["subarray"]["format"]
 */
        __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_p, __pyx_n_u_subarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_16 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_u_ncvar); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1212, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_u_ncvar); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1212, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_it, __pyx_t_16) < 0)) __PYX_ERR(0, 1212, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1213
 *                     ncp.variables["location"][it] = tmp_loc
 *                     ncp.variables["ncvar"][it] = p["subarray"]["ncvar"]
 *                     ncp.variables["file"][it] = p["subarray"]["file"]             # <<<<<<<<<<<<<<
 *                     ncp.variables["format"][it] = p["subarray"]["format"]
 *                     ncp.variables["shape"][it] = np.array(p["subarray"]["shape"])
 */
        __pyx_t_16 = __Pyx_PyObject_Dict_GetItem(__pyx_v_p, __pyx_n_u_subarray); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1213, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_t_16, __pyx_n_u_file); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1213, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1213, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_16, __pyx_n_u_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1213, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_it, __pyx_t_7) < 0)) __PYX_ERR(0, 1213, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1214
 *                     ncp.variables["ncvar"][it] = p["subarray"]["ncvar"]
 *                     ncp.variables["file"][it] = p["subarray"]["file"]
 *                     ncp.variables["format"][it] = p["subarray"]["format"]             # <<<<<<<<<<<<<<
 *                     ncp.variables["shape"][it] = np.array(p["subarray"]["shape"])
 * 
 */
        __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_p, __pyx_n_u_subarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1214, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_u_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1214, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_16 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_u_format); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1214, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(PyObject_SetItem(__pyx_t_16, __pyx_v_it, __pyx_t_4) < 0)) __PYX_ERR(0, 1214, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1215
 *                     ncp.variables["file"][it] = p["subarray"]["file"]
 *                     ncp.variables["format"][it] = p["subarray"]["format"]
 *                     ncp.variables["shape"][it] = np.array(p["subarray"]["shape"])             # <<<<<<<<<<<<<<
 * 
 *             elif md_key == "cfa_dimensions" or md_key == "cf_dimensions":
 */
        __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_16 = __Pyx_PyObject_Dict_GetItem(__pyx_v_p, __pyx_n_u_subarray); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_16, __pyx_n_u_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_16 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_16)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_16);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_4 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_16, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_u_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_v_it, __pyx_t_4) < 0)) __PYX_ERR(0, 1215, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "S3netCDF4/CFA/_CFAClasses.pyx":1201
 *                 # get a shortcut to the partition group
 *                 ncp = self.nc_partition_group
 *                 for p in cfa_json["Partitions"]:             # <<<<<<<<<<<<<<
 *                     # we require the index and location.  Allow KeyError
 *                     # exceptions to be thrown if they are not found
 */
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1175
 *         for md_key in cfa_metadata:
 *             # interpret the "cfa_metadata" key metadata
 *             if md_key == "cfa_array":             # <<<<<<<<<<<<<<
 *                 # this is the main bulk of the cfa defintion -> we are going to
 *                 # create CFA_Arrays from the partition information contained in this
 */
      goto __pyx_L8;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1217
 *                     ncp.variables["shape"][it] = np.array(p["subarray"]["shape"])
 * 
 *             elif md_key == "cfa_dimensions" or md_key == "cf_dimensions":             # <<<<<<<<<<<<<<
 *                 self.cfa_dimensions = cfa_metadata[md_key].split()
 *             elif md_key == "cf_role":
 */
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_md_key, __pyx_n_u_cfa_dimensions, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1217, __pyx_L1_error)
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L15_bool_binop_done;
    }
    __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_md_key, __pyx_n_u_cf_dimensions, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1217, __pyx_L1_error)
    __pyx_t_6 = __pyx_t_5;
    __pyx_L15_bool_binop_done:;
    if (__pyx_t_6) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1218
 * 
 *             elif md_key == "cfa_dimensions" or md_key == "cf_dimensions":
 *                 self.cfa_dimensions = cfa_metadata[md_key].split()             # <<<<<<<<<<<<<<
 *             elif md_key == "cf_role":
 *                 self.cf_role = cfa_metadata[md_key]
 */
      if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1218, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_cfa_metadata, __pyx_v_md_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1218, __pyx_L1_error)
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->cfa_dimensions);
      __Pyx_DECREF(__pyx_v_self->cfa_dimensions);
      __pyx_v_self->cfa_dimensions = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1217
 *                     ncp.variables["shape"][it] = np.array(p["subarray"]["shape"])
 * 
 *             elif md_key == "cfa_dimensions" or md_key == "cf_dimensions":             # <<<<<<<<<<<<<<
 *                 self.cfa_dimensions = cfa_metadata[md_key].split()
 *             elif md_key == "cf_role":
 */
      goto __pyx_L8;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1219
 *             elif md_key == "cfa_dimensions" or md_key == "cf_dimensions":
 *                 self.cfa_dimensions = cfa_metadata[md_key].split()
 *             elif md_key == "cf_role":             # <<<<<<<<<<<<<<
 *                 self.cf_role = cfa_metadata[md_key]
 *             else:
 */
    __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_md_key, __pyx_n_u_cf_role, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1219, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1220
 *                 self.cfa_dimensions = cfa_metadata[md_key].split()
 *             elif md_key == "cf_role":
 *                 self.cf_role = cfa_metadata[md_key]             # <<<<<<<<<<<<<<
 *             else:
 *                 self.metadata[md_key] = cfa_metadata[md_key]
 */
      if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1220, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_cfa_metadata, __pyx_v_md_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1220, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1220, __pyx_L1_error)
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->cf_role);
      __Pyx_DECREF(__pyx_v_self->cf_role);
      __pyx_v_self->cf_role = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1219
 *             elif md_key == "cfa_dimensions" or md_key == "cf_dimensions":
 *                 self.cfa_dimensions = cfa_metadata[md_key].split()
 *             elif md_key == "cf_role":             # <<<<<<<<<<<<<<
 *                 self.cf_role = cfa_metadata[md_key]
 *             else:
 */
      goto __pyx_L8;
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1222
 *                 self.cf_role = cfa_metadata[md_key]
 *             else:
 *                 self.metadata[md_key] = cfa_metadata[md_key]             # <<<<<<<<<<<<<<
 * 
 *     cpdef dict dump(CFAVariable self):
 */
    /*else*/ {
      if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1222, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_cfa_metadata, __pyx_v_md_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(__pyx_v_self->metadata == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1222, __pyx_L1_error)
      }
      if (unlikely(PyDict_SetItem(__pyx_v_self->metadata, __pyx_v_md_key, __pyx_t_2) < 0)) __PYX_ERR(0, 1222, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L8:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1137
 *         )
 * 
 *     cpdef parse(CFAVariable self, dict cfa_metadata):             # <<<<<<<<<<<<<<
 *         """
 *         Parse the metadata and create the required member data and subarrays.
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_md_key);
  __Pyx_XDECREF(__pyx_v_cfa_json);
  __Pyx_XDECREF(__pyx_v_ncp);
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_it);
  __Pyx_XDECREF(__pyx_v_tmp_loc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_35parse(PyObject *__pyx_v_self, PyObject *__pyx_v_cfa_metadata); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_34parse[] = "\n        Parse the metadata and create the required member data and subarrays.\n        This is for CFA version 0.4, which parses metadata held in the netCDF\n        attribute - which is returned from the netCDF4 library as a dictionary.\n\n        Args:\n            cfa_metadata (dict): the dictionary of the metadata to parse into\n            the CFA structures.\n\n        Returns:\n            bool: True if parsed successfully, False if it is not a cfa file.\n        ";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_35parse(PyObject *__pyx_v_self, PyObject *__pyx_v_cfa_metadata) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfa_metadata), (&PyDict_Type), 1, "cfa_metadata", 1))) __PYX_ERR(0, 1137, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_34parse(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self), ((PyObject*)__pyx_v_cfa_metadata));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_34parse(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_cfa_metadata) {
  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("parse", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_parse(__pyx_v_self, __pyx_v_cfa_metadata, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1224
 *                 self.metadata[md_key] = cfa_metadata[md_key]
 * 
 *     cpdef dict dump(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the a dictionary representation of the CFAVariable so it can
 *            be added to the metadata for the variable later.
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_37dump(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_dump(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_output_dump = NULL;
  PyObject *__pyx_v_cfa_array_dict = NULL;
  PyObject *__pyx_v_partitions_list = NULL;
  PyObject *__pyx_v_ncp = NULL;
  PyObject *__pyx_v_it = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_ncvar = NULL;
  PyObject *__pyx_v_shape = NULL;
  PyObject *__pyx_v_file = NULL;
  PyObject *__pyx_v_format = NULL;
  PyObject *__pyx_v_location = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_partition_dict = NULL;
  PyObject *__pyx_9genexpr10__pyx_v_k = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dump", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dump); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_37dump)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1224, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1224, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1231
 *         """
 *         # add the other (non-cfa) metadata
 *         output_dump = {k:self.metadata[k] for k in self.metadata}             # <<<<<<<<<<<<<<
 *         # only output partitions data if the variable has "cfa_variable" as its
 *         # value for the "cf_role" attribute
 */
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1231, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = 0;
    if (unlikely(__pyx_v_self->metadata == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 1231, __pyx_L5_error)
    }
    __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_self->metadata, 1, ((PyObject *)NULL), (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1231, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;
    while (1) {
      __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_6, &__pyx_t_5, &__pyx_t_3, NULL, NULL, __pyx_t_7);
      if (unlikely(__pyx_t_8 == 0)) break;
      if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 1231, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_k, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__pyx_v_self->metadata == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1231, __pyx_L5_error)
      }
      __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->metadata, __pyx_9genexpr10__pyx_v_k); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1231, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_9genexpr10__pyx_v_k, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1231, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_k); __pyx_9genexpr10__pyx_v_k = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_k); __pyx_9genexpr10__pyx_v_k = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_v_output_dump = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1234
 *         # only output partitions data if the variable has "cfa_variable" as its
 *         # value for the "cf_role" attribute
 *         if self.cf_role != "cfa_variable":             # <<<<<<<<<<<<<<
 *             return output_dump
 * 
 */
  __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_self->cf_role, __pyx_n_u_cfa_variable, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1234, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1235
 *         # value for the "cf_role" attribute
 *         if self.cf_role != "cfa_variable":
 *             return output_dump             # <<<<<<<<<<<<<<
 * 
 *         # below here is for cfa variables
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_output_dump);
    __pyx_r = __pyx_v_output_dump;
    goto __pyx_L0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1234
 *         # only output partitions data if the variable has "cfa_variable" as its
 *         # value for the "cf_role" attribute
 *         if self.cf_role != "cfa_variable":             # <<<<<<<<<<<<<<
 *             return output_dump
 * 
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1238
 * 
 *         # below here is for cfa variables
 *         cfa_array_dict = {}             # <<<<<<<<<<<<<<
 *         if self.base != "":
 *             cfa_array_dict["base"] = self.base
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cfa_array_dict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1239
 *         # below here is for cfa variables
 *         cfa_array_dict = {}
 *         if self.base != "":             # <<<<<<<<<<<<<<
 *             cfa_array_dict["base"] = self.base
 *         if self.pmshape.any():
 */
  __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_v_self->base, __pyx_kp_u__13, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1239, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1240
 *         cfa_array_dict = {}
 *         if self.base != "":
 *             cfa_array_dict["base"] = self.base             # <<<<<<<<<<<<<<
 *         if self.pmshape.any():
 *             cfa_array_dict["pmshape"] = self.pmshape.tolist()
 */
    __pyx_t_1 = __pyx_v_self->base;
    __Pyx_INCREF(__pyx_t_1);
    if (unlikely(PyDict_SetItem(__pyx_v_cfa_array_dict, __pyx_n_u_base, __pyx_t_1) < 0)) __PYX_ERR(0, 1240, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1239
 *         # below here is for cfa variables
 *         cfa_array_dict = {}
 *         if self.base != "":             # <<<<<<<<<<<<<<
 *             cfa_array_dict["base"] = self.base
 *         if self.pmshape.any():
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1241
 *         if self.base != "":
 *             cfa_array_dict["base"] = self.base
 *         if self.pmshape.any():             # <<<<<<<<<<<<<<
 *             cfa_array_dict["pmshape"] = self.pmshape.tolist()
 *         if self.pmdimensions != []:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->pmshape), __pyx_n_s_any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1242
 *             cfa_array_dict["base"] = self.base
 *         if self.pmshape.any():
 *             cfa_array_dict["pmshape"] = self.pmshape.tolist()             # <<<<<<<<<<<<<<
 *         if self.pmdimensions != []:
 *             cfa_array_dict["pmdimensions"] = self.pmdimensions
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->pmshape), __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_cfa_array_dict, __pyx_n_u_pmshape, __pyx_t_1) < 0)) __PYX_ERR(0, 1242, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1241
 *         if self.base != "":
 *             cfa_array_dict["base"] = self.base
 *         if self.pmshape.any():             # <<<<<<<<<<<<<<
 *             cfa_array_dict["pmshape"] = self.pmshape.tolist()
 *         if self.pmdimensions != []:
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1243
 *         if self.pmshape.any():
 *             cfa_array_dict["pmshape"] = self.pmshape.tolist()
 *         if self.pmdimensions != []:             # <<<<<<<<<<<<<<
 *             cfa_array_dict["pmdimensions"] = self.pmdimensions
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_self->pmdimensions, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_9) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1244
 *             cfa_array_dict["pmshape"] = self.pmshape.tolist()
 *         if self.pmdimensions != []:
 *             cfa_array_dict["pmdimensions"] = self.pmdimensions             # <<<<<<<<<<<<<<
 * 
 *         # write out the partitions from the CFAPartition type
 */
    __pyx_t_2 = __pyx_v_self->pmdimensions;
    __Pyx_INCREF(__pyx_t_2);
    if (unlikely(PyDict_SetItem(__pyx_v_cfa_array_dict, __pyx_n_u_pmdimensions, __pyx_t_2) < 0)) __PYX_ERR(0, 1244, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1243
 *         if self.pmshape.any():
 *             cfa_array_dict["pmshape"] = self.pmshape.tolist()
 *         if self.pmdimensions != []:             # <<<<<<<<<<<<<<
 *             cfa_array_dict["pmdimensions"] = self.pmdimensions
 * 
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1247
 * 
 *         # write out the partitions from the CFAPartition type
 *         partitions_list = []             # <<<<<<<<<<<<<<
 *         # shortcut to partition group
 *         ncp = self.nc_partition_group
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_partitions_list = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1249
 *         partitions_list = []
 *         # shortcut to partition group
 *         ncp = self.nc_partition_group             # <<<<<<<<<<<<<<
 *         # iterate over the indices
 *         it = np.nditer(ncp.variables["ncvar"],
 */
  __pyx_t_2 = __pyx_v_self->nc_partition_group;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_ncp = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1251
 *         ncp = self.nc_partition_group
 *         # iterate over the indices
 *         it = np.nditer(ncp.variables["ncvar"],             # <<<<<<<<<<<<<<
 *                        flags=["multi_index", "refs_ok"])
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nditer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __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_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_ncvar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1252
 *         # iterate over the indices
 *         it = np.nditer(ncp.variables["ncvar"],
 *                        flags=["multi_index", "refs_ok"])             # <<<<<<<<<<<<<<
 *         #
 *         for i in it:
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_u_multi_index);
  __Pyx_GIVEREF(__pyx_n_u_multi_index);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_multi_index);
  __Pyx_INCREF(__pyx_n_u_refs_ok);
  __Pyx_GIVEREF(__pyx_n_u_refs_ok);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_refs_ok);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_flags, __pyx_t_4) < 0) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1251
 *         ncp = self.nc_partition_group
 *         # iterate over the indices
 *         it = np.nditer(ncp.variables["ncvar"],             # <<<<<<<<<<<<<<
 *                        flags=["multi_index", "refs_ok"])
 *         #
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1251, __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_it = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1254
 *                        flags=["multi_index", "refs_ok"])
 *         #
 *         for i in it:             # <<<<<<<<<<<<<<
 *             ncvar  = ncp.variables["ncvar"][it.multi_index]
 *             # don't write out any undefinied partitions
 */
  if (likely(PyList_CheckExact(__pyx_v_it)) || PyTuple_CheckExact(__pyx_v_it)) {
    __pyx_t_4 = __pyx_v_it; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_it); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_11 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1254, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1254, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1254, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_11(__pyx_t_4);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1254, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1255
 *         #
 *         for i in it:
 *             ncvar  = ncp.variables["ncvar"][it.multi_index]             # <<<<<<<<<<<<<<
 *             # don't write out any undefinied partitions
 *             if ncvar == "":
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_ncvar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_it, __pyx_n_s_multi_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __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_XDECREF_SET(__pyx_v_ncvar, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1257
 *             ncvar  = ncp.variables["ncvar"][it.multi_index]
 *             # don't write out any undefinied partitions
 *             if ncvar == "":             # <<<<<<<<<<<<<<
 *                 continue
 *             shape  = ncp.variables["shape"][it.multi_index]
 */
    __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_ncvar, __pyx_kp_u__13, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1257, __pyx_L1_error)
    if (__pyx_t_9) {

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1258
 *             # don't write out any undefinied partitions
 *             if ncvar == "":
 *                 continue             # <<<<<<<<<<<<<<
 *             shape  = ncp.variables["shape"][it.multi_index]
 *             file   = ncp.variables["file"][it.multi_index]
 */
      goto __pyx_L13_continue;

      /* "S3netCDF4/CFA/_CFAClasses.pyx":1257
 *             ncvar  = ncp.variables["ncvar"][it.multi_index]
 *             # don't write out any undefinied partitions
 *             if ncvar == "":             # <<<<<<<<<<<<<<
 *                 continue
 *             shape  = ncp.variables["shape"][it.multi_index]
 */
    }

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1259
 *             if ncvar == "":
 *                 continue
 *             shape  = ncp.variables["shape"][it.multi_index]             # <<<<<<<<<<<<<<
 *             file   = ncp.variables["file"][it.multi_index]
 *             format = ncp.variables["format"][it.multi_index]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_it, __pyx_n_s_multi_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_shape, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1260
 *                 continue
 *             shape  = ncp.variables["shape"][it.multi_index]
 *             file   = ncp.variables["file"][it.multi_index]             # <<<<<<<<<<<<<<
 *             format = ncp.variables["format"][it.multi_index]
 *             # -1 here as CFA 0.4 has location indices as inclusive,
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1260, __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_it, __pyx_n_s_multi_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_file, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1261
 *             shape  = ncp.variables["shape"][it.multi_index]
 *             file   = ncp.variables["file"][it.multi_index]
 *             format = ncp.variables["format"][it.multi_index]             # <<<<<<<<<<<<<<
 *             # -1 here as CFA 0.4 has location indices as inclusive,
 *             # whereas Python and CFA 0.5 have them as exclusive
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_it, __pyx_n_s_multi_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1261, __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_XDECREF_SET(__pyx_v_format, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1264
 *             # -1 here as CFA 0.4 has location indices as inclusive,
 *             # whereas Python and CFA 0.5 have them as exclusive
 *             location = ncp.variables["location"][it.multi_index]             # <<<<<<<<<<<<<<
 *             location[:,1] -= 1
 *             index = ncp.variables["index"][it.multi_index]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_it, __pyx_n_s_multi_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_location, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1265
 *             # whereas Python and CFA 0.5 have them as exclusive
 *             location = ncp.variables["location"][it.multi_index]
 *             location[:,1] -= 1             # <<<<<<<<<<<<<<
 *             index = ncp.variables["index"][it.multi_index]
 *             # build the partition JSON with the subarray
 */
    __Pyx_INCREF(__pyx_tuple__24);
    __pyx_t_12 = __pyx_tuple__24;
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_location, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_location, __pyx_t_12, __pyx_t_1) < 0)) __PYX_ERR(0, 1265, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1266
 *             location = ncp.variables["location"][it.multi_index]
 *             location[:,1] -= 1
 *             index = ncp.variables["index"][it.multi_index]             # <<<<<<<<<<<<<<
 *             # build the partition JSON with the subarray
 *             partition_dict = {
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ncp, __pyx_n_s_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __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_it, __pyx_n_s_multi_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __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_XDECREF_SET(__pyx_v_index, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1269
 *             # build the partition JSON with the subarray
 *             partition_dict = {
 *                               "subarray" : {             # <<<<<<<<<<<<<<
 *                                   "ncvar"  : ncvar,
 *                                   "file"   : file,
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1270
 *             partition_dict = {
 *                               "subarray" : {
 *                                   "ncvar"  : ncvar,             # <<<<<<<<<<<<<<
 *                                   "file"   : file,
 *                                   "format" : format,
 */
    __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ncvar, __pyx_v_ncvar) < 0) __PYX_ERR(0, 1270, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1271
 *                               "subarray" : {
 *                                   "ncvar"  : ncvar,
 *                                   "file"   : file,             # <<<<<<<<<<<<<<
 *                                   "format" : format,
 *                                   "shape"  : shape.tolist()
 */
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_file, __pyx_v_file) < 0) __PYX_ERR(0, 1270, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1272
 *                                   "ncvar"  : ncvar,
 *                                   "file"   : file,
 *                                   "format" : format,             # <<<<<<<<<<<<<<
 *                                   "shape"  : shape.tolist()
 *                              },
 */
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_format, __pyx_v_format) < 0) __PYX_ERR(0, 1270, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1273
 *                                   "file"   : file,
 *                                   "format" : format,
 *                                   "shape"  : shape.tolist()             # <<<<<<<<<<<<<<
 *                              },
 *                              "index" : index.tolist(),
 */
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_shape, __pyx_n_s_tolist); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_14 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
      if (likely(__pyx_t_14)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_13, function);
      }
    }
    __pyx_t_2 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_13);
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_shape, __pyx_t_2) < 0) __PYX_ERR(0, 1270, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_subarray, __pyx_t_1) < 0) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1275
 *                                   "shape"  : shape.tolist()
 *                              },
 *                              "index" : index.tolist(),             # <<<<<<<<<<<<<<
 *                              "location" : location.tolist()
 *                             }
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_index, __pyx_t_1) < 0) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1276
 *                              },
 *                              "index" : index.tolist(),
 *                              "location" : location.tolist()             # <<<<<<<<<<<<<<
 *                             }
 *             # add to list of partitions
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_location, __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_location, __pyx_t_1) < 0) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_partition_dict, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1279
 *                             }
 *             # add to list of partitions
 *             partitions_list.append(partition_dict)             # <<<<<<<<<<<<<<
 *         cfa_array_dict["Partitions"] = partitions_list
 * 
 */
    __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_partitions_list, __pyx_v_partition_dict); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1279, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1254
 *                        flags=["multi_index", "refs_ok"])
 *         #
 *         for i in it:             # <<<<<<<<<<<<<<
 *             ncvar  = ncp.variables["ncvar"][it.multi_index]
 *             # don't write out any undefinied partitions
 */
    __pyx_L13_continue:;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1280
 *             # add to list of partitions
 *             partitions_list.append(partition_dict)
 *         cfa_array_dict["Partitions"] = partitions_list             # <<<<<<<<<<<<<<
 * 
 *         output_dump["cf_role"]       = self.cf_role,
 */
  if (unlikely(PyDict_SetItem(__pyx_v_cfa_array_dict, __pyx_n_u_Partitions, __pyx_v_partitions_list) < 0)) __PYX_ERR(0, 1280, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1282
 *         cfa_array_dict["Partitions"] = partitions_list
 * 
 *         output_dump["cf_role"]       = self.cf_role,             # <<<<<<<<<<<<<<
 *         output_dump["cf_dimensions"] = " ".join(self.cfa_dimensions),
 *         output_dump["cfa_array"]     = cfa_array_dict
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->cf_role);
  __Pyx_GIVEREF(__pyx_v_self->cf_role);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->cf_role);
  if (unlikely(PyDict_SetItem(__pyx_v_output_dump, __pyx_n_u_cf_role, __pyx_t_4) < 0)) __PYX_ERR(0, 1282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1283
 * 
 *         output_dump["cf_role"]       = self.cf_role,
 *         output_dump["cf_dimensions"] = " ".join(self.cfa_dimensions),             # <<<<<<<<<<<<<<
 *         output_dump["cfa_array"]     = cfa_array_dict
 *         return output_dump
 */
  __pyx_t_4 = __pyx_v_self->cfa_dimensions;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__29, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1283, __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_ERR(0, 1283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  if (unlikely(PyDict_SetItem(__pyx_v_output_dump, __pyx_n_u_cf_dimensions, __pyx_t_4) < 0)) __PYX_ERR(0, 1283, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1284
 *         output_dump["cf_role"]       = self.cf_role,
 *         output_dump["cf_dimensions"] = " ".join(self.cfa_dimensions),
 *         output_dump["cfa_array"]     = cfa_array_dict             # <<<<<<<<<<<<<<
 *         return output_dump
 * 
 */
  if (unlikely(PyDict_SetItem(__pyx_v_output_dump, __pyx_n_u_cfa_array, __pyx_v_cfa_array_dict) < 0)) __PYX_ERR(0, 1284, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1285
 *         output_dump["cf_dimensions"] = " ".join(self.cfa_dimensions),
 *         output_dump["cfa_array"]     = cfa_array_dict
 *         return output_dump             # <<<<<<<<<<<<<<
 * 
 *     cpdef load(CFAVariable self, dict cfa_metadata, object nc_object):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_output_dump);
  __pyx_r = __pyx_v_output_dump;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1224
 *                 self.metadata[md_key] = cfa_metadata[md_key]
 * 
 *     cpdef dict dump(CFAVariable self):             # <<<<<<<<<<<<<<
 *         """Return the a dictionary representation of the CFAVariable so it can
 *            be added to the metadata for the variable later.
 */

  /* 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_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.dump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_output_dump);
  __Pyx_XDECREF(__pyx_v_cfa_array_dict);
  __Pyx_XDECREF(__pyx_v_partitions_list);
  __Pyx_XDECREF(__pyx_v_ncp);
  __Pyx_XDECREF(__pyx_v_it);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_ncvar);
  __Pyx_XDECREF(__pyx_v_shape);
  __Pyx_XDECREF(__pyx_v_file);
  __Pyx_XDECREF(__pyx_v_format);
  __Pyx_XDECREF(__pyx_v_location);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_partition_dict);
  __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_37dump(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_36dump[] = "Return the a dictionary representation of the CFAVariable so it can\n           be added to the metadata for the variable later.\n           Returns:\n               dict: the JSON representation of the CFAVariable\n        ";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_37dump(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dump (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_36dump(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_36dump(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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("dump", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_dump(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.dump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1287
 *         return output_dump
 * 
 *     cpdef load(CFAVariable self, dict cfa_metadata, object nc_object):             # <<<<<<<<<<<<<<
 *         """Load the CFA Variable definition from a CFA 0.5 definition of the
 *         Partitions and Subarrays.  These are contained in a group named
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_39load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_load(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_cfa_metadata, PyObject *__pyx_v_nc_object, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_pm_dimensions = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_load); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_39load)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_cfa_metadata, __pyx_v_nc_object};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1287, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_cfa_metadata, __pyx_v_nc_object};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1287, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1287, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_cfa_metadata);
          __Pyx_GIVEREF(__pyx_v_cfa_metadata);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_cfa_metadata);
          __Pyx_INCREF(__pyx_v_nc_object);
          __Pyx_GIVEREF(__pyx_v_nc_object);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_nc_object);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1287, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1299
 *         # check first if this is a cf_file - don't throw an exception if it's
 *         # not
 *         if not "cf_role" in cfa_metadata:             # <<<<<<<<<<<<<<
 *             self.cf_role = ""
 *             return
 */
  if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 1299, __pyx_L1_error)
  }
  __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_cf_role, __pyx_v_cfa_metadata, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1299, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1300
 *         # not
 *         if not "cf_role" in cfa_metadata:
 *             self.cf_role = ""             # <<<<<<<<<<<<<<
 *             return
 *         else:
 */
    __Pyx_INCREF(__pyx_kp_u__13);
    __Pyx_GIVEREF(__pyx_kp_u__13);
    __Pyx_GOTREF(__pyx_v_self->cf_role);
    __Pyx_DECREF(__pyx_v_self->cf_role);
    __pyx_v_self->cf_role = ((PyObject*)__pyx_kp_u__13);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1301
 *         if not "cf_role" in cfa_metadata:
 *             self.cf_role = ""
 *             return             # <<<<<<<<<<<<<<
 *         else:
 *             self.cf_role = cfa_metadata["cf_role"]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1299
 *         # check first if this is a cf_file - don't throw an exception if it's
 *         # not
 *         if not "cf_role" in cfa_metadata:             # <<<<<<<<<<<<<<
 *             self.cf_role = ""
 *             return
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1303
 *             return
 *         else:
 *             self.cf_role = cfa_metadata["cf_role"]             # <<<<<<<<<<<<<<
 * 
 *         # check that "cf_role", "cfa_dimensions" and "cfa_array" defined in
 */
  /*else*/ {
    if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1303, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_cfa_metadata, __pyx_n_u_cf_role); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1303, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_v_self->cf_role);
    __Pyx_DECREF(__pyx_v_self->cf_role);
    __pyx_v_self->cf_role = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1307
 *         # check that "cf_role", "cfa_dimensions" and "cfa_array" defined in
 *         # metadata
 *         if not ("cfa_dimensions" in cfa_metadata):             # <<<<<<<<<<<<<<
 *             raise CFADimensionError(
 *                       "cfa_dimensions or cf_dimensions not defined in {} "
 */
  if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 1307, __pyx_L1_error)
  }
  __pyx_t_8 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_cfa_dimensions, __pyx_v_cfa_metadata, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1307, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_8 != 0);
  if (unlikely(__pyx_t_7)) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1308
 *         # metadata
 *         if not ("cfa_dimensions" in cfa_metadata):
 *             raise CFADimensionError(             # <<<<<<<<<<<<<<
 *                       "cfa_dimensions or cf_dimensions not defined in {} "
 *                       "metadata".format(self.var_name)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CFADimensionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1310
 *             raise CFADimensionError(
 *                       "cfa_dimensions or cf_dimensions not defined in {} "
 *                       "metadata".format(self.var_name)             # <<<<<<<<<<<<<<
 *             )
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_cfa_dimensions_or_cf_dimensions, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_v_self->var_name) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_self->var_name);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __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_ERR(0, 1308, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1307
 *         # check that "cf_role", "cfa_dimensions" and "cfa_array" defined in
 *         # metadata
 *         if not ("cfa_dimensions" in cfa_metadata):             # <<<<<<<<<<<<<<
 *             raise CFADimensionError(
 *                       "cfa_dimensions or cf_dimensions not defined in {} "
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1313
 *             )
 * 
 *         if not "cfa_group" in cfa_metadata:             # <<<<<<<<<<<<<<
 *             raise CFAVariableError(
 *                       "cfa_group not defined in {} metadata".format(
 */
  if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 1313, __pyx_L1_error)
  }
  __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_cfa_group, __pyx_v_cfa_metadata, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (unlikely(__pyx_t_8)) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1314
 * 
 *         if not "cfa_group" in cfa_metadata:
 *             raise CFAVariableError(             # <<<<<<<<<<<<<<
 *                       "cfa_group not defined in {} metadata".format(
 *                           self.var_name)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CFAVariableError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1315
 *         if not "cfa_group" in cfa_metadata:
 *             raise CFAVariableError(
 *                       "cfa_group not defined in {} metadata".format(             # <<<<<<<<<<<<<<
 *                           self.var_name)
 *             )
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_cfa_group_not_defined_in_metadat, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1316
 *             raise CFAVariableError(
 *                       "cfa_group not defined in {} metadata".format(
 *                           self.var_name)             # <<<<<<<<<<<<<<
 *             )
 *         else:
 */
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_v_self->var_name) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_self->var_name);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __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_ERR(0, 1314, __pyx_L1_error)

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1313
 *             )
 * 
 *         if not "cfa_group" in cfa_metadata:             # <<<<<<<<<<<<<<
 *             raise CFAVariableError(
 *                       "cfa_group not defined in {} metadata".format(
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1320
 *         else:
 *             # get the group containing the partition information
 *             self.nc_partition_group = nc_object.groups[cfa_metadata["cfa_group"]]             # <<<<<<<<<<<<<<
 * 
 *         # read the variables from the group
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_nc_object, __pyx_n_s_groups); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_v_cfa_metadata == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1320, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_cfa_metadata, __pyx_n_u_cfa_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->nc_partition_group);
    __Pyx_DECREF(__pyx_v_self->nc_partition_group);
    __pyx_v_self->nc_partition_group = __pyx_t_3;
    __pyx_t_3 = 0;
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1323
 * 
 *         # read the variables from the group
 *         if "base" in self.nc_partition_group.variables:             # <<<<<<<<<<<<<<
 *             self.base = self.nc_partition_group.variables["base"][:]
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->nc_partition_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_base, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = (__pyx_t_8 != 0);
  if (__pyx_t_7) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1324
 *         # read the variables from the group
 *         if "base" in self.nc_partition_group.variables:
 *             self.base = self.nc_partition_group.variables["base"][:]             # <<<<<<<<<<<<<<
 * 
 *         if "pmshape" in self.nc_partition_group.variables:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->nc_partition_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __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, 0, 0, NULL, NULL, &__pyx_slice__19, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1324, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->base);
    __Pyx_DECREF(__pyx_v_self->base);
    __pyx_v_self->base = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1323
 * 
 *         # read the variables from the group
 *         if "base" in self.nc_partition_group.variables:             # <<<<<<<<<<<<<<
 *             self.base = self.nc_partition_group.variables["base"][:]
 * 
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1326
 *             self.base = self.nc_partition_group.variables["base"][:]
 * 
 *         if "pmshape" in self.nc_partition_group.variables:             # <<<<<<<<<<<<<<
 *             self.pmshape = self.nc_partition_group.variables["pmshape"][:]
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->nc_partition_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_pmshape, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1327
 * 
 *         if "pmshape" in self.nc_partition_group.variables:
 *             self.pmshape = self.nc_partition_group.variables["pmshape"][:]             # <<<<<<<<<<<<<<
 * 
 *         if "pmdimensions" in self.nc_partition_group.variables:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->nc_partition_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_pmshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __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, 0, 0, NULL, NULL, &__pyx_slice__19, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1327, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->pmshape);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->pmshape));
    __pyx_v_self->pmshape = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1326
 *             self.base = self.nc_partition_group.variables["base"][:]
 * 
 *         if "pmshape" in self.nc_partition_group.variables:             # <<<<<<<<<<<<<<
 *             self.pmshape = self.nc_partition_group.variables["pmshape"][:]
 * 
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1329
 *             self.pmshape = self.nc_partition_group.variables["pmshape"][:]
 * 
 *         if "pmdimensions" in self.nc_partition_group.variables:             # <<<<<<<<<<<<<<
 *             pm_dimensions = self.nc_partition_group.variables["pmdimensions"][:]
 *             self.pmdimensions = pm_dimensions.replace(" ", "").split(",")
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->nc_partition_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_pmdimensions, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1329, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = (__pyx_t_8 != 0);
  if (__pyx_t_7) {

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1330
 * 
 *         if "pmdimensions" in self.nc_partition_group.variables:
 *             pm_dimensions = self.nc_partition_group.variables["pmdimensions"][:]             # <<<<<<<<<<<<<<
 *             self.pmdimensions = pm_dimensions.replace(" ", "").split(",")
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->nc_partition_group, __pyx_n_s_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_pmdimensions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __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, 0, 0, NULL, NULL, &__pyx_slice__19, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_pm_dimensions = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1331
 *         if "pmdimensions" in self.nc_partition_group.variables:
 *             pm_dimensions = self.nc_partition_group.variables["pmdimensions"][:]
 *             self.pmdimensions = pm_dimensions.replace(" ", "").split(",")             # <<<<<<<<<<<<<<
 * 
 * cdef class CFADimension:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_pm_dimensions, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1331, __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_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_kp_u__31) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u__31);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->pmdimensions);
    __Pyx_DECREF(__pyx_v_self->pmdimensions);
    __pyx_v_self->pmdimensions = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1329
 *             self.pmshape = self.nc_partition_group.variables["pmshape"][:]
 * 
 *         if "pmdimensions" in self.nc_partition_group.variables:             # <<<<<<<<<<<<<<
 *             pm_dimensions = self.nc_partition_group.variables["pmdimensions"][:]
 *             self.pmdimensions = pm_dimensions.replace(" ", "").split(",")
 */
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1287
 *         return output_dump
 * 
 *     cpdef load(CFAVariable self, dict cfa_metadata, object nc_object):             # <<<<<<<<<<<<<<
 *         """Load the CFA Variable definition from a CFA 0.5 definition of the
 *         Partitions and Subarrays.  These are contained in a group named
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pm_dimensions);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_39load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_38load[] = "Load the CFA Variable definition from a CFA 0.5 definition of the\n        Partitions and Subarrays.  These are contained in a group named\n        \"cfa_<var_name>\", in a variable called \"<var_name>\" with pmdimensions\n        defined by the dimensions of the <var_name> variable and a pmshape\n        derived from the size of these dimensions.\n        nc_object is either a netCDF4.Dataset or netCDF4.Group";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_39load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cfa_metadata = 0;
  PyObject *__pyx_v_nc_object = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cfa_metadata,&__pyx_n_s_nc_object,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cfa_metadata)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nc_object)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("load", 1, 2, 2, 1); __PYX_ERR(0, 1287, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load") < 0)) __PYX_ERR(0, 1287, __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_cfa_metadata = ((PyObject*)values[0]);
    __pyx_v_nc_object = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("load", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1287, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cfa_metadata), (&PyDict_Type), 1, "cfa_metadata", 1))) __PYX_ERR(0, 1287, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_38load(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self), __pyx_v_cfa_metadata, __pyx_v_nc_object);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_38load(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v_cfa_metadata, PyObject *__pyx_v_nc_object) {
  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("load", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_load(__pyx_v_self, __pyx_v_cfa_metadata, __pyx_v_nc_object, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __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("S3netCDF4.CFA._CFAClasses.CFAVariable.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":671
 *     """
 * 
 *     cdef public basestring var_name             # <<<<<<<<<<<<<<
 *     cdef CFAGroup group
 *     cdef np.dtype nc_dtype
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name___get__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name___get__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->var_name);
  __pyx_r = __pyx_v_self->var_name;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_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_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_2__set__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_2__set__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, 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);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 671, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->var_name);
  __Pyx_DECREF(__pyx_v_self->var_name);
  __pyx_v_self->var_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.var_name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_4__del__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_4__del__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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->var_name);
  __Pyx_DECREF(__pyx_v_self->var_name);
  __pyx_v_self->var_name = ((PyObject*)Py_None);

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

/* "S3netCDF4/CFA/_CFAClasses.pyx":674
 *     cdef CFAGroup group
 *     cdef np.dtype nc_dtype
 *     cdef public dict metadata             # <<<<<<<<<<<<<<
 *     cdef basestring cf_role
 *     cdef list cfa_dimensions
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata___get__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata___get__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->metadata);
  __pyx_r = __pyx_v_self->metadata;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_2__set__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_2__set__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, 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);
  if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 674, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->metadata);
  __Pyx_DECREF(__pyx_v_self->metadata);
  __pyx_v_self->metadata = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.metadata.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_4__del__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_4__del__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__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->metadata);
  __Pyx_DECREF(__pyx_v_self->metadata);
  __pyx_v_self->metadata = ((PyObject*)Py_None);

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_41__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_41__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_40__reduce_cython__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_40__reduce_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __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("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._shape, self.base, self.cf_role, self.cfa_dimensions, self.group, self.metadata, self.nc_dtype, self.nc_partition_group, self.pmdimensions, self.pmshape, self.subarray_shape, self.var_name)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(12); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_shape));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_shape));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->_shape));
  __Pyx_INCREF(__pyx_v_self->base);
  __Pyx_GIVEREF(__pyx_v_self->base);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->base);
  __Pyx_INCREF(__pyx_v_self->cf_role);
  __Pyx_GIVEREF(__pyx_v_self->cf_role);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->cf_role);
  __Pyx_INCREF(__pyx_v_self->cfa_dimensions);
  __Pyx_GIVEREF(__pyx_v_self->cfa_dimensions);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->cfa_dimensions);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->group));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->group));
  PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_v_self->group));
  __Pyx_INCREF(__pyx_v_self->metadata);
  __Pyx_GIVEREF(__pyx_v_self->metadata);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->metadata);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->nc_dtype));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->nc_dtype));
  PyTuple_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_v_self->nc_dtype));
  __Pyx_INCREF(__pyx_v_self->nc_partition_group);
  __Pyx_GIVEREF(__pyx_v_self->nc_partition_group);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_self->nc_partition_group);
  __Pyx_INCREF(__pyx_v_self->pmdimensions);
  __Pyx_GIVEREF(__pyx_v_self->pmdimensions);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_v_self->pmdimensions);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->pmshape));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->pmshape));
  PyTuple_SET_ITEM(__pyx_t_1, 9, ((PyObject *)__pyx_v_self->pmshape));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->subarray_shape));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->subarray_shape));
  PyTuple_SET_ITEM(__pyx_t_1, 10, ((PyObject *)__pyx_v_self->subarray_shape));
  __Pyx_INCREF(__pyx_v_self->var_name);
  __Pyx_GIVEREF(__pyx_v_self->var_name);
  PyTuple_SET_ITEM(__pyx_t_1, 11, __pyx_v_self->var_name);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._shape, self.base, self.cf_role, self.cfa_dimensions, self.group, self.metadata, self.nc_dtype, self.nc_partition_group, self.pmdimensions, self.pmshape, self.subarray_shape, self.var_name)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._shape, self.base, self.cf_role, self.cfa_dimensions, self.group, self.metadata, self.nc_dtype, self.nc_partition_group, self.pmdimensions, self.pmshape, self.subarray_shape, self.var_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._shape is not None or self.base is not None or self.cf_role is not None or self.cfa_dimensions is not None or self.group is not None or self.metadata is not None or self.nc_dtype is not None or self.nc_partition_group is not None or self.pmdimensions is not None or self.pmshape is not None or self.subarray_shape is not None or self.var_name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._shape, self.base, self.cf_role, self.cfa_dimensions, self.group, self.metadata, self.nc_dtype, self.nc_partition_group, self.pmdimensions, self.pmshape, self.subarray_shape, self.var_name)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._shape is not None or self.base is not None or self.cf_role is not None or self.cfa_dimensions is not None or self.group is not None or self.metadata is not None or self.nc_dtype is not None or self.nc_partition_group is not None or self.pmdimensions is not None or self.pmshape is not None or self.subarray_shape is not None or self.var_name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CFAVariable, (type(self), 0x2c9008d, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->_shape) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->base != ((PyObject*)Py_None));
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->cf_role != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->cfa_dimensions != ((PyObject*)Py_None));
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (((PyObject *)__pyx_v_self->group) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->metadata != ((PyObject*)Py_None));
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (((PyObject *)__pyx_v_self->nc_dtype) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->nc_partition_group != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->pmdimensions != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->pmshape) != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (((PyObject *)__pyx_v_self->subarray_shape) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->var_name != ((PyObject*)Py_None));
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._shape is not None or self.base is not None or self.cf_role is not None or self.cfa_dimensions is not None or self.group is not None or self.metadata is not None or self.nc_dtype is not None or self.nc_partition_group is not None or self.pmdimensions is not None or self.pmshape is not None or self.subarray_shape is not None or self.var_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CFAVariable, (type(self), 0x2c9008d, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._shape is not None or self.base is not None or self.cf_role is not None or self.cfa_dimensions is not None or self.group is not None or self.metadata is not None or self.nc_dtype is not None or self.nc_partition_group is not None or self.pmdimensions is not None or self.pmshape is not None or self.subarray_shape is not None or self.var_name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_CFAVariable, (type(self), 0x2c9008d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CFAVariable, (type(self), 0x2c9008d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_CFAVariable); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_46727309);
    __Pyx_GIVEREF(__pyx_int_46727309);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_46727309);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._shape is not None or self.base is not None or self.cf_role is not None or self.cfa_dimensions is not None or self.group is not None or self.metadata is not None or self.nc_dtype is not None or self.nc_partition_group is not None or self.pmdimensions is not None or self.pmshape is not None or self.subarray_shape is not None or self.var_name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CFAVariable, (type(self), 0x2c9008d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CFAVariable, (type(self), 0x2c9008d, None), state
 *     else:
 *         return __pyx_unpickle_CFAVariable, (type(self), 0x2c9008d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CFAVariable__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_CFAVariable); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_46727309);
    __Pyx_GIVEREF(__pyx_int_46727309);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_46727309);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CFAVariable, (type(self), 0x2c9008d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CFAVariable__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_43__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_43__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_42__setstate_cython__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_42__setstate_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_CFAVariable, (type(self), 0x2c9008d, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CFAVariable__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFAVariable__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CFAVariable, (type(self), 0x2c9008d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CFAVariable__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFAVariable.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1361
 *     cdef np.dtype nc_dtype
 * 
 *     def __init__(CFADimension self,             # <<<<<<<<<<<<<<
 *                  basestring dim_name="",
 *                  int dim_len=-1,
 */

/* Python wrapper */
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension___init__[] = "Initialise the CFADim object";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension___init__;
#endif
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dim_name = 0;
  int __pyx_v_dim_len;
  PyObject *__pyx_v_axis_type = 0;
  PyObject *__pyx_v_metadata = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dim_name,&__pyx_n_s_dim_len,&__pyx_n_s_axis_type,&__pyx_n_s_metadata,0};
    PyObject* values[4] = {0,0,0,0};
    values[0] = ((PyObject*)__pyx_kp_u__13);
    values[2] = ((PyObject*)__pyx_n_u_U);
    values[3] = __pyx_k__32;
    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);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dim_name);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dim_len);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_axis_type);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_metadata);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1361, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dim_name = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_dim_len = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dim_len == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1363, __pyx_L3_error)
    } else {
      __pyx_v_dim_len = ((int)-1);
    }
    __pyx_v_axis_type = ((PyObject*)values[2]);
    __pyx_v_metadata = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1361, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dim_name), (&PyBaseString_Type), 1, "dim_name", 1))) __PYX_ERR(0, 1362, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_axis_type), (&PyBaseString_Type), 1, "axis_type", 1))) __PYX_ERR(0, 1364, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_metadata), (&PyDict_Type), 1, "metadata", 1))) __PYX_ERR(0, 1365, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension___init__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self), __pyx_v_dim_name, __pyx_v_dim_len, __pyx_v_axis_type, __pyx_v_metadata);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension___init__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, PyObject *__pyx_v_dim_name, int __pyx_v_dim_len, PyObject *__pyx_v_axis_type, PyObject *__pyx_v_metadata) {
  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("__init__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1368
 *                 ):
 *         """Initialise the CFADim object"""
 *         self.dim_name = basestring(dim_name)             # <<<<<<<<<<<<<<
 *         self.dim_len = int(dim_len)
 *         self.metadata = dict(metadata)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBaseString_Type)), __pyx_v_dim_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->dim_name);
  __Pyx_DECREF(__pyx_v_self->dim_name);
  __pyx_v_self->dim_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1369
 *         """Initialise the CFADim object"""
 *         self.dim_name = basestring(dim_name)
 *         self.dim_len = int(dim_len)             # <<<<<<<<<<<<<<
 *         self.metadata = dict(metadata)
 *         self.axis_type = basestring(axis_type)
 */
  __pyx_v_self->dim_len = __pyx_v_dim_len;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1370
 *         self.dim_name = basestring(dim_name)
 *         self.dim_len = int(dim_len)
 *         self.metadata = dict(metadata)             # <<<<<<<<<<<<<<
 *         self.axis_type = basestring(axis_type)
 * 
 */
  if (unlikely(__pyx_v_metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    __PYX_ERR(0, 1370, __pyx_L1_error)
  }
  __pyx_t_1 = PyDict_Copy(__pyx_v_metadata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->metadata);
  __Pyx_DECREF(__pyx_v_self->metadata);
  __pyx_v_self->metadata = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1371
 *         self.dim_len = int(dim_len)
 *         self.metadata = dict(metadata)
 *         self.axis_type = basestring(axis_type)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(CFADimension self):
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBaseString_Type)), __pyx_v_axis_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->axis_type);
  __Pyx_DECREF(__pyx_v_self->axis_type);
  __pyx_v_self->axis_type = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1361
 *     cdef np.dtype nc_dtype
 * 
 *     def __init__(CFADimension self,             # <<<<<<<<<<<<<<
 *                  basestring dim_name="",
 *                  int dim_len=-1,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADimension.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1373
 *         self.axis_type = basestring(axis_type)
 * 
 *     def __repr__(CFADimension self):             # <<<<<<<<<<<<<<
 *         """String representation of the CFADimension."""
 *         repstr = repr(type(self)) + (" : name = {} : length = {} : "
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_3__repr__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_2__repr__[] = "String representation of the CFADimension.";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_2__repr__;
#endif
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_2__repr__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_2__repr__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self) {
  PyObject *__pyx_v_repstr = NULL;
  PyObject *__pyx_v_md = 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;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1375
 *     def __repr__(CFADimension self):
 *         """String representation of the CFADimension."""
 *         repstr = repr(type(self)) + (" : name = {} : length = {} : "             # <<<<<<<<<<<<<<
 *                       "axis_type = {}\n").format(
 *                           self.dim_name,
 */
  __pyx_t_1 = PyObject_Repr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1376
 *         """String representation of the CFADimension."""
 *         repstr = repr(type(self)) + (" : name = {} : length = {} : "
 *                       "axis_type = {}\n").format(             # <<<<<<<<<<<<<<
 *                           self.dim_name,
 *                           self.dim_len,
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_name_length_axis_type, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1378
 *                       "axis_type = {}\n").format(
 *                           self.dim_name,
 *                           self.dim_len,             # <<<<<<<<<<<<<<
 *                           self.axis_type
 *                       )
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->dim_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1379
 *                           self.dim_name,
 *                           self.dim_len,
 *                           self.axis_type             # <<<<<<<<<<<<<<
 *                       )
 *         for md in self.metadata:
 */
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self->dim_name, __pyx_t_4, __pyx_v_self->axis_type};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self->dim_name, __pyx_t_4, __pyx_v_self->axis_type};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self->dim_name);
    __Pyx_GIVEREF(__pyx_v_self->dim_name);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self->dim_name);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_self->axis_type);
    __Pyx_GIVEREF(__pyx_v_self->axis_type);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_self->axis_type);
    __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __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;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1375
 *     def __repr__(CFADimension self):
 *         """String representation of the CFADimension."""
 *         repstr = repr(type(self)) + (" : name = {} : length = {} : "             # <<<<<<<<<<<<<<
 *                       "axis_type = {}\n").format(
 *                           self.dim_name,
 */
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_repstr = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1381
 *                           self.axis_type
 *                       )
 *         for md in self.metadata:             # <<<<<<<<<<<<<<
 *             repstr += "\t{} : {}\n".format(md, self.metadata[md])
 *         return repstr[:-1]
 */
  __pyx_t_8 = 0;
  if (unlikely(__pyx_v_self->metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 1381, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->metadata, 1, ((PyObject *)NULL), (&__pyx_t_9), (&__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __pyx_t_3 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_9, &__pyx_t_8, &__pyx_t_2, NULL, NULL, __pyx_t_6);
    if (unlikely(__pyx_t_10 == 0)) break;
    if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_md, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1382
 *                       )
 *         for md in self.metadata:
 *             repstr += "\t{} : {}\n".format(md, self.metadata[md])             # <<<<<<<<<<<<<<
 *         return repstr[:-1]
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__3, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_v_self->metadata == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1382, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_self->metadata, __pyx_v_md); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_md, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1382, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_md, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1382, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1382, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_md);
      __Pyx_GIVEREF(__pyx_v_md);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_10, __pyx_v_md);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_10, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1382, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_repstr, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_repstr, __pyx_t_1);
    __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1383
 *         for md in self.metadata:
 *             repstr += "\t{} : {}\n".format(md, self.metadata[md])
 *         return repstr[:-1]             # <<<<<<<<<<<<<<
 * 
 *     cpdef dict dump(CFADimension self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_repstr, 0, -1L, NULL, NULL, &__pyx_slice__4, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1373
 *         self.axis_type = basestring(axis_type)
 * 
 *     def __repr__(CFADimension self):             # <<<<<<<<<<<<<<
 *         """String representation of the CFADimension."""
 *         repstr = repr(type(self)) + (" : name = {} : length = {} : "
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADimension.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_repstr);
  __Pyx_XDECREF(__pyx_v_md);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1385
 *         return repstr[:-1]
 * 
 *     cpdef dict dump(CFADimension self):             # <<<<<<<<<<<<<<
 *         """Return a dictionary representation of the CFADim
 *            Returns:
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_5dump(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_dump(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_output_dump = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dump", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dump); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_5dump)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1385, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1390
 *                dict: the JSON representation of the CFADimension
 *         """
 *         output_dump = {"dim_name" : self.dim_name,             # <<<<<<<<<<<<<<
 *                        "dim_len"  : self.dim_len}
 *         # add the other metadata
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_dim_name, __pyx_v_self->dim_name) < 0) __PYX_ERR(0, 1390, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1391
 *         """
 *         output_dump = {"dim_name" : self.dim_name,
 *                        "dim_len"  : self.dim_len}             # <<<<<<<<<<<<<<
 *         # add the other metadata
 *         for k in self.metadata:
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->dim_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_dim_len, __pyx_t_2) < 0) __PYX_ERR(0, 1390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_output_dump = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1393
 *                        "dim_len"  : self.dim_len}
 *         # add the other metadata
 *         for k in self.metadata:             # <<<<<<<<<<<<<<
 *             output_dump[k] = self.metadata[k]
 *         return output_dump
 */
  __pyx_t_5 = 0;
  if (unlikely(__pyx_v_self->metadata == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 1393, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->metadata, 1, ((PyObject *)NULL), (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_6, &__pyx_t_5, &__pyx_t_2, NULL, NULL, __pyx_t_7);
    if (unlikely(__pyx_t_8 == 0)) break;
    if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "S3netCDF4/CFA/_CFAClasses.pyx":1394
 *         # add the other metadata
 *         for k in self.metadata:
 *             output_dump[k] = self.metadata[k]             # <<<<<<<<<<<<<<
 *         return output_dump
 * 
 */
    if (unlikely(__pyx_v_self->metadata == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1394, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->metadata, __pyx_v_k); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(PyDict_SetItem(__pyx_v_output_dump, __pyx_v_k, __pyx_t_2) < 0)) __PYX_ERR(0, 1394, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1395
 *         for k in self.metadata:
 *             output_dump[k] = self.metadata[k]
 *         return output_dump             # <<<<<<<<<<<<<<
 * 
 *     cpdef np.dtype getType(CFADimension self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_output_dump);
  __pyx_r = __pyx_v_output_dump;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1385
 *         return repstr[:-1]
 * 
 *     cpdef dict dump(CFADimension self):             # <<<<<<<<<<<<<<
 *         """Return a dictionary representation of the CFADim
 *            Returns:
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFADimension.dump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_output_dump);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_5dump(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_4dump[] = "Return a dictionary representation of the CFADim\n           Returns:\n               dict: the JSON representation of the CFADimension\n        ";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_5dump(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dump (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_4dump(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_4dump(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__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("dump", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_dump(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __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("S3netCDF4.CFA._CFAClasses.CFADimension.dump", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1397
 *         return output_dump
 * 
 *     cpdef np.dtype getType(CFADimension self):             # <<<<<<<<<<<<<<
 *         """Return the type of the dimension."""
 *         return self.nc_dtype
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_7getType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyArray_Descr *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, int __pyx_skip_dispatch) {
  PyArray_Descr *__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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getType", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_7getType)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1397, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(0, 1397, __pyx_L1_error)
        __pyx_r = ((PyArray_Descr *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1399
 *     cpdef np.dtype getType(CFADimension self):
 *         """Return the type of the dimension."""
 *         return self.nc_dtype             # <<<<<<<<<<<<<<
 * 
 *     cpdef setType(CFADimension self, np.dtype dtype):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->nc_dtype));
  __pyx_r = __pyx_v_self->nc_dtype;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1397
 *         return output_dump
 * 
 *     cpdef np.dtype getType(CFADimension self):             # <<<<<<<<<<<<<<
 *         """Return the type of the dimension."""
 *         return self.nc_dtype
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFADimension.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_7getType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_6getType[] = "Return the type of the dimension.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_7getType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getType (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_6getType(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_6getType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__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("getType", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getType(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __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("S3netCDF4.CFA._CFAClasses.CFADimension.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1401
 *         return self.nc_dtype
 * 
 *     cpdef setType(CFADimension self, np.dtype dtype):             # <<<<<<<<<<<<<<
 *         """Set the type of the dimension."""
 *         self.nc_dtype = dtype
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_9setType(PyObject *__pyx_v_self, PyObject *__pyx_v_dtype); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_setType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, PyArray_Descr *__pyx_v_dtype, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setType", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_9setType)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_dtype)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_dtype));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1403
 *     cpdef setType(CFADimension self, np.dtype dtype):
 *         """Set the type of the dimension."""
 *         self.nc_dtype = dtype             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring getName(CFADimension self):
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_dtype));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_dtype));
  __Pyx_GOTREF(__pyx_v_self->nc_dtype);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->nc_dtype));
  __pyx_v_self->nc_dtype = __pyx_v_dtype;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1401
 *         return self.nc_dtype
 * 
 *     cpdef setType(CFADimension self, np.dtype dtype):             # <<<<<<<<<<<<<<
 *         """Set the type of the dimension."""
 *         self.nc_dtype = dtype
 */

  /* 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_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADimension.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_9setType(PyObject *__pyx_v_self, PyObject *__pyx_v_dtype); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8setType[] = "Set the type of the dimension.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_9setType(PyObject *__pyx_v_self, PyObject *__pyx_v_dtype) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setType (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dtype), __pyx_ptype_5numpy_dtype, 1, "dtype", 0))) __PYX_ERR(0, 1401, __pyx_L1_error)
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8setType(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self), ((PyArray_Descr *)__pyx_v_dtype));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8setType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, PyArray_Descr *__pyx_v_dtype) {
  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("setType", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_setType(__pyx_v_self, __pyx_v_dtype, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __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("S3netCDF4.CFA._CFAClasses.CFADimension.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1405
 *         self.nc_dtype = dtype
 * 
 *     cpdef basestring getName(CFADimension self):             # <<<<<<<<<<<<<<
 *         """Return the name of the dimension."""
 *         return self.dim_name
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_11getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getName", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getName); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_11getName)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1405, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1405, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1407
 *     cpdef basestring getName(CFADimension self):
 *         """Return the name of the dimension."""
 *         return self.dim_name             # <<<<<<<<<<<<<<
 * 
 *     cpdef dict getMetadata(CFADimension self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->dim_name);
  __pyx_r = __pyx_v_self->dim_name;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1405
 *         self.nc_dtype = dtype
 * 
 *     cpdef basestring getName(CFADimension self):             # <<<<<<<<<<<<<<
 *         """Return the name of the dimension."""
 *         return self.dim_name
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFADimension.getName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_11getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_10getName[] = "Return the name of the dimension.";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_11getName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getName (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_10getName(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_10getName(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__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("getName", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getName(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __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("S3netCDF4.CFA._CFAClasses.CFADimension.getName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1409
 *         return self.dim_name
 * 
 *     cpdef dict getMetadata(CFADimension self):             # <<<<<<<<<<<<<<
 *         """Return a dictionary of the metadata for the dimension"""
 *         return self.metadata
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_13getMetadata(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getMetadata", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMetadata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_13getMetadata)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1409, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1409, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1411
 *     cpdef dict getMetadata(CFADimension self):
 *         """Return a dictionary of the metadata for the dimension"""
 *         return self.metadata             # <<<<<<<<<<<<<<
 * 
 *     cpdef int getLen(CFADimension self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->metadata);
  __pyx_r = __pyx_v_self->metadata;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1409
 *         return self.dim_name
 * 
 *     cpdef dict getMetadata(CFADimension self):             # <<<<<<<<<<<<<<
 *         """Return a dictionary of the metadata for the dimension"""
 *         return self.metadata
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFADimension.getMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_13getMetadata(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_12getMetadata[] = "Return a dictionary of the metadata for the dimension";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_13getMetadata(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMetadata (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_12getMetadata(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_12getMetadata(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__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("getMetadata", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getMetadata(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __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("S3netCDF4.CFA._CFAClasses.CFADimension.getMetadata", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1413
 *         return self.metadata
 * 
 *     cpdef int getLen(CFADimension self):             # <<<<<<<<<<<<<<
 *         """Return the length of the dimension"""
 *         return self.dim_len
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_15getLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getLen(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getLen", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_15getLen)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1413, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1413, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1415
 *     cpdef int getLen(CFADimension self):
 *         """Return the length of the dimension"""
 *         return self.dim_len             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring getAxisType(CFADimension self):
 */
  __pyx_r = __pyx_v_self->dim_len;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1413
 *         return self.metadata
 * 
 *     cpdef int getLen(CFADimension self):             # <<<<<<<<<<<<<<
 *         """Return the length of the dimension"""
 *         return self.dim_len
 */

  /* 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_WriteUnraisable("S3netCDF4.CFA._CFAClasses.CFADimension.getLen", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_15getLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_14getLen[] = "Return the length of the dimension";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_15getLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getLen (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_14getLen(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_14getLen(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__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("getLen", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getLen(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __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("S3netCDF4.CFA._CFAClasses.CFADimension.getLen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1417
 *         return self.dim_len
 * 
 *     cpdef basestring getAxisType(CFADimension self):             # <<<<<<<<<<<<<<
 *         """Return the axis type, this should be one of:
 *             X - X axis (e.g. longitude)
 */

static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_17getAxisType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getAxisType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, int __pyx_skip_dispatch) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getAxisType", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getAxisType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_17getAxisType)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1417, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1417, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1425
 *             N - None of the above axis (e.g. ensemble member)
 *         """
 *         return self.axis_type             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->axis_type);
  __pyx_r = __pyx_v_self->axis_type;
  goto __pyx_L0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1417
 *         return self.dim_len
 * 
 *     cpdef basestring getAxisType(CFADimension self):             # <<<<<<<<<<<<<<
 *         """Return the axis type, this should be one of:
 *             X - X axis (e.g. longitude)
 */

  /* 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("S3netCDF4.CFA._CFAClasses.CFADimension.getAxisType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_17getAxisType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_16getAxisType[] = "Return the axis type, this should be one of:\n            X - X axis (e.g. longitude)\n            Y - Y axis (e.g. latitude)\n            Z - Z axis (e.g. height above sea-level)\n            T - Time axis\n            N - None of the above axis (e.g. ensemble member)\n        ";
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_17getAxisType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getAxisType (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_16getAxisType(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_16getAxisType(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__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("getAxisType", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getAxisType(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __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("S3netCDF4.CFA._CFAClasses.CFADimension.getAxisType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "S3netCDF4/CFA/_CFAClasses.pyx":1357
 *     cdef basestring dim_name
 *     cdef int dim_len
 *     cdef public dict metadata             # <<<<<<<<<<<<<<
 *     cdef basestring axis_type
 *     cdef np.dtype nc_dtype
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata___get__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata___get__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->metadata);
  __pyx_r = __pyx_v_self->metadata;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_2__set__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_2__set__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, 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);
  if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1357, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->metadata);
  __Pyx_DECREF(__pyx_v_self->metadata);
  __pyx_v_self->metadata = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADimension.metadata.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_4__del__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self));

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

static int __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_4__del__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__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->metadata);
  __Pyx_DECREF(__pyx_v_self->metadata);
  __pyx_v_self->metadata = ((PyObject*)Py_None);

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_18__reduce_cython__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_18__reduce_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.axis_type, self.dim_len, self.dim_name, self.metadata, self.nc_dtype)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->dim_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->axis_type);
  __Pyx_GIVEREF(__pyx_v_self->axis_type);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->axis_type);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->dim_name);
  __Pyx_GIVEREF(__pyx_v_self->dim_name);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->dim_name);
  __Pyx_INCREF(__pyx_v_self->metadata);
  __Pyx_GIVEREF(__pyx_v_self->metadata);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->metadata);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->nc_dtype));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->nc_dtype));
  PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_v_self->nc_dtype));
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.axis_type, self.dim_len, self.dim_name, self.metadata, self.nc_dtype)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self.axis_type, self.dim_len, self.dim_name, self.metadata, self.nc_dtype)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.axis_type is not None or self.dim_name is not None or self.metadata is not None or self.nc_dtype is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.axis_type, self.dim_len, self.dim_name, self.metadata, self.nc_dtype)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.axis_type is not None or self.dim_name is not None or self.metadata is not None or self.nc_dtype is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CFADimension, (type(self), 0x2afd349, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->axis_type != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->dim_name != ((PyObject*)Py_None));
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (__pyx_v_self->metadata != ((PyObject*)Py_None));
    __pyx_t_5 = (__pyx_t_3 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->nc_dtype) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    __pyx_t_4 = __pyx_t_3;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.axis_type is not None or self.dim_name is not None or self.metadata is not None or self.nc_dtype is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CFADimension, (type(self), 0x2afd349, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.axis_type is not None or self.dim_name is not None or self.metadata is not None or self.nc_dtype is not None
 *     if use_setstate:
 *         return __pyx_unpickle_CFADimension, (type(self), 0x2afd349, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CFADimension, (type(self), 0x2afd349, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_CFADimension); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_45077321);
    __Pyx_GIVEREF(__pyx_int_45077321);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_45077321);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.axis_type is not None or self.dim_name is not None or self.metadata is not None or self.nc_dtype is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CFADimension, (type(self), 0x2afd349, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CFADimension, (type(self), 0x2afd349, None), state
 *     else:
 *         return __pyx_unpickle_CFADimension, (type(self), 0x2afd349, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CFADimension__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_CFADimension); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_45077321);
    __Pyx_GIVEREF(__pyx_int_45077321);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_45077321);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADimension.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CFADimension, (type(self), 0x2afd349, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CFADimension__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_20__setstate_cython__(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_20__setstate_cython__(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_CFADimension, (type(self), 0x2afd349, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CFADimension__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFADimension__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CFADimension, (type(self), 0x2afd349, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CFADimension__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.CFADimension.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_CFADataset(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_1__pyx_unpickle_CFADataset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9S3netCDF4_3CFA_11_CFAClasses_1__pyx_unpickle_CFADataset = {"__pyx_unpickle_CFADataset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_1__pyx_unpickle_CFADataset, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_1__pyx_unpickle_CFADataset(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CFADataset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,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);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CFADataset", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CFADataset", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CFADataset") < 0)) __PYX_ERR(1, 1, __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___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CFADataset", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.__pyx_unpickle_CFADataset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFADataset(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFADataset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CFADataset", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xac13b3c:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xac13b3c = (cfa_groups, cfa_version, format, metadata, name))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xac13b3c) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xac13b3c:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xac13b3c = (cfa_groups, cfa_version, format, metadata, name))" % __pyx_checksum)
 *     __pyx_result = CFADataset.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xac13b3c:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xac13b3c = (cfa_groups, cfa_version, format, metadata, name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CFADataset.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xac, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xac13b3c:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xac13b3c = (cfa_groups, cfa_version, format, metadata, name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xac13b3c = (cfa_groups, cfa_version, format, metadata, name))" % __pyx_checksum)
 *     __pyx_result = CFADataset.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CFADataset__set_state(<CFADataset> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADataset), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xac13b3c = (cfa_groups, cfa_version, format, metadata, name))" % __pyx_checksum)
 *     __pyx_result = CFADataset.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CFADataset__set_state(<CFADataset> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = CFADataset.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CFADataset__set_state(<CFADataset> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CFADataset__set_state(CFADataset __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFADataset__set_state(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xac13b3c = (cfa_groups, cfa_version, format, metadata, name))" % __pyx_checksum)
 *     __pyx_result = CFADataset.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CFADataset__set_state(<CFADataset> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CFADataset__set_state(<CFADataset> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CFADataset__set_state(CFADataset __pyx_result, tuple __pyx_state):
 *     __pyx_result.cfa_groups = __pyx_state[0]; __pyx_result.cfa_version = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.name = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CFADataset(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.__pyx_unpickle_CFADataset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_CFADataset__set_state(<CFADataset> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CFADataset__set_state(CFADataset __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.cfa_groups = __pyx_state[0]; __pyx_result.cfa_version = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.name = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFADataset__set_state(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CFADataset__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CFADataset__set_state(CFADataset __pyx_result, tuple __pyx_state):
 *     __pyx_result.cfa_groups = __pyx_state[0]; __pyx_result.cfa_version = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.name = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->cfa_groups);
  __Pyx_DECREF(__pyx_v___pyx_result->cfa_groups);
  __pyx_v___pyx_result->cfa_groups = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->cfa_version);
  __Pyx_DECREF(__pyx_v___pyx_result->cfa_version);
  __pyx_v___pyx_result->cfa_version = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->format);
  __Pyx_DECREF(__pyx_v___pyx_result->format);
  __pyx_v___pyx_result->format = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->metadata);
  __Pyx_DECREF(__pyx_v___pyx_result->metadata);
  __pyx_v___pyx_result->metadata = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->name);
  __Pyx_DECREF(__pyx_v___pyx_result->name);
  __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_CFADataset__set_state(CFADataset __pyx_result, tuple __pyx_state):
 *     __pyx_result.cfa_groups = __pyx_state[0]; __pyx_result.cfa_version = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.name = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 5) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.cfa_groups = __pyx_state[0]; __pyx_result.cfa_version = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.name = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_CFADataset__set_state(CFADataset __pyx_result, tuple __pyx_state):
 *     __pyx_result.cfa_groups = __pyx_state[0]; __pyx_result.cfa_version = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.name = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_CFADataset__set_state(<CFADataset> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CFADataset__set_state(CFADataset __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.cfa_groups = __pyx_state[0]; __pyx_result.cfa_version = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.name = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.__pyx_unpickle_CFADataset__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_CFAGroup(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_3__pyx_unpickle_CFAGroup(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9S3netCDF4_3CFA_11_CFAClasses_3__pyx_unpickle_CFAGroup = {"__pyx_unpickle_CFAGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_3__pyx_unpickle_CFAGroup, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_3__pyx_unpickle_CFAGroup(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CFAGroup (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,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);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CFAGroup", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CFAGroup", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CFAGroup") < 0)) __PYX_ERR(1, 1, __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___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CFAGroup", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.__pyx_unpickle_CFAGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_2__pyx_unpickle_CFAGroup(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_2__pyx_unpickle_CFAGroup(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CFAGroup", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x19ace02:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x19ace02 = (cfa_dims, cfa_vars, dataset, grp_name, metadata))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x19ace02) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x19ace02:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x19ace02 = (cfa_dims, cfa_vars, dataset, grp_name, metadata))" % __pyx_checksum)
 *     __pyx_result = CFAGroup.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x19ace02:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x19ace02 = (cfa_dims, cfa_vars, dataset, grp_name, metadata))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CFAGroup.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x19, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x19ace02:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x19ace02 = (cfa_dims, cfa_vars, dataset, grp_name, metadata))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x19ace02 = (cfa_dims, cfa_vars, dataset, grp_name, metadata))" % __pyx_checksum)
 *     __pyx_result = CFAGroup.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CFAGroup__set_state(<CFAGroup> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x19ace02 = (cfa_dims, cfa_vars, dataset, grp_name, metadata))" % __pyx_checksum)
 *     __pyx_result = CFAGroup.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CFAGroup__set_state(<CFAGroup> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = CFAGroup.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CFAGroup__set_state(<CFAGroup> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CFAGroup__set_state(CFAGroup __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFAGroup__set_state(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x19ace02 = (cfa_dims, cfa_vars, dataset, grp_name, metadata))" % __pyx_checksum)
 *     __pyx_result = CFAGroup.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CFAGroup__set_state(<CFAGroup> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CFAGroup__set_state(<CFAGroup> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CFAGroup__set_state(CFAGroup __pyx_result, tuple __pyx_state):
 *     __pyx_result.cfa_dims = __pyx_state[0]; __pyx_result.cfa_vars = __pyx_state[1]; __pyx_result.dataset = __pyx_state[2]; __pyx_result.grp_name = __pyx_state[3]; __pyx_result.metadata = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CFAGroup(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.__pyx_unpickle_CFAGroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_CFAGroup__set_state(<CFAGroup> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CFAGroup__set_state(CFAGroup __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.cfa_dims = __pyx_state[0]; __pyx_result.cfa_vars = __pyx_state[1]; __pyx_result.dataset = __pyx_state[2]; __pyx_result.grp_name = __pyx_state[3]; __pyx_result.metadata = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFAGroup__set_state(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CFAGroup__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CFAGroup__set_state(CFAGroup __pyx_result, tuple __pyx_state):
 *     __pyx_result.cfa_dims = __pyx_state[0]; __pyx_result.cfa_vars = __pyx_state[1]; __pyx_result.dataset = __pyx_state[2]; __pyx_result.grp_name = __pyx_state[3]; __pyx_result.metadata = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->cfa_dims);
  __Pyx_DECREF(__pyx_v___pyx_result->cfa_dims);
  __pyx_v___pyx_result->cfa_dims = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->cfa_vars);
  __Pyx_DECREF(__pyx_v___pyx_result->cfa_vars);
  __pyx_v___pyx_result->cfa_vars = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADataset))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->dataset);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->dataset));
  __pyx_v___pyx_result->dataset = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->grp_name);
  __Pyx_DECREF(__pyx_v___pyx_result->grp_name);
  __pyx_v___pyx_result->grp_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->metadata);
  __Pyx_DECREF(__pyx_v___pyx_result->metadata);
  __pyx_v___pyx_result->metadata = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_CFAGroup__set_state(CFAGroup __pyx_result, tuple __pyx_state):
 *     __pyx_result.cfa_dims = __pyx_state[0]; __pyx_result.cfa_vars = __pyx_state[1]; __pyx_result.dataset = __pyx_state[2]; __pyx_result.grp_name = __pyx_state[3]; __pyx_result.metadata = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 5) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.cfa_dims = __pyx_state[0]; __pyx_result.cfa_vars = __pyx_state[1]; __pyx_result.dataset = __pyx_state[2]; __pyx_result.grp_name = __pyx_state[3]; __pyx_result.metadata = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_CFAGroup__set_state(CFAGroup __pyx_result, tuple __pyx_state):
 *     __pyx_result.cfa_dims = __pyx_state[0]; __pyx_result.cfa_vars = __pyx_state[1]; __pyx_result.dataset = __pyx_state[2]; __pyx_result.grp_name = __pyx_state[3]; __pyx_result.metadata = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_CFAGroup__set_state(<CFAGroup> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CFAGroup__set_state(CFAGroup __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.cfa_dims = __pyx_state[0]; __pyx_result.cfa_vars = __pyx_state[1]; __pyx_result.dataset = __pyx_state[2]; __pyx_result.grp_name = __pyx_state[3]; __pyx_result.metadata = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.__pyx_unpickle_CFAGroup__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_CFAVariable(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_5__pyx_unpickle_CFAVariable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9S3netCDF4_3CFA_11_CFAClasses_5__pyx_unpickle_CFAVariable = {"__pyx_unpickle_CFAVariable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_5__pyx_unpickle_CFAVariable, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_5__pyx_unpickle_CFAVariable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CFAVariable (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,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);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CFAVariable", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CFAVariable", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CFAVariable") < 0)) __PYX_ERR(1, 1, __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___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CFAVariable", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.__pyx_unpickle_CFAVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_4__pyx_unpickle_CFAVariable(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_4__pyx_unpickle_CFAVariable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CFAVariable", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2c9008d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2c9008d = (_shape, base, cf_role, cfa_dimensions, group, metadata, nc_dtype, nc_partition_group, pmdimensions, pmshape, subarray_shape, var_name))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x2c9008d) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2c9008d:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2c9008d = (_shape, base, cf_role, cfa_dimensions, group, metadata, nc_dtype, nc_partition_group, pmdimensions, pmshape, subarray_shape, var_name))" % __pyx_checksum)
 *     __pyx_result = CFAVariable.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x2c9008d:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2c9008d = (_shape, base, cf_role, cfa_dimensions, group, metadata, nc_dtype, nc_partition_group, pmdimensions, pmshape, subarray_shape, var_name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CFAVariable.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x2c, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2c9008d:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2c9008d = (_shape, base, cf_role, cfa_dimensions, group, metadata, nc_dtype, nc_partition_group, pmdimensions, pmshape, subarray_shape, var_name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2c9008d = (_shape, base, cf_role, cfa_dimensions, group, metadata, nc_dtype, nc_partition_group, pmdimensions, pmshape, subarray_shape, var_name))" % __pyx_checksum)
 *     __pyx_result = CFAVariable.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CFAVariable__set_state(<CFAVariable> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2c9008d = (_shape, base, cf_role, cfa_dimensions, group, metadata, nc_dtype, nc_partition_group, pmdimensions, pmshape, subarray_shape, var_name))" % __pyx_checksum)
 *     __pyx_result = CFAVariable.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CFAVariable__set_state(<CFAVariable> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = CFAVariable.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CFAVariable__set_state(<CFAVariable> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CFAVariable__set_state(CFAVariable __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFAVariable__set_state(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2c9008d = (_shape, base, cf_role, cfa_dimensions, group, metadata, nc_dtype, nc_partition_group, pmdimensions, pmshape, subarray_shape, var_name))" % __pyx_checksum)
 *     __pyx_result = CFAVariable.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CFAVariable__set_state(<CFAVariable> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CFAVariable__set_state(<CFAVariable> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CFAVariable__set_state(CFAVariable __pyx_result, tuple __pyx_state):
 *     __pyx_result._shape = __pyx_state[0]; __pyx_result.base = __pyx_state[1]; __pyx_result.cf_role = __pyx_state[2]; __pyx_result.cfa_dimensions = __pyx_state[3]; __pyx_result.group = __pyx_state[4]; __pyx_result.metadata = __pyx_state[5]; __pyx_result.nc_dtype = __pyx_state[6]; __pyx_result.nc_partition_group = __pyx_state[7]; __pyx_result.pmdimensions = __pyx_state[8]; __pyx_result.pmshape = __pyx_state[9]; __pyx_result.subarray_shape = __pyx_state[10]; __pyx_result.var_name = __pyx_state[11]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CFAVariable(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.__pyx_unpickle_CFAVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_CFAVariable__set_state(<CFAVariable> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CFAVariable__set_state(CFAVariable __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._shape = __pyx_state[0]; __pyx_result.base = __pyx_state[1]; __pyx_result.cf_role = __pyx_state[2]; __pyx_result.cfa_dimensions = __pyx_state[3]; __pyx_result.group = __pyx_state[4]; __pyx_result.metadata = __pyx_state[5]; __pyx_result.nc_dtype = __pyx_state[6]; __pyx_result.nc_partition_group = __pyx_state[7]; __pyx_result.pmdimensions = __pyx_state[8]; __pyx_result.pmshape = __pyx_state[9]; __pyx_result.subarray_shape = __pyx_state[10]; __pyx_result.var_name = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFAVariable__set_state(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CFAVariable__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CFAVariable__set_state(CFAVariable __pyx_result, tuple __pyx_state):
 *     __pyx_result._shape = __pyx_state[0]; __pyx_result.base = __pyx_state[1]; __pyx_result.cf_role = __pyx_state[2]; __pyx_result.cfa_dimensions = __pyx_state[3]; __pyx_result.group = __pyx_state[4]; __pyx_result.metadata = __pyx_state[5]; __pyx_result.nc_dtype = __pyx_state[6]; __pyx_result.nc_partition_group = __pyx_state[7]; __pyx_result.pmdimensions = __pyx_state[8]; __pyx_result.pmshape = __pyx_state[9]; __pyx_result.subarray_shape = __pyx_state[10]; __pyx_result.var_name = __pyx_state[11]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[12])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_shape);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_shape));
  __pyx_v___pyx_result->_shape = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->base);
  __Pyx_DECREF(__pyx_v___pyx_result->base);
  __pyx_v___pyx_result->base = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->cf_role);
  __Pyx_DECREF(__pyx_v___pyx_result->cf_role);
  __pyx_v___pyx_result->cf_role = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->cfa_dimensions);
  __Pyx_DECREF(__pyx_v___pyx_result->cfa_dimensions);
  __pyx_v___pyx_result->cfa_dimensions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->group);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->group));
  __pyx_v___pyx_result->group = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->metadata);
  __Pyx_DECREF(__pyx_v___pyx_result->metadata);
  __pyx_v___pyx_result->metadata = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->nc_dtype);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->nc_dtype));
  __pyx_v___pyx_result->nc_dtype = ((PyArray_Descr *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->nc_partition_group);
  __Pyx_DECREF(__pyx_v___pyx_result->nc_partition_group);
  __pyx_v___pyx_result->nc_partition_group = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->pmdimensions);
  __Pyx_DECREF(__pyx_v___pyx_result->pmdimensions);
  __pyx_v___pyx_result->pmdimensions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->pmshape);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->pmshape));
  __pyx_v___pyx_result->pmshape = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->subarray_shape);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->subarray_shape));
  __pyx_v___pyx_result->subarray_shape = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->var_name);
  __Pyx_DECREF(__pyx_v___pyx_result->var_name);
  __pyx_v___pyx_result->var_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_CFAVariable__set_state(CFAVariable __pyx_result, tuple __pyx_state):
 *     __pyx_result._shape = __pyx_state[0]; __pyx_result.base = __pyx_state[1]; __pyx_result.cf_role = __pyx_state[2]; __pyx_result.cfa_dimensions = __pyx_state[3]; __pyx_result.group = __pyx_state[4]; __pyx_result.metadata = __pyx_state[5]; __pyx_result.nc_dtype = __pyx_state[6]; __pyx_result.nc_partition_group = __pyx_state[7]; __pyx_result.pmdimensions = __pyx_state[8]; __pyx_result.pmshape = __pyx_state[9]; __pyx_result.subarray_shape = __pyx_state[10]; __pyx_result.var_name = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[12])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 12) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._shape = __pyx_state[0]; __pyx_result.base = __pyx_state[1]; __pyx_result.cf_role = __pyx_state[2]; __pyx_result.cfa_dimensions = __pyx_state[3]; __pyx_result.group = __pyx_state[4]; __pyx_result.metadata = __pyx_state[5]; __pyx_result.nc_dtype = __pyx_state[6]; __pyx_result.nc_partition_group = __pyx_state[7]; __pyx_result.pmdimensions = __pyx_state[8]; __pyx_result.pmshape = __pyx_state[9]; __pyx_result.subarray_shape = __pyx_state[10]; __pyx_result.var_name = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[12])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_CFAVariable__set_state(CFAVariable __pyx_result, tuple __pyx_state):
 *     __pyx_result._shape = __pyx_state[0]; __pyx_result.base = __pyx_state[1]; __pyx_result.cf_role = __pyx_state[2]; __pyx_result.cfa_dimensions = __pyx_state[3]; __pyx_result.group = __pyx_state[4]; __pyx_result.metadata = __pyx_state[5]; __pyx_result.nc_dtype = __pyx_state[6]; __pyx_result.nc_partition_group = __pyx_state[7]; __pyx_result.pmdimensions = __pyx_state[8]; __pyx_result.pmshape = __pyx_state[9]; __pyx_result.subarray_shape = __pyx_state[10]; __pyx_result.var_name = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[12])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_CFAVariable__set_state(<CFAVariable> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CFAVariable__set_state(CFAVariable __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._shape = __pyx_state[0]; __pyx_result.base = __pyx_state[1]; __pyx_result.cf_role = __pyx_state[2]; __pyx_result.cfa_dimensions = __pyx_state[3]; __pyx_result.group = __pyx_state[4]; __pyx_result.metadata = __pyx_state[5]; __pyx_result.nc_dtype = __pyx_state[6]; __pyx_result.nc_partition_group = __pyx_state[7]; __pyx_result.pmdimensions = __pyx_state[8]; __pyx_result.pmshape = __pyx_state[9]; __pyx_result.subarray_shape = __pyx_state[10]; __pyx_result.var_name = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.__pyx_unpickle_CFAVariable__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_CFADimension(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_7__pyx_unpickle_CFADimension(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9S3netCDF4_3CFA_11_CFAClasses_7__pyx_unpickle_CFADimension = {"__pyx_unpickle_CFADimension", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_7__pyx_unpickle_CFADimension, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_7__pyx_unpickle_CFADimension(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CFADimension (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,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);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CFADimension", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CFADimension", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CFADimension") < 0)) __PYX_ERR(1, 1, __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___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CFADimension", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.__pyx_unpickle_CFADimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_6__pyx_unpickle_CFADimension(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_9S3netCDF4_3CFA_11_CFAClasses_6__pyx_unpickle_CFADimension(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CFADimension", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2afd349:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2afd349 = (axis_type, dim_len, dim_name, metadata, nc_dtype))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x2afd349) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2afd349:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2afd349 = (axis_type, dim_len, dim_name, metadata, nc_dtype))" % __pyx_checksum)
 *     __pyx_result = CFADimension.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x2afd349:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2afd349 = (axis_type, dim_len, dim_name, metadata, nc_dtype))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CFADimension.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x2a, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x2afd349:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2afd349 = (axis_type, dim_len, dim_name, metadata, nc_dtype))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2afd349 = (axis_type, dim_len, dim_name, metadata, nc_dtype))" % __pyx_checksum)
 *     __pyx_result = CFADimension.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CFADimension__set_state(<CFADimension> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADimension), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2afd349 = (axis_type, dim_len, dim_name, metadata, nc_dtype))" % __pyx_checksum)
 *     __pyx_result = CFADimension.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CFADimension__set_state(<CFADimension> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = CFADimension.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CFADimension__set_state(<CFADimension> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CFADimension__set_state(CFADimension __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFADimension__set_state(((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x2afd349 = (axis_type, dim_len, dim_name, metadata, nc_dtype))" % __pyx_checksum)
 *     __pyx_result = CFADimension.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CFADimension__set_state(<CFADimension> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CFADimension__set_state(<CFADimension> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CFADimension__set_state(CFADimension __pyx_result, tuple __pyx_state):
 *     __pyx_result.axis_type = __pyx_state[0]; __pyx_result.dim_len = __pyx_state[1]; __pyx_result.dim_name = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.nc_dtype = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CFADimension(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.__pyx_unpickle_CFADimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_CFADimension__set_state(<CFADimension> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CFADimension__set_state(CFADimension __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.axis_type = __pyx_state[0]; __pyx_result.dim_len = __pyx_state[1]; __pyx_result.dim_name = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.nc_dtype = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_9S3netCDF4_3CFA_11_CFAClasses___pyx_unpickle_CFADimension__set_state(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CFADimension__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CFADimension__set_state(CFADimension __pyx_result, tuple __pyx_state):
 *     __pyx_result.axis_type = __pyx_state[0]; __pyx_result.dim_len = __pyx_state[1]; __pyx_result.dim_name = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.nc_dtype = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->axis_type);
  __Pyx_DECREF(__pyx_v___pyx_result->axis_type);
  __pyx_v___pyx_result->axis_type = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __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_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->dim_len = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->dim_name);
  __Pyx_DECREF(__pyx_v___pyx_result->dim_name);
  __pyx_v___pyx_result->dim_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->metadata);
  __Pyx_DECREF(__pyx_v___pyx_result->metadata);
  __pyx_v___pyx_result->metadata = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->nc_dtype);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->nc_dtype));
  __pyx_v___pyx_result->nc_dtype = ((PyArray_Descr *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_CFADimension__set_state(CFADimension __pyx_result, tuple __pyx_state):
 *     __pyx_result.axis_type = __pyx_state[0]; __pyx_result.dim_len = __pyx_state[1]; __pyx_result.dim_name = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.nc_dtype = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 5) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result.axis_type = __pyx_state[0]; __pyx_result.dim_len = __pyx_state[1]; __pyx_result.dim_name = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.nc_dtype = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_CFADimension__set_state(CFADimension __pyx_result, tuple __pyx_state):
 *     __pyx_result.axis_type = __pyx_state[0]; __pyx_result.dim_len = __pyx_state[1]; __pyx_result.dim_name = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.nc_dtype = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_CFADimension__set_state(<CFADimension> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CFADimension__set_state(CFADimension __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.axis_type = __pyx_state[0]; __pyx_result.dim_len = __pyx_state[1]; __pyx_result.dim_name = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.nc_dtype = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("S3netCDF4.CFA._CFAClasses.__pyx_unpickle_CFADimension__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":735
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
  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("PyArray_MultiIterNew1", 0);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":736
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":735
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":738
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  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("PyArray_MultiIterNew2", 0);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":739
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":738
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":741
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  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("PyArray_MultiIterNew3", 0);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":742
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":741
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":744
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  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("PyArray_MultiIterNew4", 0);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":745
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":744
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":747
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
  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("PyArray_MultiIterNew5", 0);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":748
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":747
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":750
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":751
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
  if (__pyx_t_1) {

    /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":752
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
 *     else:
 *         return ()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
    __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
    goto __pyx_L0;

    /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":751
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):
 *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
 *         return <tuple>d.subarray.shape
 *     else:
 */
  }

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":754
 *         return <tuple>d.subarray.shape
 *     else:
 *         return ()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_empty_tuple);
    __pyx_r = __pyx_empty_tuple;
    goto __pyx_L0;
  }

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":750
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
 *     if PyDataType_HASSUBARRAY(d):
 *         return <tuple>d.subarray.shape
 */

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

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":931
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
 */

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_array_base", 0);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":932
 * 
 * cdef inline void set_array_base(ndarray arr, object base):
 *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
 *     PyArray_SetBaseObject(arr, base)
 * 
 */
  Py_INCREF(__pyx_v_base);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":933
 * cdef inline void set_array_base(ndarray arr, object base):
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
 */
  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":931
 *     int _import_umath() except -1
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *     Py_INCREF(base) # important to do this before stealing the reference below!
 *     PyArray_SetBaseObject(arr, base)
 */

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

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":935
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_v_base;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base", 0);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":936
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
 *     if base is NULL:
 *         return None
 */
  __pyx_v_base = PyArray_BASE(__pyx_v_arr);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":937
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
 */
  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
  if (__pyx_t_1) {

    /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":938
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     return <object>base
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":937
 * cdef inline object get_array_base(ndarray arr):
 *     base = PyArray_BASE(arr)
 *     if base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     return <object>base
 */
  }

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":939
 *     if base is NULL:
 *         return None
 *     return <object>base             # <<<<<<<<<<<<<<
 * 
 * # Versions of the import_* functions which are more suitable for
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_base));
  __pyx_r = ((PyObject *)__pyx_v_base);
  goto __pyx_L0;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":935
 *     PyArray_SetBaseObject(arr, base)
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     base = PyArray_BASE(arr)
 *     if base is NULL:
 */

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

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":943
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         __pyx_import_array()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_array", 0);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":944
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":945
 * cdef inline int import_array() except -1:
 *     try:
 *         __pyx_import_array()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")
 */
      __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 945, __pyx_L3_error)

      /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":944
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
 */
    }
    __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_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":946
 *     try:
 *         __pyx_import_array()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 946, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":947
 *         __pyx_import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 947, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(2, 947, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":944
 * # Cython code.
 * cdef inline int import_array() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         __pyx_import_array()
 *     except Exception:
 */
    __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_L8_try_end:;
  }

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":943
 * # Versions of the import_* functions which are more suitable for
 * # Cython code.
 * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         __pyx_import_array()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":949
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_umath", 0);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":950
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":951
 * cdef inline int import_umath() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 951, __pyx_L3_error)

      /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":950
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __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_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":952
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 952, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":953
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 953, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(2, 953, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":950
 * 
 * cdef inline int import_umath() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __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_L8_try_end:;
  }

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":949
 *         raise ImportError("numpy.core.multiarray failed to import")
 * 
 * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":955
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("import_ufunc", 0);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":956
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":957
 * cdef inline int import_ufunc() except -1:
 *     try:
 *         _import_umath()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")
 */
      __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 957, __pyx_L3_error)

      /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":956
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    }
    __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_L8_try_end;
    __pyx_L3_error:;

    /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":958
 *     try:
 *         _import_umath()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 */
    __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_4) {
      __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 958, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":959
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef extern from *:
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 959, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(2, 959, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":956
 * 
 * cdef inline int import_ufunc() except -1:
 *     try:             # <<<<<<<<<<<<<<
 *         _import_umath()
 *     except Exception:
 */
    __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_L8_try_end:;
  }

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":955
 *         raise ImportError("numpy.core.umath failed to import")
 * 
 * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
 *     try:
 *         _import_umath()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":969
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
 */

static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_timedelta64_object", 0);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":981
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
  goto __pyx_L0;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":969
 * 
 * 
 * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.timedelta64)`
 */

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

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":984
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
 */

static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_datetime64_object", 0);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":996
 *     bool
 *     """
 *     return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
  goto __pyx_L0;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":984
 * 
 * 
 * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<
 *     """
 *     Cython equivalent of `isinstance(obj, np.datetime64)`
 */

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

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":999
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy datetime64 object
 */

static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
  npy_datetime __pyx_r;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":1006
 *     also needed.  That can be found using `get_datetime64_unit`.
 *     """
 *     return (<PyDatetimeScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":999
 * 
 * 
 * cdef inline npy_datetime get_datetime64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy datetime64 object
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":1009
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy timedelta64 object
 */

static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
  npy_timedelta __pyx_r;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":1013
 *     returns the int64 value underlying scalar numpy timedelta64 object
 *     """
 *     return (<PyTimedeltaScalarObject*>obj).obval             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
  goto __pyx_L0;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":1009
 * 
 * 
 * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the int64 value underlying scalar numpy timedelta64 object
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":1016
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
 */

static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
  NPY_DATETIMEUNIT __pyx_r;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":1020
 *     returns the unit part of the dtype for a numpy datetime64 object.
 *     """
 *     return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base             # <<<<<<<<<<<<<<
 */
  __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
  goto __pyx_L0;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":1016
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
static struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADataset __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADataset;

static PyObject *__pyx_tp_new_9S3netCDF4_3CFA_11_CFAClasses_CFADataset(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *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_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)o);
  p->__pyx_vtab = __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFADataset;
  p->name = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->format = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->cfa_groups = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->metadata = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->cfa_version = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9S3netCDF4_3CFA_11_CFAClasses_CFADataset(PyObject *o) {
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *p = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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->format);
  Py_CLEAR(p->cfa_groups);
  Py_CLEAR(p->metadata);
  Py_CLEAR(p->cfa_version);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_9S3netCDF4_3CFA_11_CFAClasses_CFADataset(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *p = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)o;
  if (p->cfa_groups) {
    e = (*v)(p->cfa_groups, a); if (e) return e;
  }
  if (p->metadata) {
    e = (*v)(p->metadata, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9S3netCDF4_3CFA_11_CFAClasses_CFADataset(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *p = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)o;
  tmp = ((PyObject*)p->cfa_groups);
  p->cfa_groups = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->metadata);
  p->metadata = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_9S3netCDF4_3CFA_11_CFAClasses_CFADataset(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_9S3netCDF4_3CFA_11_CFAClasses_CFADataset(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_7__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_9S3netCDF4_3CFA_11_CFAClasses_CFADataset(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_9__getattr__(o, n);
  }
  return v;
}

static int __pyx_tp_setattro_9S3netCDF4_3CFA_11_CFAClasses_CFADataset(PyObject *o, PyObject *n, PyObject *v) {
  if (v) {
    return __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_11__setattr__(o, n, v);
  }
  else {
    return PyObject_GenericSetAttr(o, n, 0);
  }
}

static PyMethodDef __pyx_methods_9S3netCDF4_3CFA_11_CFAClasses_CFADataset[] = {
  {"__getattr__", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_9__getattr__, METH_O|METH_COEXIST, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_8__getattr__},
  {"createGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_13createGroup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_12createGroup},
  {"getGroup", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_15getGroup, METH_O, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_14getGroup},
  {"renameGroup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_17renameGroup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_16renameGroup},
  {"getName", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_19getName, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_18getName},
  {"getGroups", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_21getGroups, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_20getGroups},
  {"getMetadata", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_23getMetadata, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_22getMetadata},
  {"getCFAVersion", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_25getCFAVersion, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_24getCFAVersion},
  {"getFormat", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_27getFormat, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_26getFormat},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_29__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_31__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_CFADataset = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, /*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_CFADataset = {
  0, /*mp_length*/
  __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_5__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADataset = {
  PyVarObject_HEAD_INIT(0, 0)
  "S3netCDF4.CFA._CFAClasses.CFADataset", /*tp_name*/
  sizeof(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_CFADataset, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_CFADataset, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  __pyx_tp_getattro_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, /*tp_getattro*/
  __pyx_tp_setattro_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, /*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*/
  "\n       Class containing details of a CFADataset (master array)\n       +-----------------------------------------------------------------------+\n       | CFADataset                                                            |\n       +-----------------------------------------------------------------------+\n       | name                       string                                     |\n       | format                     string                                     |\n       | cfa_version                string                                     |\n       | cfa_groups                 dict<CFAGroups>                            |\n       | metadata                   dict<mixed>                                |\n       +-----------------------------------------------------------------------+\n       | CFAGroup                   createGroup(string grp_name,               |\n       |                                        dict metadata)                 |\n       | CFAGroup                   getGroup(string grp_name)                  |\n       | bool                       renameGroup(string old_name,               |\n       |                                        string new_name)               |\n       | list<basestring>           getGroups()                                |\n       | string                     getName()                                  |\n       | string                     getFormat()                                |\n       | basestring                 getCFAVersion()                            |\n       | dict<mixed>                getMetadata()                              |\n       +-----------------------------------------------------------------------+\n    ", /*tp_doc*/
  __pyx_tp_traverse_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, /*tp_traverse*/
  __pyx_tp_clear_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, /*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_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup;

static PyObject *__pyx_tp_new_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *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_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)o);
  p->__pyx_vtab = __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup;
  p->grp_name = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->dataset = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)Py_None); Py_INCREF(Py_None);
  p->metadata = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->cfa_vars = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->cfa_dims = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup(PyObject *o) {
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *p = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->grp_name);
  Py_CLEAR(p->dataset);
  Py_CLEAR(p->metadata);
  Py_CLEAR(p->cfa_vars);
  Py_CLEAR(p->cfa_dims);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *p = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)o;
  if (p->dataset) {
    e = (*v)(((PyObject *)p->dataset), a); if (e) return e;
  }
  if (p->metadata) {
    e = (*v)(p->metadata, a); if (e) return e;
  }
  if (p->cfa_vars) {
    e = (*v)(p->cfa_vars, a); if (e) return e;
  }
  if (p->cfa_dims) {
    e = (*v)(p->cfa_dims, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *p = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)o;
  tmp = ((PyObject*)p->dataset);
  p->dataset = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->metadata);
  p->metadata = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->cfa_vars);
  p->cfa_vars = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->cfa_dims);
  p->cfa_dims = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static PyObject *__pyx_tp_getattro_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_7__getattr__(o, n);
  }
  return v;
}

static PyMethodDef __pyx_methods_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup[] = {
  {"__getattr__", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_7__getattr__, METH_O|METH_COEXIST, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_6__getattr__},
  {"_ensure_axis_has_type", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_9_ensure_axis_has_type, METH_O, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_8_ensure_axis_has_type},
  {"createVariable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_11createVariable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_10createVariable},
  {"getVariable", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_13getVariable, METH_O, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_12getVariable},
  {"getVariables", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_15getVariables, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_14getVariables},
  {"renameVariable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_17renameVariable, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_16renameVariable},
  {"createDimension", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_19createDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_18createDimension},
  {"getDimension", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_21getDimension, METH_O, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_20getDimension},
  {"getDimensions", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_23getDimensions, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_22getDimensions},
  {"renameDimension", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_25renameDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_24renameDimension},
  {"getMetadata", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_27getMetadata, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_26getMetadata},
  {"getName", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_29getName, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_28getName},
  {"setName", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_31setName, METH_O, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_30setName},
  {"getDataset", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_33getDataset, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_32getDataset},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_35__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_37__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_CFAGroup = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup, /*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_CFAGroup = {
  0, /*mp_length*/
  __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_5__getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup = {
  PyVarObject_HEAD_INIT(0, 0)
  "S3netCDF4.CFA._CFAClasses.CFAGroup", /*tp_name*/
  sizeof(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_CFAGroup, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_CFAGroup, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  __pyx_tp_getattro_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup, /*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*/
  "\n        Class containing details of a CFAGroup (master array grouping)\n        +----------------------------------------------------------------------+\n        | CFAGroup                                                             |\n        +----------------------------------------------------------------------+\n        | CFADataset      dataset                                              |\n        | grp_name        string                                               |\n        | metadata        dict<mixed>                                          |\n        | cfa_dims        dict<CFADimension>                                   |\n        | cfa_vars        dict<CFAVariable>                                    |\n        +----------------------------------------------------------------------+\n        | CFAVariable         createVariable(string var_name,                  |\n        |                            np.dtype nc_dtype,                        |\n        |                            list<string> dim_names=[],                |\n        |                            np.ndarray subarray_shape=np.array([]),   |\n        |                            int max_subarray_size=0,                  |\n        |                            dict<mixed> metadata={})                  |\n        | CFAVariable         getVariable(string var_name)                     |\n        | list<basestring>    getVariables()                                   |\n        | bool                renameVariable(string old_name,                  |\n        |                                    string new_name)                  |\n        |                                                                      |\n        | CFADim              createDimension(string dim_name,                 |\n        |                                     int dim_len,                     |\n        |                                     dict<mixed>metadata,             |\n        |                               ""      <type> type)                     |\n        | CFADim              getDimension(string dim_name)                    |\n        | iterator<CFADim>    getDimensions()                                  |\n        | bool                renameDimension(string old_name,                 |\n        |                                     string new_name)                 |\n        |                                                                      |\n        | string              getName()                                        |\n        | None                setName(string)                                  |\n        | dict<mixed>         getMetadata()                                    |\n        | CFADataset          getDataset()                                     |\n        +----------------------------------------------------------------------+\n    ", /*tp_doc*/
  __pyx_tp_traverse_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup, /*tp_traverse*/
  __pyx_tp_clear_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup, /*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_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable;

static PyObject *__pyx_tp_new_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *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_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)o);
  p->__pyx_vtab = __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable;
  p->var_name = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->group = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)Py_None); Py_INCREF(Py_None);
  p->nc_dtype = ((PyArray_Descr *)Py_None); Py_INCREF(Py_None);
  p->metadata = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->cf_role = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->cfa_dimensions = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->pmdimensions = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->pmshape = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->base = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_shape = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->nc_partition_group = Py_None; Py_INCREF(Py_None);
  p->subarray_shape = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable(PyObject *o) {
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *p = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->var_name);
  Py_CLEAR(p->group);
  Py_CLEAR(p->nc_dtype);
  Py_CLEAR(p->metadata);
  Py_CLEAR(p->cf_role);
  Py_CLEAR(p->cfa_dimensions);
  Py_CLEAR(p->pmdimensions);
  Py_CLEAR(p->pmshape);
  Py_CLEAR(p->base);
  Py_CLEAR(p->_shape);
  Py_CLEAR(p->nc_partition_group);
  Py_CLEAR(p->subarray_shape);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *p = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)o;
  if (p->group) {
    e = (*v)(((PyObject *)p->group), a); if (e) return e;
  }
  if (p->nc_dtype) {
    e = (*v)(((PyObject *)p->nc_dtype), a); if (e) return e;
  }
  if (p->metadata) {
    e = (*v)(p->metadata, a); if (e) return e;
  }
  if (p->cfa_dimensions) {
    e = (*v)(p->cfa_dimensions, a); if (e) return e;
  }
  if (p->pmdimensions) {
    e = (*v)(p->pmdimensions, a); if (e) return e;
  }
  if (p->pmshape) {
    e = (*v)(((PyObject *)p->pmshape), a); if (e) return e;
  }
  if (p->_shape) {
    e = (*v)(((PyObject *)p->_shape), a); if (e) return e;
  }
  if (p->nc_partition_group) {
    e = (*v)(p->nc_partition_group, a); if (e) return e;
  }
  if (p->subarray_shape) {
    e = (*v)(((PyObject *)p->subarray_shape), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *p = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *)o;
  tmp = ((PyObject*)p->group);
  p->group = ((struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->nc_dtype);
  p->nc_dtype = ((PyArray_Descr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->metadata);
  p->metadata = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->cfa_dimensions);
  p->cfa_dimensions = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->pmdimensions);
  p->pmdimensions = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->pmshape);
  p->pmshape = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_shape);
  p->_shape = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->nc_partition_group);
  p->nc_partition_group = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->subarray_shape);
  p->subarray_shape = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static PyObject *__pyx_getprop_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_var_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_1__get__(o);
}

static int __pyx_setprop_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_var_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_3__set__(o, v);
  }
  else {
    return __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8var_name_5__del__(o);
  }
}

static PyObject *__pyx_getprop_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_metadata(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_1__get__(o);
}

static int __pyx_setprop_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_metadata(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_3__set__(o, v);
  }
  else {
    return __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8metadata_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable[] = {
  {"getGroup", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_7getGroup, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_6getGroup},
  {"getName", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_9getName, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_8getName},
  {"getType", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_11getType, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_10getType},
  {"getMetadata", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_13getMetadata, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_12getMetadata},
  {"getDimensions", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_15getDimensions, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_14getDimensions},
  {"getRole", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_17getRole, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_16getRole},
  {"shape", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_19shape, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_18shape},
  {"getBaseFilename", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_21getBaseFilename, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_20getBaseFilename},
  {"getPartitionMatrixShape", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_23getPartitionMatrixShape, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_22getPartitionMatrixShape},
  {"getPartitionMatrixDimensions", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_25getPartitionMatrixDimensions, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_24getPartitionMatrixDimensions},
  {"getPartitionValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_27getPartitionValues, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_26getPartitionValues},
  {"getPartition", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_29getPartition, METH_O, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_28getPartition},
  {"writePartition", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_31writePartition, METH_O, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_30writePartition},
  {"writeInitialPartitionInfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_33writeInitialPartitionInfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_32writeInitialPartitionInfo},
  {"parse", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_35parse, METH_O, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_34parse},
  {"dump", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_37dump, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_36dump},
  {"load", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_39load, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_38load},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_41__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_43__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable[] = {
  {(char *)"var_name", __pyx_getprop_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_var_name, __pyx_setprop_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_var_name, (char *)0, 0},
  {(char *)"metadata", __pyx_getprop_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_metadata, __pyx_setprop_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_metadata, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_CFAVariable = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable, /*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_CFAVariable = {
  0, /*mp_length*/
  __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_5__getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable = {
  PyVarObject_HEAD_INIT(0, 0)
  "S3netCDF4.CFA._CFAClasses.CFAVariable", /*tp_name*/
  sizeof(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_CFAVariable, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_CFAVariable, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n        Class containing definition of a CFA Variable, containing CFASubarrays.\n        +----------------------------------------------------------------------+\n        | CFAVariable                                                          |\n        +----------------------------------------------------------------------+\n        | CFAGroup            group                                            |\n        | var_name            string                                           |\n        | nc_dtype            np.dtype                                         |\n        | metadata            dict<mixed>                                      |\n        | cf_role             string                                           |\n        | cfa_dimensions      list<string>                                     |\n        | pmdimensions        list<string>                                     |\n        | pmshape             array<int>                                       |\n        | base                string                                           |\n        | nc_partition_group  object                                           |\n        | subarray_shape      np.ndarray                                       |\n        +----------------------------------------------------------------------+\n        | string              getName()                                        |\n        | CFAGroup            getGroup()                                       |\n        | np.dtype            getType()                                        |\n        | dict<mixed>         getMetadata()                                    |\n        | list<string>        getDimensions()                                  |\n        | string              getRole()                                        |\n        | np.ndarray          shape()                                          |\n        | string              getBaseFilename()                                |\n        | np.ndarray          g""etPartitionMatrixShape()                        |\n        | list                getPartitionMatrixDimensions()                   |\n        | CFAPartition        getPartition(array<int> index)                   |\n        | CFAPartition        getPartitionValues(key=\"location\")               |\n        | void                writePartition(CFAPartition)                     |\n        | void                writeInitialPartitionInfo()                      |\n        | void                createNCPartition()                              |\n        | bool                parse(dict cfa_metadata)                         |\n        | dict<mixed>         dump()                                           |\n        | void                load()                                           |\n        +----------------------------------------------------------------------+\n        | __init__                                                             |\n        | __repr__                                                             |\n        | __getitem__                                                          |\n        +----------------------------------------------------------------------+\n    ", /*tp_doc*/
  __pyx_tp_traverse_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable, /*tp_traverse*/
  __pyx_tp_clear_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_9S3netCDF4_3CFA_11_CFAClasses_CFADimension __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADimension;

static PyObject *__pyx_tp_new_9S3netCDF4_3CFA_11_CFAClasses_CFADimension(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *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_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)o);
  p->__pyx_vtab = __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFADimension;
  p->dim_name = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->metadata = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->axis_type = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->nc_dtype = ((PyArray_Descr *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9S3netCDF4_3CFA_11_CFAClasses_CFADimension(PyObject *o) {
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *p = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->dim_name);
  Py_CLEAR(p->metadata);
  Py_CLEAR(p->axis_type);
  Py_CLEAR(p->nc_dtype);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_9S3netCDF4_3CFA_11_CFAClasses_CFADimension(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *p = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)o;
  if (p->metadata) {
    e = (*v)(p->metadata, a); if (e) return e;
  }
  if (p->nc_dtype) {
    e = (*v)(((PyObject *)p->nc_dtype), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9S3netCDF4_3CFA_11_CFAClasses_CFADimension(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *p = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *)o;
  tmp = ((PyObject*)p->metadata);
  p->metadata = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->nc_dtype);
  p->nc_dtype = ((PyArray_Descr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_metadata(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_1__get__(o);
}

static int __pyx_setprop_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_metadata(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_3__set__(o, v);
  }
  else {
    return __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8metadata_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_9S3netCDF4_3CFA_11_CFAClasses_CFADimension[] = {
  {"dump", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_5dump, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_4dump},
  {"getType", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_7getType, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_6getType},
  {"setType", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_9setType, METH_O, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_8setType},
  {"getName", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_11getName, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_10getName},
  {"getMetadata", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_13getMetadata, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_12getMetadata},
  {"getLen", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_15getLen, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_14getLen},
  {"getAxisType", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_17getAxisType, METH_NOARGS, __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_16getAxisType},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_19__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_21__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9S3netCDF4_3CFA_11_CFAClasses_CFADimension[] = {
  {(char *)"metadata", __pyx_getprop_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_metadata, __pyx_setprop_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_metadata, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADimension = {
  PyVarObject_HEAD_INIT(0, 0)
  "S3netCDF4.CFA._CFAClasses.CFADimension", /*tp_name*/
  sizeof(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9S3netCDF4_3CFA_11_CFAClasses_CFADimension, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n        Class containing definition of a CFA Dimension.\n        +----------------------------------------------------------------------+\n        | CFADimension                                                         |\n        +----------------------------------------------------------------------+\n        | dim_name         string                                              |\n        | dim_len          int                                                 |\n        | metadata         dict<mixed>                                         |\n        | axis_type        string                                              |\n        | np.dtype         nc_dtype                                            |\n        +----------------------------------------------------------------------+\n        | dict<mixed>      dump()                                              |\n        | string           getName()                                           |\n        | dict<mixed>      getMetadata()                                       |\n        | int              getLen()                                            |\n        | string           getAxisType()                                       |\n        | void             setType(np.dtype)                                   |\n        | np.dtype         getType()                                           |\n        +----------------------------------------------------------------------+\n    ", /*tp_doc*/
  __pyx_tp_traverse_9S3netCDF4_3CFA_11_CFAClasses_CFADimension, /*tp_traverse*/
  __pyx_tp_clear_9S3netCDF4_3CFA_11_CFAClasses_CFADimension, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9S3netCDF4_3CFA_11_CFAClasses_CFADimension, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9S3netCDF4_3CFA_11_CFAClasses_CFADimension, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9S3netCDF4_3CFA_11_CFAClasses_CFADimension, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec__CFAClasses(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec__CFAClasses},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "_CFAClasses",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_u_0_4, __pyx_k_0_4, sizeof(__pyx_k_0_4), 0, 1, 0, 0},
  {&__pyx_kp_u_0_5, __pyx_k_0_5, sizeof(__pyx_k_0_5), 0, 1, 0, 0},
  {&__pyx_kp_u_BSD_see_LICENSE_file_in_top_leve, __pyx_k_BSD_see_LICENSE_file_in_top_leve, sizeof(__pyx_k_BSD_see_LICENSE_file_in_top_leve), 0, 1, 0, 0},
  {&__pyx_n_s_CFADataset, __pyx_k_CFADataset, sizeof(__pyx_k_CFADataset), 0, 0, 1, 1},
  {&__pyx_n_s_CFADimension, __pyx_k_CFADimension, sizeof(__pyx_k_CFADimension), 0, 0, 1, 1},
  {&__pyx_n_s_CFADimensionError, __pyx_k_CFADimensionError, sizeof(__pyx_k_CFADimensionError), 0, 0, 1, 1},
  {&__pyx_n_s_CFAError, __pyx_k_CFAError, sizeof(__pyx_k_CFAError), 0, 0, 1, 1},
  {&__pyx_n_s_CFAGroup, __pyx_k_CFAGroup, sizeof(__pyx_k_CFAGroup), 0, 0, 1, 1},
  {&__pyx_n_s_CFAGroupError, __pyx_k_CFAGroupError, sizeof(__pyx_k_CFAGroupError), 0, 0, 1, 1},
  {&__pyx_n_s_CFAPartition, __pyx_k_CFAPartition, sizeof(__pyx_k_CFAPartition), 0, 0, 1, 1},
  {&__pyx_n_u_CFAPartition, __pyx_k_CFAPartition, sizeof(__pyx_k_CFAPartition), 0, 1, 0, 1},
  {&__pyx_n_s_CFAPartitionError, __pyx_k_CFAPartitionError, sizeof(__pyx_k_CFAPartitionError), 0, 0, 1, 1},
  {&__pyx_n_s_CFAPartitionIndexError, __pyx_k_CFAPartitionIndexError, sizeof(__pyx_k_CFAPartitionIndexError), 0, 0, 1, 1},
  {&__pyx_n_s_CFASplitter, __pyx_k_CFASplitter, sizeof(__pyx_k_CFASplitter), 0, 0, 1, 1},
  {&__pyx_n_s_CFASubArrayError, __pyx_k_CFASubArrayError, sizeof(__pyx_k_CFASubArrayError), 0, 0, 1, 1},
  {&__pyx_n_s_CFAVariable, __pyx_k_CFAVariable, sizeof(__pyx_k_CFAVariable), 0, 0, 1, 1},
  {&__pyx_n_s_CFAVariableError, __pyx_k_CFAVariableError, sizeof(__pyx_k_CFAVariableError), 0, 0, 1, 1},
  {&__pyx_n_s_CFAVariableIndexError, __pyx_k_CFAVariableIndexError, sizeof(__pyx_k_CFAVariableIndexError), 0, 0, 1, 1},
  {&__pyx_kp_u_C_2019_2021_Science_and_Technol, __pyx_k_C_2019_2021_Science_and_Technol, sizeof(__pyx_k_C_2019_2021_Science_and_Technol), 0, 1, 0, 0},
  {&__pyx_kp_u_Cannot_index_CFA_array_with_type, __pyx_k_Cannot_index_CFA_array_with_type, sizeof(__pyx_k_Cannot_index_CFA_array_with_type), 0, 1, 0, 0},
  {&__pyx_kp_u_Could_not_createDimension_dimens, __pyx_k_Could_not_createDimension_dimens, sizeof(__pyx_k_Could_not_createDimension_dimens), 0, 1, 0, 0},
  {&__pyx_kp_u_Could_not_createGroup_group_alre, __pyx_k_Could_not_createGroup_group_alre, sizeof(__pyx_k_Could_not_createGroup_group_alre), 0, 1, 0, 0},
  {&__pyx_kp_u_Could_not_createVariable_variabl, __pyx_k_Could_not_createVariable_variabl, sizeof(__pyx_k_Could_not_createVariable_variabl), 0, 1, 0, 0},
  {&__pyx_kp_u_Could_not_getDimension_dimension, __pyx_k_Could_not_getDimension_dimension, sizeof(__pyx_k_Could_not_getDimension_dimension), 0, 1, 0, 0},
  {&__pyx_kp_u_Could_not_getGroup_group_does_no, __pyx_k_Could_not_getGroup_group_does_no, sizeof(__pyx_k_Could_not_getGroup_group_does_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Could_not_getVariable_variable_d, __pyx_k_Could_not_getVariable_variable_d, sizeof(__pyx_k_Could_not_getVariable_variable_d), 0, 1, 0, 0},
  {&__pyx_kp_u_Could_not_renameDimension_dimens, __pyx_k_Could_not_renameDimension_dimens, sizeof(__pyx_k_Could_not_renameDimension_dimens), 0, 1, 0, 0},
  {&__pyx_kp_u_Could_not_renameGroup_group_does, __pyx_k_Could_not_renameGroup_group_does, sizeof(__pyx_k_Could_not_renameGroup_group_does), 0, 1, 0, 0},
  {&__pyx_kp_u_Could_not_renameVariable_variabl, __pyx_k_Could_not_renameVariable_variabl, sizeof(__pyx_k_Could_not_renameVariable_variabl), 0, 1, 0, 0},
  {&__pyx_n_s_Dataset, __pyx_k_Dataset, sizeof(__pyx_k_Dataset), 0, 0, 1, 1},
  {&__pyx_kp_u_Dimension_does_not_exist_in_CFA, __pyx_k_Dimension_does_not_exist_in_CFA, sizeof(__pyx_k_Dimension_does_not_exist_in_CFA), 0, 1, 0, 0},
  {&__pyx_kp_u_Dimension_in_desired_sub_array_i, __pyx_k_Dimension_in_desired_sub_array_i, sizeof(__pyx_k_Dimension_in_desired_sub_array_i), 0, 1, 0, 0},
  {&__pyx_kp_u_Dimensions_of_CFAVariable_are_no, __pyx_k_Dimensions_of_CFAVariable_are_no, sizeof(__pyx_k_Dimensions_of_CFAVariable_are_no), 0, 1, 0, 0},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x19, __pyx_k_Incompatible_checksums_s_vs_0x19, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x19), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x2a, __pyx_k_Incompatible_checksums_s_vs_0x2a, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x2a), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x2c, __pyx_k_Incompatible_checksums_s_vs_0x2c, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x2c), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xac, __pyx_k_Incompatible_checksums_s_vs_0xac, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xac), 0, 0, 1, 0},
  {&__pyx_kp_u_Incompatible_netCDF_version_for, __pyx_k_Incompatible_netCDF_version_for, sizeof(__pyx_k_Incompatible_netCDF_version_for), 0, 1, 0, 0},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_kp_u_Index_into_CFA_array_is_out_of_r, __pyx_k_Index_into_CFA_array_is_out_of_r, sizeof(__pyx_k_Index_into_CFA_array_is_out_of_r), 0, 1, 0, 0},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_n_u_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 1, 0, 1},
  {&__pyx_n_u_NETCDF4, __pyx_k_NETCDF4, sizeof(__pyx_k_NETCDF4), 0, 1, 0, 1},
  {&__pyx_kp_u_Neil_Massey, __pyx_k_Neil_Massey, sizeof(__pyx_k_Neil_Massey), 0, 1, 0, 0},
  {&__pyx_kp_u_No_partition_with_index_exists_f, __pyx_k_No_partition_with_index_exists_f, sizeof(__pyx_k_No_partition_with_index_exists_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Not_permitted, __pyx_k_Not_permitted, sizeof(__pyx_k_Not_permitted), 0, 1, 0, 0},
  {&__pyx_kp_u_Number_of_dimensions_in_subarray, __pyx_k_Number_of_dimensions_in_subarray, sizeof(__pyx_k_Number_of_dimensions_in_subarray), 0, 1, 0, 0},
  {&__pyx_n_u_Partitions, __pyx_k_Partitions, sizeof(__pyx_k_Partitions), 0, 1, 0, 1},
  {&__pyx_kp_u_Partitions_not_defined_in_metada, __pyx_k_Partitions_not_defined_in_metada, sizeof(__pyx_k_Partitions_not_defined_in_metada), 0, 1, 0, 0},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_S3netCDF4_CFA__CFAClasses, __pyx_k_S3netCDF4_CFA__CFAClasses, sizeof(__pyx_k_S3netCDF4_CFA__CFAClasses), 0, 0, 1, 1},
  {&__pyx_n_s_S3netCDF4_CFA__CFAExceptions, __pyx_k_S3netCDF4_CFA__CFAExceptions, sizeof(__pyx_k_S3netCDF4_CFA__CFAExceptions), 0, 0, 1, 1},
  {&__pyx_n_s_S3netCDF4_CFA__CFASplitter, __pyx_k_S3netCDF4_CFA__CFASplitter, sizeof(__pyx_k_S3netCDF4_CFA__CFASplitter), 0, 0, 1, 1},
  {&__pyx_n_u_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 1, 0, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_u_U, __pyx_k_U, sizeof(__pyx_k_U), 0, 1, 0, 1},
  {&__pyx_kp_u_Unsupported_CFA_version, __pyx_k_Unsupported_CFA_version, sizeof(__pyx_k_Unsupported_CFA_version), 0, 1, 0, 0},
  {&__pyx_n_u_X, __pyx_k_X, sizeof(__pyx_k_X), 0, 1, 0, 1},
  {&__pyx_n_u_Y, __pyx_k_Y, sizeof(__pyx_k_Y), 0, 1, 0, 1},
  {&__pyx_n_u_Z, __pyx_k_Z, sizeof(__pyx_k_Z), 0, 1, 0, 1},
  {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0},
  {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0},
  {&__pyx_kp_u__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 1, 0, 0},
  {&__pyx_kp_u__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 1, 0, 0},
  {&__pyx_kp_u__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 1, 0, 0},
  {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0},
  {&__pyx_kp_u__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 1, 0, 0},
  {&__pyx_n_s__35, __pyx_k__35, sizeof(__pyx_k__35), 0, 0, 1, 1},
  {&__pyx_n_s_any, __pyx_k_any, sizeof(__pyx_k_any), 0, 0, 1, 1},
  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
  {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
  {&__pyx_n_s_authors, __pyx_k_authors, sizeof(__pyx_k_authors), 0, 0, 1, 1},
  {&__pyx_n_u_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 1, 0, 1},
  {&__pyx_n_s_axis_type, __pyx_k_axis_type, sizeof(__pyx_k_axis_type), 0, 0, 1, 1},
  {&__pyx_n_s_axis_types, __pyx_k_axis_types, sizeof(__pyx_k_axis_types), 0, 0, 1, 1},
  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
  {&__pyx_n_u_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 1, 0, 1},
  {&__pyx_n_s_basename, __pyx_k_basename, sizeof(__pyx_k_basename), 0, 0, 1, 1},
  {&__pyx_n_u_bounds, __pyx_k_bounds, sizeof(__pyx_k_bounds), 0, 1, 0, 1},
  {&__pyx_n_s_calculateSubarrayShape, __pyx_k_calculateSubarrayShape, sizeof(__pyx_k_calculateSubarrayShape), 0, 0, 1, 1},
  {&__pyx_n_u_cf_dimensions, __pyx_k_cf_dimensions, sizeof(__pyx_k_cf_dimensions), 0, 1, 0, 1},
  {&__pyx_n_s_cf_role, __pyx_k_cf_role, sizeof(__pyx_k_cf_role), 0, 0, 1, 1},
  {&__pyx_n_u_cf_role, __pyx_k_cf_role, sizeof(__pyx_k_cf_role), 0, 1, 0, 1},
  {&__pyx_n_u_cfa, __pyx_k_cfa, sizeof(__pyx_k_cfa), 0, 1, 0, 1},
  {&__pyx_n_u_cfa_array, __pyx_k_cfa_array, sizeof(__pyx_k_cfa_array), 0, 1, 0, 1},
  {&__pyx_kp_u_cfa_array_not_defined_in_metadat, __pyx_k_cfa_array_not_defined_in_metadat, sizeof(__pyx_k_cfa_array_not_defined_in_metadat), 0, 1, 0, 0},
  {&__pyx_n_s_cfa_dimensions, __pyx_k_cfa_dimensions, sizeof(__pyx_k_cfa_dimensions), 0, 0, 1, 1},
  {&__pyx_n_u_cfa_dimensions, __pyx_k_cfa_dimensions, sizeof(__pyx_k_cfa_dimensions), 0, 1, 0, 1},
  {&__pyx_kp_u_cfa_dimensions_or_cf_dimensions, __pyx_k_cfa_dimensions_or_cf_dimensions, sizeof(__pyx_k_cfa_dimensions_or_cf_dimensions), 0, 1, 0, 0},
  {&__pyx_n_s_cfa_dims, __pyx_k_cfa_dims, sizeof(__pyx_k_cfa_dims), 0, 0, 1, 1},
  {&__pyx_n_u_cfa_group, __pyx_k_cfa_group, sizeof(__pyx_k_cfa_group), 0, 1, 0, 1},
  {&__pyx_kp_u_cfa_group_not_defined_in_metadat, __pyx_k_cfa_group_not_defined_in_metadat, sizeof(__pyx_k_cfa_group_not_defined_in_metadat), 0, 1, 0, 0},
  {&__pyx_n_s_cfa_groups, __pyx_k_cfa_groups, sizeof(__pyx_k_cfa_groups), 0, 0, 1, 1},
  {&__pyx_n_s_cfa_metadata, __pyx_k_cfa_metadata, sizeof(__pyx_k_cfa_metadata), 0, 0, 1, 1},
  {&__pyx_n_u_cfa_variable, __pyx_k_cfa_variable, sizeof(__pyx_k_cfa_variable), 0, 1, 0, 1},
  {&__pyx_n_s_cfa_variable_metadata_keys, __pyx_k_cfa_variable_metadata_keys, sizeof(__pyx_k_cfa_variable_metadata_keys), 0, 0, 1, 1},
  {&__pyx_n_s_cfa_vars, __pyx_k_cfa_vars, sizeof(__pyx_k_cfa_vars), 0, 0, 1, 1},
  {&__pyx_n_s_cfa_version, __pyx_k_cfa_version, sizeof(__pyx_k_cfa_version), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {&__pyx_n_s_copyright, __pyx_k_copyright, sizeof(__pyx_k_copyright), 0, 0, 1, 1},
  {&__pyx_n_s_createDimension, __pyx_k_createDimension, sizeof(__pyx_k_createDimension), 0, 0, 1, 1},
  {&__pyx_n_s_createGroup, __pyx_k_createGroup, sizeof(__pyx_k_createGroup), 0, 0, 1, 1},
  {&__pyx_n_s_createVariable, __pyx_k_createVariable, sizeof(__pyx_k_createVariable), 0, 0, 1, 1},
  {&__pyx_n_s_dataset, __pyx_k_dataset, sizeof(__pyx_k_dataset), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_dim_len, __pyx_k_dim_len, sizeof(__pyx_k_dim_len), 0, 0, 1, 1},
  {&__pyx_n_u_dim_len, __pyx_k_dim_len, sizeof(__pyx_k_dim_len), 0, 1, 0, 1},
  {&__pyx_n_s_dim_name, __pyx_k_dim_name, sizeof(__pyx_k_dim_name), 0, 0, 1, 1},
  {&__pyx_n_u_dim_name, __pyx_k_dim_name, sizeof(__pyx_k_dim_name), 0, 1, 0, 1},
  {&__pyx_n_s_dim_names, __pyx_k_dim_names, sizeof(__pyx_k_dim_names), 0, 0, 1, 1},
  {&__pyx_n_s_dimensions, __pyx_k_dimensions, sizeof(__pyx_k_dimensions), 0, 0, 1, 1},
  {&__pyx_n_s_diskless, __pyx_k_diskless, sizeof(__pyx_k_diskless), 0, 0, 1, 1},
  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
  {&__pyx_n_s_dump, __pyx_k_dump, sizeof(__pyx_k_dump), 0, 0, 1, 1},
  {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
  {&__pyx_n_s_ensure_axis_has_type, __pyx_k_ensure_axis_has_type, sizeof(__pyx_k_ensure_axis_has_type), 0, 0, 1, 1},
  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  {&__pyx_n_u_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 1, 0, 1},
  {&__pyx_n_s_finished, __pyx_k_finished, sizeof(__pyx_k_finished), 0, 0, 1, 1},
  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_u_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 1, 0, 1},
  {&__pyx_kp_u_format_groups, __pyx_k_format_groups, sizeof(__pyx_k_format_groups), 0, 1, 0, 0},
  {&__pyx_n_s_getAxisType, __pyx_k_getAxisType, sizeof(__pyx_k_getAxisType), 0, 0, 1, 1},
  {&__pyx_n_s_getBaseFilename, __pyx_k_getBaseFilename, sizeof(__pyx_k_getBaseFilename), 0, 0, 1, 1},
  {&__pyx_n_s_getCFAVersion, __pyx_k_getCFAVersion, sizeof(__pyx_k_getCFAVersion), 0, 0, 1, 1},
  {&__pyx_n_s_getDataset, __pyx_k_getDataset, sizeof(__pyx_k_getDataset), 0, 0, 1, 1},
  {&__pyx_n_s_getDimension, __pyx_k_getDimension, sizeof(__pyx_k_getDimension), 0, 0, 1, 1},
  {&__pyx_n_s_getDimensions, __pyx_k_getDimensions, sizeof(__pyx_k_getDimensions), 0, 0, 1, 1},
  {&__pyx_n_s_getFormat, __pyx_k_getFormat, sizeof(__pyx_k_getFormat), 0, 0, 1, 1},
  {&__pyx_n_s_getGroup, __pyx_k_getGroup, sizeof(__pyx_k_getGroup), 0, 0, 1, 1},
  {&__pyx_n_s_getGroups, __pyx_k_getGroups, sizeof(__pyx_k_getGroups), 0, 0, 1, 1},
  {&__pyx_n_s_getLen, __pyx_k_getLen, sizeof(__pyx_k_getLen), 0, 0, 1, 1},
  {&__pyx_n_s_getMetadata, __pyx_k_getMetadata, sizeof(__pyx_k_getMetadata), 0, 0, 1, 1},
  {&__pyx_n_s_getName, __pyx_k_getName, sizeof(__pyx_k_getName), 0, 0, 1, 1},
  {&__pyx_n_s_getPartition, __pyx_k_getPartition, sizeof(__pyx_k_getPartition), 0, 0, 1, 1},
  {&__pyx_n_s_getPartitionMatrixDimensions, __pyx_k_getPartitionMatrixDimensions, sizeof(__pyx_k_getPartitionMatrixDimensions), 0, 0, 1, 1},
  {&__pyx_n_s_getPartitionMatrixShape, __pyx_k_getPartitionMatrixShape, sizeof(__pyx_k_getPartitionMatrixShape), 0, 0, 1, 1},
  {&__pyx_n_s_getPartitionValues, __pyx_k_getPartitionValues, sizeof(__pyx_k_getPartitionValues), 0, 0, 1, 1},
  {&__pyx_n_s_getRole, __pyx_k_getRole, sizeof(__pyx_k_getRole), 0, 0, 1, 1},
  {&__pyx_n_s_getType, __pyx_k_getType, sizeof(__pyx_k_getType), 0, 0, 1, 1},
  {&__pyx_n_s_getVariable, __pyx_k_getVariable, sizeof(__pyx_k_getVariable), 0, 0, 1, 1},
  {&__pyx_n_s_getVariables, __pyx_k_getVariables, sizeof(__pyx_k_getVariables), 0, 0, 1, 1},
  {&__pyx_n_s_getattr, __pyx_k_getattr, sizeof(__pyx_k_getattr), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1},
  {&__pyx_n_s_group_name, __pyx_k_group_name, sizeof(__pyx_k_group_name), 0, 0, 1, 1},
  {&__pyx_n_s_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 0, 1, 1},
  {&__pyx_n_s_grp_name, __pyx_k_grp_name, sizeof(__pyx_k_grp_name), 0, 0, 1, 1},
  {&__pyx_n_u_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 1, 0, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_u_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 1, 0, 1},
  {&__pyx_kp_u_index_location_ncvar_file_format, __pyx_k_index_location_ncvar_file_format, sizeof(__pyx_k_index_location_ncvar_file_format), 0, 1, 0, 0},
  {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1},
  {&__pyx_kp_u_inmemory_nc, __pyx_k_inmemory_nc, sizeof(__pyx_k_inmemory_nc), 0, 1, 0, 0},
  {&__pyx_n_s_int16, __pyx_k_int16, sizeof(__pyx_k_int16), 0, 0, 1, 1},
  {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1},
  {&__pyx_n_s_int64, __pyx_k_int64, sizeof(__pyx_k_int64), 0, 0, 1, 1},
  {&__pyx_n_s_int8, __pyx_k_int8, sizeof(__pyx_k_int8), 0, 0, 1, 1},
  {&__pyx_n_s_is_masked, __pyx_k_is_masked, sizeof(__pyx_k_is_masked), 0, 0, 1, 1},
  {&__pyx_kp_u_is_neither_a_variable_nor_a_dim, __pyx_k_is_neither_a_variable_nor_a_dim, sizeof(__pyx_k_is_neither_a_variable_nor_a_dim), 0, 1, 0, 0},
  {&__pyx_n_s_iternext, __pyx_k_iternext, sizeof(__pyx_k_iternext), 0, 0, 1, 1},
  {&__pyx_n_s_json, __pyx_k_json, sizeof(__pyx_k_json), 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_u_lat, __pyx_k_lat, sizeof(__pyx_k_lat), 0, 1, 0, 1},
  {&__pyx_n_u_level, __pyx_k_level, sizeof(__pyx_k_level), 0, 1, 0, 1},
  {&__pyx_n_s_license, __pyx_k_license, sizeof(__pyx_k_license), 0, 0, 1, 1},
  {&__pyx_n_s_load, __pyx_k_load, sizeof(__pyx_k_load), 0, 0, 1, 1},
  {&__pyx_n_s_loads, __pyx_k_loads, sizeof(__pyx_k_loads), 0, 0, 1, 1},
  {&__pyx_n_s_location, __pyx_k_location, sizeof(__pyx_k_location), 0, 0, 1, 1},
  {&__pyx_n_u_location, __pyx_k_location, sizeof(__pyx_k_location), 0, 1, 0, 1},
  {&__pyx_n_u_lon, __pyx_k_lon, sizeof(__pyx_k_lon), 0, 1, 0, 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_max_subarray_size, __pyx_k_max_subarray_size, sizeof(__pyx_k_max_subarray_size), 0, 0, 1, 1},
  {&__pyx_n_s_memory, __pyx_k_memory, sizeof(__pyx_k_memory), 0, 0, 1, 1},
  {&__pyx_n_s_metadata, __pyx_k_metadata, sizeof(__pyx_k_metadata), 0, 0, 1, 1},
  {&__pyx_n_u_metadata, __pyx_k_metadata, sizeof(__pyx_k_metadata), 0, 1, 0, 1},
  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
  {&__pyx_n_s_multi_index, __pyx_k_multi_index, sizeof(__pyx_k_multi_index), 0, 0, 1, 1},
  {&__pyx_n_u_multi_index, __pyx_k_multi_index, sizeof(__pyx_k_multi_index), 0, 1, 0, 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_u_name_dimensions_shape, __pyx_k_name_dimensions_shape, sizeof(__pyx_k_name_dimensions_shape), 0, 1, 0, 0},
  {&__pyx_kp_u_name_dimensions_variables, __pyx_k_name_dimensions_variables, sizeof(__pyx_k_name_dimensions_variables), 0, 1, 0, 0},
  {&__pyx_kp_u_name_length_axis_type, __pyx_k_name_length_axis_type, sizeof(__pyx_k_name_length_axis_type), 0, 1, 0, 0},
  {&__pyx_n_s_namedtuple, __pyx_k_namedtuple, sizeof(__pyx_k_namedtuple), 0, 0, 1, 1},
  {&__pyx_kp_u_nc, __pyx_k_nc, sizeof(__pyx_k_nc), 0, 1, 0, 0},
  {&__pyx_n_s_nc_dtype, __pyx_k_nc_dtype, sizeof(__pyx_k_nc_dtype), 0, 0, 1, 1},
  {&__pyx_n_s_nc_object, __pyx_k_nc_object, sizeof(__pyx_k_nc_object), 0, 0, 1, 1},
  {&__pyx_n_s_nc_parent, __pyx_k_nc_parent, sizeof(__pyx_k_nc_parent), 0, 0, 1, 1},
  {&__pyx_n_s_nc_partition_group, __pyx_k_nc_partition_group, sizeof(__pyx_k_nc_partition_group), 0, 0, 1, 1},
  {&__pyx_kp_u_nca, __pyx_k_nca, sizeof(__pyx_k_nca), 0, 1, 0, 0},
  {&__pyx_n_s_ncvar, __pyx_k_ncvar, sizeof(__pyx_k_ncvar), 0, 0, 1, 1},
  {&__pyx_n_u_ncvar, __pyx_k_ncvar, sizeof(__pyx_k_ncvar), 0, 1, 0, 1},
  {&__pyx_n_u_ndimensions, __pyx_k_ndimensions, sizeof(__pyx_k_ndimensions), 0, 1, 0, 1},
  {&__pyx_n_s_nditer, __pyx_k_nditer, sizeof(__pyx_k_nditer), 0, 0, 1, 1},
  {&__pyx_n_s_netCDF4, __pyx_k_netCDF4, sizeof(__pyx_k_netCDF4), 0, 0, 1, 1},
  {&__pyx_n_s_netCDF4__netCDF4, __pyx_k_netCDF4__netCDF4, sizeof(__pyx_k_netCDF4__netCDF4), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_new_name, __pyx_k_new_name, sizeof(__pyx_k_new_name), 0, 0, 1, 1},
  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
  {&__pyx_kp_u_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 1, 0, 0},
  {&__pyx_kp_u_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 1, 0, 0},
  {&__pyx_n_s_old_name, __pyx_k_old_name, sizeof(__pyx_k_old_name), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_os_path, __pyx_k_os_path, sizeof(__pyx_k_os_path), 0, 0, 1, 1},
  {&__pyx_n_s_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 0, 0, 1, 1},
  {&__pyx_n_s_partition, __pyx_k_partition, sizeof(__pyx_k_partition), 0, 0, 1, 1},
  {&__pyx_kp_u_partition_source_target, __pyx_k_partition_source_target, sizeof(__pyx_k_partition_source_target), 0, 1, 0, 0},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_persist, __pyx_k_persist, sizeof(__pyx_k_persist), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_pmdimensions, __pyx_k_pmdimensions, sizeof(__pyx_k_pmdimensions), 0, 0, 1, 1},
  {&__pyx_n_u_pmdimensions, __pyx_k_pmdimensions, sizeof(__pyx_k_pmdimensions), 0, 1, 0, 1},
  {&__pyx_n_s_pmshape, __pyx_k_pmshape, sizeof(__pyx_k_pmshape), 0, 0, 1, 1},
  {&__pyx_n_u_pmshape, __pyx_k_pmshape, sizeof(__pyx_k_pmshape), 0, 1, 0, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CFADataset, __pyx_k_pyx_unpickle_CFADataset, sizeof(__pyx_k_pyx_unpickle_CFADataset), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CFADimension, __pyx_k_pyx_unpickle_CFADimension, sizeof(__pyx_k_pyx_unpickle_CFADimension), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CFAGroup, __pyx_k_pyx_unpickle_CFAGroup, sizeof(__pyx_k_pyx_unpickle_CFAGroup), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CFAVariable, __pyx_k_pyx_unpickle_CFAVariable, sizeof(__pyx_k_pyx_unpickle_CFAVariable), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_u_refs_ok, __pyx_k_refs_ok, sizeof(__pyx_k_refs_ok), 0, 1, 0, 1},
  {&__pyx_n_s_renameDimension, __pyx_k_renameDimension, sizeof(__pyx_k_renameDimension), 0, 0, 1, 1},
  {&__pyx_n_s_renameGroup, __pyx_k_renameGroup, sizeof(__pyx_k_renameGroup), 0, 0, 1, 1},
  {&__pyx_n_s_renameVariable, __pyx_k_renameVariable, sizeof(__pyx_k_renameVariable), 0, 0, 1, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {&__pyx_n_u_return_type, __pyx_k_return_type, sizeof(__pyx_k_return_type), 0, 1, 0, 1},
  {&__pyx_n_u_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 1, 0, 1},
  {&__pyx_n_s_setName, __pyx_k_setName, sizeof(__pyx_k_setName), 0, 0, 1, 1},
  {&__pyx_n_s_setSubarrayShape, __pyx_k_setSubarrayShape, sizeof(__pyx_k_setSubarrayShape), 0, 0, 1, 1},
  {&__pyx_n_s_setType, __pyx_k_setType, sizeof(__pyx_k_setType), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
  {&__pyx_n_u_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 1, 0, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_u_subarray, __pyx_k_subarray, sizeof(__pyx_k_subarray), 0, 1, 0, 1},
  {&__pyx_n_s_subarray_shape, __pyx_k_subarray_shape, sizeof(__pyx_k_subarray_shape), 0, 0, 1, 1},
  {&__pyx_n_u_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 1, 0, 1},
  {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_u_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 1, 0, 1},
  {&__pyx_n_s_tolist, __pyx_k_tolist, sizeof(__pyx_k_tolist), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_var_name, __pyx_k_var_name, sizeof(__pyx_k_var_name), 0, 0, 1, 1},
  {&__pyx_n_s_variables, __pyx_k_variables, sizeof(__pyx_k_variables), 0, 0, 1, 1},
  {&__pyx_n_u_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 1, 0, 1},
  {&__pyx_n_s_writeInitialPartitionInfo, __pyx_k_writeInitialPartitionInfo, sizeof(__pyx_k_writeInitialPartitionInfo), 0, 0, 1, 1},
  {&__pyx_n_s_writePartition, __pyx_k_writePartition, sizeof(__pyx_k_writePartition), 0, 0, 1, 1},
  {&__pyx_n_u_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 1, 0, 1},
  {&__pyx_n_u_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 1, 0, 1},
  {&__pyx_n_u_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 1, 0, 1},
  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 177, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 447, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 757, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 1022, __pyx_L1_error)
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 947, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":104
 *         for md in self.metadata:
 *             repstr += "\t{} : {}\n".format(md, self.metadata[md])
 *         return repstr[:-1]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(CFADataset self, basestring grp_name):
 */
  __pyx_slice__4 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__4)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__4);
  __Pyx_GIVEREF(__pyx_slice__4);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":364
 *             elif (len(d) < 3 and d[0] == "z") or "level" in d:
 *                 dim.axis_type = "Z"
 *             elif (len(d) < 3 and d[0] == "y") or d[0:3] == "lat":             # <<<<<<<<<<<<<<
 *                 dim.axis_type = "Y"
 *             elif (len(d) < 3 and d[0] == "x") or d[0:3] == "lon":
 */
  __pyx_slice__9 = PySlice_New(__pyx_int_0, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__9)) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__9);
  __Pyx_GIVEREF(__pyx_slice__9);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":767
 *             key_ts = type(key[s])
 *             if (key_ts in [int, np.int32, np.int64, np.int16, np.int8]):
 *                 slices[s,:] = [key[s], key[s]+1, 1]             # <<<<<<<<<<<<<<
 *             elif key_ts is slice:
 *                 key_list = key[s].indices(shape[s])
 */
  __pyx_slice__19 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__19)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__19);
  __Pyx_GIVEREF(__pyx_slice__19);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":836
 *         # master array
 *         return_list = []
 *         return_type = namedtuple(             # <<<<<<<<<<<<<<
 *                         'return_type',
 *                         'partition source target'
 */
  __pyx_tuple__20 = PyTuple_Pack(2, __pyx_n_u_return_type, __pyx_kp_u_partition_source_target); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":960
 *         location = np.empty((len(self.pmshape), 2), 'i')
 *         # calculate the start and end locations
 *         location[:,0] = (index[:] *             # <<<<<<<<<<<<<<
 *                         subarray_shape).astype('i')
 *         location[:,1] = (index[:] *
 */
  __pyx_tuple__23 = PyTuple_Pack(2, __pyx_slice__19, __pyx_int_0); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":962
 *         location[:,0] = (index[:] *
 *                         subarray_shape).astype('i')
 *         location[:,1] = (index[:] *             # <<<<<<<<<<<<<<
 *                         subarray_shape +
 *                         subarray_shape).astype('i')
 */
  __pyx_tuple__24 = PyTuple_Pack(2, __pyx_slice__19, __pyx_int_1); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1075
 *         if cfa_version == "0.4" or nc_parent==None:
 *             # create Dataset in memory
 *             self.nc_partition_group = netCDF4.Dataset(             # <<<<<<<<<<<<<<
 *                 "inmemory.nc", mode="w", diskless=True, persist=False,
 *                 memory=0
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_inmemory_nc); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1097
 *         # in the partition matrix
 *         ncp.createDimension("ndimensions", n_pm_dims)
 *         ncp.createDimension("bounds", 2)             # <<<<<<<<<<<<<<
 *         # create the cfa variables the partitions
 *         ### pm_shape
 */
  __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_u_bounds, __pyx_int_2); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1101
 *         ### pm_shape
 *         pm_shape_var = ncp.createVariable(
 *             "pmshape", np.int32, dimensions = ("ndimensions",)             # <<<<<<<<<<<<<<
 *         )
 *         # pm_dimensions - just write as string
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_u_ndimensions); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1331
 *         if "pmdimensions" in self.nc_partition_group.variables:
 *             pm_dimensions = self.nc_partition_group.variables["pmdimensions"][:]
 *             self.pmdimensions = pm_dimensions.replace(" ", "").split(",")             # <<<<<<<<<<<<<<
 * 
 * cdef class CFADimension:
 */
  __pyx_tuple__30 = PyTuple_Pack(2, __pyx_kp_u__29, __pyx_kp_u__13); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":947
 *         __pyx_import_array()
 *     except Exception:
 *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_umath() except -1:
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(2, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":953
 *         _import_umath()
 *     except Exception:
 *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
 * 
 * cdef inline int import_ufunc() except -1:
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(2, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":625
 * # construct the named tuple for the CFAPartition - this replaces a class in an
 * # earlier version
 * CFAPartition = namedtuple("CFAPartition",             # <<<<<<<<<<<<<<
 *                           "index location ncvar file format shape")
 * 
 */
  __pyx_tuple__36 = PyTuple_Pack(2, __pyx_n_u_CFAPartition, __pyx_kp_u_index_location_ncvar_file_format); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "(tree fragment)":1
 * def __pyx_unpickle_CFADataset(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__37 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);
  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CFADataset, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__39 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);
  __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CFAGroup, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__41 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);
  __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CFAVariable, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__43 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);
  __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CFADimension, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_26922498 = PyInt_FromLong(26922498L); if (unlikely(!__pyx_int_26922498)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_45077321 = PyInt_FromLong(45077321L); if (unlikely(!__pyx_int_45077321)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_46727309 = PyInt_FromLong(46727309L); if (unlikely(!__pyx_int_46727309)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_180435772 = PyInt_FromLong(180435772L); if (unlikely(!__pyx_int_180435772)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFADataset = &__pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADataset;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADataset.createGroup = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_createGroup *__pyx_optional_args))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_createGroup;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADataset.getGroup = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getGroup;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADataset.renameGroup = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_renameGroup;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADataset.getName = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getName;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADataset.getGroups = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getGroups;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADataset.getMetadata = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getMetadata;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADataset.getCFAVersion = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getCFAVersion;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADataset.getFormat = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_getFormat;
  if (PyType_Ready(&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADataset) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADataset.tp_print = 0;
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 25, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset___init__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset___init__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 25, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_2__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_2__repr__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_2__repr__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_2__repr__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 25, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_4__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_4__getitem__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_4__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_4__getitem__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 25, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_6__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_6__setitem__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_6__setitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_6__setitem__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 25, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_8__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_8__getattr__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_8__getattr__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_8__getattr__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADataset, "__setattr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 25, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_10__setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_10__setattr__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_10__setattr__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_10CFADataset_10__setattr__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADataset.tp_dict, __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFADataset) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CFADataset, (PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADataset) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADataset) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
  __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADataset = &__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADataset;
  __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup = &__pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup._ensure_axis_has_type = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup__ensure_axis_has_type;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.createVariable = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, PyArray_Descr *, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createVariable *__pyx_optional_args))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createVariable;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.getVariable = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getVariable;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.getVariables = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getVariables;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.renameVariable = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_renameVariable;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.createDimension = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createDimension *__pyx_optional_args))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_createDimension;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.getDimension = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getDimension;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.getDimensions = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getDimensions;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.renameDimension = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_renameDimension;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.getMetadata = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getMetadata;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.getName = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getName;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.setName = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_setName;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.getDataset = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADataset *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_getDataset;
  if (PyType_Ready(&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.tp_print = 0;
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 244, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup___init__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup___init__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 244, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_2__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_2__repr__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_2__repr__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_2__repr__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 244, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_4__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_4__getitem__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_4__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_4__getitem__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 244, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_6__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_6__getattr__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_6__getattr__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_8CFAGroup_6__getattr__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup.tp_dict, __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CFAGroup, (PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
  __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup = &__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup;
  __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable = &__pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.getGroup = (struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAGroup *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getGroup;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.getName = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getName;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.getType = (PyArray_Descr *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getType;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.getMetadata = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getMetadata;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.getDimensions = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getDimensions;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.getRole = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getRole;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.shape = (PyArrayObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_shape;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.getBaseFilename = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getBaseFilename;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.getPartitionMatrixShape = (PyArrayObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionMatrixShape;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.getPartitionMatrixDimensions = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionMatrixDimensions;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.getPartitionValues = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionValues *__pyx_optional_args))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartitionValues;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.__pyx___calculateLocation = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___calculateLocation;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.__pyx___definePartition = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___definePartition;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.getPartition = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_getPartition;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.writePartition = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writePartition;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.writeInitialPartitionInfo = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writeInitialPartitionInfo *__pyx_optional_args))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_writeInitialPartitionInfo;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.__pyx___createNCPartition = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, struct __pyx_opt_args_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___createNCPartition *__pyx_optional_args))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___createNCPartition;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.parse = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_parse;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.dump = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_dump;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.load = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_load;
  if (PyType_Ready(&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable) < 0) __PYX_ERR(0, 628, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.tp_dictoffset && __pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 628, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___init__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable___init__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 628, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_2__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_2__repr__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_2__repr__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_2__repr__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 628, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_4__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_4__getitem__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_4__getitem__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_11CFAVariable_4__getitem__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable.tp_dict, __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable) < 0) __PYX_ERR(0, 628, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CFAVariable, (PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable) < 0) __PYX_ERR(0, 628, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable) < 0) __PYX_ERR(0, 628, __pyx_L1_error)
  __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable = &__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable;
  __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFADimension = &__pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADimension;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADimension.dump = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_dump;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADimension.getType = (PyArray_Descr *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getType;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADimension.setType = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, PyArray_Descr *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_setType;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADimension.getName = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getName;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADimension.getMetadata = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getMetadata;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADimension.getLen = (int (*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getLen;
  __pyx_vtable_9S3netCDF4_3CFA_11_CFAClasses_CFADimension.getAxisType = (PyObject *(*)(struct __pyx_obj_9S3netCDF4_3CFA_11_CFAClasses_CFADimension *, int __pyx_skip_dispatch))__pyx_f_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_getAxisType;
  if (PyType_Ready(&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADimension) < 0) __PYX_ERR(0, 1333, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADimension.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADimension.tp_dictoffset && __pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADimension.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADimension.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADimension, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1333, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension___init__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension___init__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADimension, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1333, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_2__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_2__repr__.doc = __pyx_doc_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_2__repr__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_9S3netCDF4_3CFA_11_CFAClasses_12CFADimension_2__repr__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADimension.tp_dict, __pyx_vtabptr_9S3netCDF4_3CFA_11_CFAClasses_CFADimension) < 0) __PYX_ERR(0, 1333, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CFADimension, (PyObject *)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADimension) < 0) __PYX_ERR(0, 1333, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADimension) < 0) __PYX_ERR(0, 1333, __pyx_L1_error)
  __pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFADimension = &__pyx_type_9S3netCDF4_3CFA_11_CFAClasses_CFADimension;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error)
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error)
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error)
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error)
  __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error)
  __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error)
  __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error)
  __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error)
  __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error)
  __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error)
  __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error)
  __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error)
  __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error)
  __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error)
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);
   if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC init_CFAClasses(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC init_CFAClasses(void)
#else
__Pyx_PyMODINIT_FUNC PyInit__CFAClasses(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit__CFAClasses(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec__CFAClasses(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  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_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module '_CFAClasses' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #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("__Pyx_PyMODINIT_FUNC PyInit__CFAClasses(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __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 CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("_CFAClasses", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __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_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_S3netCDF4__CFA___CFAClasses) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "S3netCDF4.CFA._CFAClasses")) {
      if (unlikely(PyDict_SetItemString(modules, "S3netCDF4.CFA._CFAClasses", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "S3netCDF4/CFA/_CFAClasses.pyx":4
 * #cython: language_level=3
 * 
 * __copyright__ = "(C) 2019-2021 Science and Technology Facilities Council"             # <<<<<<<<<<<<<<
 * __license__ = "BSD - see LICENSE file in top-level directory"
 * __authors__ = "Neil Massey"
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copyright, __pyx_kp_u_C_2019_2021_Science_and_Technol) < 0) __PYX_ERR(0, 4, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":5
 * 
 * __copyright__ = "(C) 2019-2021 Science and Technology Facilities Council"
 * __license__ = "BSD - see LICENSE file in top-level directory"             # <<<<<<<<<<<<<<
 * __authors__ = "Neil Massey"
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_license, __pyx_kp_u_BSD_see_LICENSE_file_in_top_leve) < 0) __PYX_ERR(0, 5, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":6
 * __copyright__ = "(C) 2019-2021 Science and Technology Facilities Council"
 * __license__ = "BSD - see LICENSE file in top-level directory"
 * __authors__ = "Neil Massey"             # <<<<<<<<<<<<<<
 * 
 * """See class diagrams and interactions in __init__.py"""
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_authors, __pyx_kp_u_Neil_Massey) < 0) __PYX_ERR(0, 6, __pyx_L1_error)

  /* "S3netCDF4/CFA/_CFAClasses.pyx":10
 * """See class diagrams and interactions in __init__.py"""
 * 
 * import numpy as np             # <<<<<<<<<<<<<<
 * cimport numpy as np
 * from copy import copy
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":12
 * import numpy as np
 * cimport numpy as np
 * from copy import copy             # <<<<<<<<<<<<<<
 * import json
 * import os.path
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_copy);
  __Pyx_GIVEREF(__pyx_n_s_copy);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_copy);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_copy, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __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_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copy, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":13
 * cimport numpy as np
 * from copy import copy
 * import json             # <<<<<<<<<<<<<<
 * import os.path
 * from collections import namedtuple
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_json, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_json, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":14
 * from copy import copy
 * import json
 * import os.path             # <<<<<<<<<<<<<<
 * from collections import namedtuple
 * 
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_os_path, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":15
 * import json
 * import os.path
 * from collections import namedtuple             # <<<<<<<<<<<<<<
 * 
 * import netCDF4._netCDF4 as netCDF4
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_namedtuple);
  __Pyx_GIVEREF(__pyx_n_s_namedtuple);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_namedtuple);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_namedtuple, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":17
 * from collections import namedtuple
 * 
 * import netCDF4._netCDF4 as netCDF4             # <<<<<<<<<<<<<<
 * 
 * from S3netCDF4.CFA._CFAExceptions import (
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s__35);
  __Pyx_GIVEREF(__pyx_n_s__35);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__35);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_netCDF4__netCDF4, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_netCDF4, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":20
 * 
 * from S3netCDF4.CFA._CFAExceptions import (
 *     CFAGroupError, CFADimensionError, CFAVariableError, CFAVariableIndexError,             # <<<<<<<<<<<<<<
 *     CFAPartitionError, CFAPartitionIndexError, CFASubArrayError, CFAError
 * )
 */
  __pyx_t_2 = PyList_New(8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_CFAGroupError);
  __Pyx_GIVEREF(__pyx_n_s_CFAGroupError);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_CFAGroupError);
  __Pyx_INCREF(__pyx_n_s_CFADimensionError);
  __Pyx_GIVEREF(__pyx_n_s_CFADimensionError);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_CFADimensionError);
  __Pyx_INCREF(__pyx_n_s_CFAVariableError);
  __Pyx_GIVEREF(__pyx_n_s_CFAVariableError);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_CFAVariableError);
  __Pyx_INCREF(__pyx_n_s_CFAVariableIndexError);
  __Pyx_GIVEREF(__pyx_n_s_CFAVariableIndexError);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_CFAVariableIndexError);
  __Pyx_INCREF(__pyx_n_s_CFAPartitionError);
  __Pyx_GIVEREF(__pyx_n_s_CFAPartitionError);
  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_CFAPartitionError);
  __Pyx_INCREF(__pyx_n_s_CFAPartitionIndexError);
  __Pyx_GIVEREF(__pyx_n_s_CFAPartitionIndexError);
  PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_CFAPartitionIndexError);
  __Pyx_INCREF(__pyx_n_s_CFASubArrayError);
  __Pyx_GIVEREF(__pyx_n_s_CFASubArrayError);
  PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_CFASubArrayError);
  __Pyx_INCREF(__pyx_n_s_CFAError);
  __Pyx_GIVEREF(__pyx_n_s_CFAError);
  PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_s_CFAError);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":19
 * import netCDF4._netCDF4 as netCDF4
 * 
 * from S3netCDF4.CFA._CFAExceptions import (             # <<<<<<<<<<<<<<
 *     CFAGroupError, CFADimensionError, CFAVariableError, CFAVariableIndexError,
 *     CFAPartitionError, CFAPartitionIndexError, CFASubArrayError, CFAError
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_S3netCDF4_CFA__CFAExceptions, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CFAGroupError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CFAGroupError, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CFADimensionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CFADimensionError, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CFAVariableError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CFAVariableError, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CFAVariableIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CFAVariableIndexError, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CFAPartitionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CFAPartitionError, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CFAPartitionIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CFAPartitionIndexError, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CFASubArrayError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CFASubArrayError, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CFAError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CFAError, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":23
 *     CFAPartitionError, CFAPartitionIndexError, CFASubArrayError, CFAError
 * )
 * from S3netCDF4.CFA._CFASplitter import CFASplitter             # <<<<<<<<<<<<<<
 * 
 * cdef class CFADataset:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_CFASplitter);
  __Pyx_GIVEREF(__pyx_n_s_CFASplitter);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_CFASplitter);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_S3netCDF4_CFA__CFASplitter, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __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_CFASplitter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CFASplitter, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":58
 *     def __init__(CFADataset self,
 *                  basestring name,
 *                  dict cfa_groups=dict(),             # <<<<<<<<<<<<<<
 *                  basestring format="NETCDF4",
 *                  basestring cfa_version="0.4",
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k_ = ((PyObject*)__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":61
 *                  basestring format="NETCDF4",
 *                  basestring cfa_version="0.4",
 *                  dict metadata=dict()             # <<<<<<<<<<<<<<
 *                 ):
 *         """
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__2 = ((PyObject*)__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":136
 * 
 *     cpdef CFAGroup createGroup(CFADataset self, basestring grp_name,
 *                                dict metadata=dict()):             # <<<<<<<<<<<<<<
 *         """Create a group with the name grp_name.
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__5 = ((PyObject*)__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":135
 *         raise CFAError("Not permitted.")
 * 
 *     cpdef CFAGroup createGroup(CFADataset self, basestring grp_name,             # <<<<<<<<<<<<<<
 *                                dict metadata=dict()):
 *         """Create a group with the name grp_name.
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__5 = ((PyObject*)__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":292
 *                  basestring group_name,
 *                  dataset=None,
 *                  dict cfa_dims=dict(),             # <<<<<<<<<<<<<<
 *                  dict cfa_vars=dict(),
 *                  dict metadata=dict()
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__6 = ((PyObject*)__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":293
 *                  dataset=None,
 *                  dict cfa_dims=dict(),
 *                  dict cfa_vars=dict(),             # <<<<<<<<<<<<<<
 *                  dict metadata=dict()
 *                 ):
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__7 = ((PyObject*)__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":294
 *                  dict cfa_dims=dict(),
 *                  dict cfa_vars=dict(),
 *                  dict metadata=dict()             # <<<<<<<<<<<<<<
 *                 ):
 *         """Initialise a CFAGroups object"""
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__8 = ((PyObject*)__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":374
 *                          basestring var_name,
 *                          np.dtype nc_dtype,
 *                          list dim_names=list(),             # <<<<<<<<<<<<<<
 *                          np.ndarray subarray_shape=np.array([]),
 *                          int max_subarray_size=0,
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__10 = ((PyObject*)__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":375
 *                          np.dtype nc_dtype,
 *                          list dim_names=list(),
 *                          np.ndarray subarray_shape=np.array([]),             # <<<<<<<<<<<<<<
 *                          int max_subarray_size=0,
 *                          dict metadata=dict()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __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_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __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 (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 375, __pyx_L1_error)
  __pyx_k__11 = ((PyArrayObject *)__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":377
 *                          np.ndarray subarray_shape=np.array([]),
 *                          int max_subarray_size=0,
 *                          dict metadata=dict()             # <<<<<<<<<<<<<<
 *                         ):
 *         """Create a CFA variable and add it to the group.
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__12 = ((PyObject*)__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":374
 *                          basestring var_name,
 *                          np.dtype nc_dtype,
 *                          list dim_names=list(),             # <<<<<<<<<<<<<<
 *                          np.ndarray subarray_shape=np.array([]),
 *                          int max_subarray_size=0,
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__10 = ((PyObject*)__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":375
 *                          np.dtype nc_dtype,
 *                          list dim_names=list(),
 *                          np.ndarray subarray_shape=np.array([]),             # <<<<<<<<<<<<<<
 *                          int max_subarray_size=0,
 *                          dict metadata=dict()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __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_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __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;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 375, __pyx_L1_error)
  __pyx_k__11 = ((PyArrayObject *)__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":377
 *                          np.ndarray subarray_shape=np.array([]),
 *                          int max_subarray_size=0,
 *                          dict metadata=dict()             # <<<<<<<<<<<<<<
 *                         ):
 *         """Create a CFA variable and add it to the group.
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k__12 = ((PyObject*)__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":551
 *                           int dim_len=-1,
 *                           basestring axis_type="U",
 *                           dict metadata=dict()             # <<<<<<<<<<<<<<
 *                          ):
 *         """Create a CFA dimension and add it to the group"""
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k__14 = ((PyObject*)__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":547
 *         return True
 * 
 *     cpdef CFADimension createDimension(CFAGroup self,             # <<<<<<<<<<<<<<
 *                           basestring dim_name="",
 *                           int dim_len=-1,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k__14 = ((PyObject*)__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":625
 * # construct the named tuple for the CFAPartition - this replaces a class in an
 * # earlier version
 * CFAPartition = namedtuple("CFAPartition",             # <<<<<<<<<<<<<<
 *                           "index location ncvar file format shape")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CFAPartition, __pyx_t_3) < 0) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":684
 *     cdef np.ndarray subarray_shape
 * 
 *     cfa_variable_metadata_keys = ["cf_role", "cfa_dimensions", "cfa_array"]             # <<<<<<<<<<<<<<
 * 
 *     def __init__(CFAVariable self,
 */
  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_u_cf_role);
  __Pyx_GIVEREF(__pyx_n_u_cf_role);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_cf_role);
  __Pyx_INCREF(__pyx_n_u_cfa_dimensions);
  __Pyx_GIVEREF(__pyx_n_u_cfa_dimensions);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_cfa_dimensions);
  __Pyx_INCREF(__pyx_n_u_cfa_array);
  __Pyx_GIVEREF(__pyx_n_u_cfa_array);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_u_cfa_array);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable->tp_dict, __pyx_n_s_cfa_variable_metadata_keys, __pyx_t_3) < 0) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_9S3netCDF4_3CFA_11_CFAClasses_CFAVariable);

  /* "S3netCDF4/CFA/_CFAClasses.pyx":691
 *                  group=None,
 *                  basestring cf_role="",
 *                  list cfa_dimensions=list(),             # <<<<<<<<<<<<<<
 *                  list pmdimensions=list(),
 *                  np.ndarray pmshape=np.array([]),
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__15 = ((PyObject*)__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":692
 *                  basestring cf_role="",
 *                  list cfa_dimensions=list(),
 *                  list pmdimensions=list(),             # <<<<<<<<<<<<<<
 *                  np.ndarray pmshape=np.array([]),
 *                  basestring base="",
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__16 = ((PyObject*)__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":693
 *                  list cfa_dimensions=list(),
 *                  list pmdimensions=list(),
 *                  np.ndarray pmshape=np.array([]),             # <<<<<<<<<<<<<<
 *                  basestring base="",
 *                  dict metadata=dict(),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __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(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 693, __pyx_L1_error)
  __pyx_k__17 = ((PyArrayObject *)__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":695
 *                  np.ndarray pmshape=np.array([]),
 *                  basestring base="",
 *                  dict metadata=dict(),             # <<<<<<<<<<<<<<
 *                  object nc_partition_group=None,
 *                 ):
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__18 = ((PyObject*)__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1365
 *                  int dim_len=-1,
 *                  basestring axis_type="U",
 *                  dict metadata=dict()             # <<<<<<<<<<<<<<
 *                 ):
 *         """Initialise the CFADim object"""
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__32 = ((PyObject*)__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CFADataset(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9S3netCDF4_3CFA_11_CFAClasses_1__pyx_unpickle_CFADataset, NULL, __pyx_n_s_S3netCDF4_CFA__CFAClasses); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CFADataset, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_CFADataset__set_state(<CFADataset> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CFADataset__set_state(CFADataset __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.cfa_groups = __pyx_state[0]; __pyx_result.cfa_version = __pyx_state[1]; __pyx_result.format = __pyx_state[2]; __pyx_result.metadata = __pyx_state[3]; __pyx_result.name = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9S3netCDF4_3CFA_11_CFAClasses_3__pyx_unpickle_CFAGroup, NULL, __pyx_n_s_S3netCDF4_CFA__CFAClasses); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CFAGroup, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CFAVariable(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9S3netCDF4_3CFA_11_CFAClasses_5__pyx_unpickle_CFAVariable, NULL, __pyx_n_s_S3netCDF4_CFA__CFAClasses); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CFAVariable, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_CFAVariable__set_state(<CFAVariable> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CFAVariable__set_state(CFAVariable __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._shape = __pyx_state[0]; __pyx_result.base = __pyx_state[1]; __pyx_result.cf_role = __pyx_state[2]; __pyx_result.cfa_dimensions = __pyx_state[3]; __pyx_result.group = __pyx_state[4]; __pyx_result.metadata = __pyx_state[5]; __pyx_result.nc_dtype = __pyx_state[6]; __pyx_result.nc_partition_group = __pyx_state[7]; __pyx_result.pmdimensions = __pyx_state[8]; __pyx_result.pmshape = __pyx_state[9]; __pyx_result.subarray_shape = __pyx_state[10]; __pyx_result.var_name = __pyx_state[11]
 *     if len(__pyx_state) > 12 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9S3netCDF4_3CFA_11_CFAClasses_7__pyx_unpickle_CFADimension, NULL, __pyx_n_s_S3netCDF4_CFA__CFAClasses); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CFADimension, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "S3netCDF4/CFA/_CFAClasses.pyx":1
 * #!python             # <<<<<<<<<<<<<<
 * #cython: language_level=3
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "../../../../private/var/folders/mv/4s6tfcd91mz8r8yqpw7frs4wlcl4v9/T/build-env-lm2vwvbd/lib/python3.9/site-packages/numpy/__init__.pxd":1016
 * 
 * 
 * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     returns the unit part of the dtype for a numpy datetime64 object.
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init S3netCDF4.CFA._CFAClasses", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init S3netCDF4.CFA._CFAClasses");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
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);
}
#endif

/* GetBuiltinName */
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;
}

/* RaiseDoubleKeywords */
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
}

/* ParseKeywords */
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_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
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(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
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(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;
}

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

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (__Pyx_PyFastCFunction_Check(func)) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* BytesEquals */
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;
#if CYTHON_USE_UNICODE_INTERNALS
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            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
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        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
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        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 (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_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
}

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNeedMoreValuesToUnpack */
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");
}

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

/* UnpackItemEndCheck */
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;
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* SliceObject */
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_USE_TYPE_SLOTS
    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))
                    goto bad;
                PyErr_Clear();
            }
        }
        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_USE_TYPE_SLOTS
        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;
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    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;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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_FAST_THREAD_STATE
    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_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    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;
    #endif
    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;
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    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;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
            if (PY_VERSION_HEX >= 0x030700A0) {
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            } else {
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            }
        } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* py_dict_pop */
static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B3
    if ((1)) {
        return _PyDict_Pop(d, key, default_value);
    } else
#endif
    if (default_value) {
        return __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_pop, d, key, default_value);
    } else {
        return __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_pop, d, key);
    }
}

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#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);
}

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* GetItemInt */
static 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,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_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,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_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,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(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(__Pyx_is_valid_index(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))
                        return NULL;
                    PyErr_Clear();
                }
            }
            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));
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_FALSE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_TRUE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_TRUE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_FALSE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
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);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* SetItemInt */
static 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,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely(__Pyx_is_valid_index(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))
                        return -1;
                    PyErr_Clear();
                }
            }
            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);
}

/* SliceObject */
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_USE_TYPE_SLOTS
    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))
                    goto bad;
                PyErr_Clear();
            }
        }
        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_USE_TYPE_SLOTS
        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;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a - b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* Import */
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_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
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;
}

/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* SetVTable */
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    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 ((size_t)basicsize < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
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 - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* Declarations */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return ::std::complex< float >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return x + y*(__pyx_t_float_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      __pyx_t_float_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabsf(b.real) >= fabsf(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                float r = b.imag / b.real;
                float s = (float)(1.0) / (b.real + b.imag * r);
                return __pyx_t_float_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            float r = b.real / b.imag;
            float s = (float)(1.0) / (b.imag + b.real * r);
            return __pyx_t_float_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        if (b.imag == 0) {
            return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            float denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_float_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtf(z.real*z.real + z.imag*z.imag);
          #else
            return hypotf(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
            __pyx_t_float_complex z;
            float r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    float denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        return __Pyx_c_prod_float(a, a);
                    case 3:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, a);
                    case 4:
                        z = __Pyx_c_prod_float(a, a);
                        return __Pyx_c_prod_float(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if (b.imag == 0) {
                    z.real = powf(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2f(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_float(a);
                theta = atan2f(a.imag, a.real);
            }
            lnr = logf(r);
            z_r = expf(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosf(z_theta);
            z.imag = z_r * sinf(z_theta);
            return z;
        }
    #endif
#endif

/* Declarations */
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return ::std::complex< double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return x + y*(__pyx_t_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      __pyx_t_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

/* Arithmetic */
#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    #if 1
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else if (fabs(b.real) >= fabs(b.imag)) {
            if (b.real == 0 && b.imag == 0) {
                return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
            } else {
                double r = b.imag / b.real;
                double s = (double)(1.0) / (b.real + b.imag * r);
                return __pyx_t_double_complex_from_parts(
                    (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
            }
        } else {
            double r = b.real / b.imag;
            double s = (double)(1.0) / (b.imag + b.real * r);
            return __pyx_t_double_complex_from_parts(
                (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
        }
    }
    #else
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        if (b.imag == 0) {
            return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
        } else {
            double denom = b.real * b.real + b.imag * b.imag;
            return __pyx_t_double_complex_from_parts(
                (a.real * b.real + a.imag * b.imag) / denom,
                (a.imag * b.real - a.real * b.imag) / denom);
        }
    }
    #endif
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrt(z.real*z.real + z.imag*z.imag);
          #else
            return hypot(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
            __pyx_t_double_complex z;
            double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    double denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        return __Pyx_c_prod_double(a, a);
                    case 3:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, a);
                    case 4:
                        z = __Pyx_c_prod_double(a, a);
                        return __Pyx_c_prod_double(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                } else if (b.imag == 0) {
                    z.real = pow(a.real, b.real);
                    z.imag = 0;
                    return z;
                } else if (a.real > 0) {
                    r = a.real;
                    theta = 0;
                } else {
                    r = -a.real;
                    theta = atan2(0.0, -1.0);
                }
            } else {
                r = __Pyx_c_abs_double(a);
                theta = atan2(a.imag, a.real);
            }
            lnr = log(r);
            z_r = exp(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cos(z_theta);
            z.imag = z_r * sin(z_theta);
            return z;
        }
    #endif
#endif

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#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_IntOrLong(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_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#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_IntOrLong(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_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const 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)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
